Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop FrDky D-series telemetry support #8878

Merged
merged 3 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 2 additions & 52 deletions docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -1082,66 +1082,16 @@ _// TODO_

---

### frsky_coordinates_format

D-Series telemetry only: FRSKY_FORMAT_DMS (default), FRSKY_FORMAT_NMEA

| Default | Min | Max |
| --- | --- | --- |
| 0 | 0 | FRSKY_FORMAT_NMEA |

---

### frsky_default_latitude

D-Series telemetry only: OpenTX needs a valid set of coordinates to show compass value. A fake value defined in this setting is sent while no fix is acquired.

| Default | Min | Max |
| --- | --- | --- |
| 0 | -90 | 90 |

---

### frsky_default_longitude

D-Series telemetry only: OpenTX needs a valid set of coordinates to show compass value. A fake value defined in this setting is sent while no fix is acquired.

| Default | Min | Max |
| --- | --- | --- |
| 0 | -180 | 180 |

---

### frsky_pitch_roll

S.Port and D-Series telemetry: Send pitch and roll degrees*10 instead of raw accelerometer data
S.Port telemetry: Send pitch and roll degrees*10 instead of raw accelerometer data

| Default | Min | Max |
| --- | --- | --- |
| OFF | OFF | ON |

---

### frsky_unit

Not used? [METRIC/IMPERIAL]

| Default | Min | Max |
| --- | --- | --- |
| METRIC | | |

---

### frsky_vfas_precision

D-Series telemetry only: Set to 1 to send raw VBat value in 0.1V resolution for receivers that can handle it, or 0 (default) to use the standard method

| Default | Min | Max |
| --- | --- | --- |
| 0 | FRSKY_VFAS_PRECISION_LOW | FRSKY_VFAS_PRECISION_HIGH |

---

### fw_autotune_max_rate_deflection

The target percentage of maximum mixer output used for determining the rates in `AUTO` and `LIMIT`.
Expand Down Expand Up @@ -5054,7 +5004,7 @@ Selection of receiver (RX) type. Additional configuration of a `serialrx_provide

### report_cell_voltage

S.Port, D-Series, and IBUS telemetry: Send the average cell voltage if set to ON
S.Port and IBUS telemetry: Send the average cell voltage if set to ON

| Default | Min | Max |
| --- | --- | --- |
Expand Down
34 changes: 0 additions & 34 deletions docs/Telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,40 +125,6 @@ The following sensors are transmitted

To quickly and easily monitor these SmartPort sensors and flight modes, install [OpenTX Telemetry Widget](https://github.com/iNavFlight/OpenTX-Telemetry-Widget) to your Taranis Q X7, X9D, X9D+ or X9E transmitter.

## FrSky telemetry

FrSky telemetry is for older FrSky transmitters and D-series receivers. For newer transmitters paired with X-series receivers see SmartPort (S.Port) telemetry above.

FrSky telemetry is transmit only and just requires a single connection from the TX pin of a serial port to the RX pin on an FrSky telemetry receiver.

FrSky telemetry signals are inverted. To connect a INAV capable board to an FrSKy receiver you have some options.

1. A hardware inverter - Built in to some flight controllers.
2. Use software serial.
3. Use a flight controller that has software configurable hardware inversion (e.g. F3 or F7).

For 1, just connect your inverter to a usart or software serial port.

For 2 and 3 use the CLI command as follows:

```
set telemetry_inverted = OFF
```

### Precision setting for VFAS

INAV can send VFAS (FrSky Ampere Sensor Voltage) in two ways:

```
set frsky_vfas_precision = 0
```
This is default setting which supports VFAS resolution of 0.2 volts and is supported on all FrSky hardware.

```
set frsky_vfas_precision = 1
```
This is new setting which supports VFAS resolution of 0.1 volts and is supported by OpenTX and er9x/ersky9x firmware (this method uses custom ID 0x39).


### Notes

Expand Down
4 changes: 0 additions & 4 deletions src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,6 @@ main_sources(COMMON_SRC
telemetry/crsf.h
telemetry/srxl.c
telemetry/srxl.h
telemetry/frsky.c
telemetry/frsky.h
telemetry/frsky_d.c
telemetry/frsky_d.h
telemetry/ghst.c
telemetry/ghst.h
telemetry/hott.c
Expand Down
1 change: 0 additions & 1 deletion src/main/fc/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ bool cliMode = false;
#include "sensors/esc_sensor.h"
#endif

#include "telemetry/frsky_d.h"
#include "telemetry/telemetry.h"
#include "build/debug.h"

Expand Down
2 changes: 1 addition & 1 deletion src/main/fc/fc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ bool emergencyArmingUpdate(bool armingSwitchIsOn)
return counter >= EMERGENCY_ARMING_MIN_ARM_COUNT;
}

#define TELEMETRY_FUNCTION_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_MAVLINK | FUNCTION_TELEMETRY_IBUS)
#define TELEMETRY_FUNCTION_MASK (FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_MAVLINK | FUNCTION_TELEMETRY_IBUS)

void releaseSharedTelemetryPorts(void) {
serialPort_t *sharedPort = findSharedSerialPort(TELEMETRY_FUNCTION_MASK, FUNCTION_MSP);
Expand Down
38 changes: 3 additions & 35 deletions src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ tables:
- name: osd_alignment
values: ["LEFT", "RIGHT"]
enum: osd_alignment_e
- name: frsky_unit
values: ["METRIC", "IMPERIAL"]
enum: frskyUnit_e
- name: ltm_rates
values: ["NORMAL", "MEDIUM", "SLOW"]
- name: i2c_speed
Expand Down Expand Up @@ -2815,7 +2812,7 @@ groups:

- name: PG_TELEMETRY_CONFIG
type: telemetryConfig_t
headers: ["io/serial.h", "telemetry/telemetry.h", "telemetry/frsky_d.h", "telemetry/sim.h"]
headers: ["io/serial.h", "telemetry/telemetry.h", "telemetry/sim.h"]
condition: USE_TELEMETRY
members:
- name: telemetry_switch
Expand All @@ -2826,41 +2823,12 @@ groups:
description: "Determines if the telemetry protocol default signal inversion is reversed. This should be OFF in most cases unless a custom or hacked RX is used."
default_value: OFF
type: bool
- name: frsky_default_latitude
description: "D-Series telemetry only: OpenTX needs a valid set of coordinates to show compass value. A fake value defined in this setting is sent while no fix is acquired."
default_value: 0
field: gpsNoFixLatitude
min: -90
max: 90
- name: frsky_default_longitude
description: "D-Series telemetry only: OpenTX needs a valid set of coordinates to show compass value. A fake value defined in this setting is sent while no fix is acquired."
default_value: 0
field: gpsNoFixLongitude
min: -180
max: 180
- name: frsky_coordinates_format
description: "D-Series telemetry only: FRSKY_FORMAT_DMS (default), FRSKY_FORMAT_NMEA"
default_value: 0
field: frsky_coordinate_format
min: 0
max: FRSKY_FORMAT_NMEA
type: uint8_t # TODO: This seems to use an enum, we should use table:
- name: frsky_unit
description: "Not used? [METRIC/IMPERIAL]"
default_value: "METRIC"
table: frsky_unit
type: uint8_t
- name: frsky_vfas_precision
description: "D-Series telemetry only: Set to 1 to send raw VBat value in 0.1V resolution for receivers that can handle it, or 0 (default) to use the standard method"
default_value: 0
min: FRSKY_VFAS_PRECISION_LOW
max: FRSKY_VFAS_PRECISION_HIGH
- name: frsky_pitch_roll
description: "S.Port and D-Series telemetry: Send pitch and roll degrees*10 instead of raw accelerometer data"
description: "S.Port telemetry: Send pitch and roll degrees*10 instead of raw accelerometer data"
default_value: OFF
type: bool
- name: report_cell_voltage
description: "S.Port, D-Series, and IBUS telemetry: Send the average cell voltage if set to ON"
description: "S.Port and IBUS telemetry: Send the average cell voltage if set to ON"
default_value: OFF
type: bool
- name: hott_alarm_sound_interval
Expand Down
2 changes: 1 addition & 1 deletion src/main/io/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ serialPort_t *findNextSharedSerialPort(uint32_t functionMask, serialPortFunction
return NULL;
}

#define ALL_TELEMETRY_FUNCTIONS_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_MAVLINK | FUNCTION_TELEMETRY_IBUS)
#define ALL_TELEMETRY_FUNCTIONS_MASK (FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_MAVLINK | FUNCTION_TELEMETRY_IBUS)
#define ALL_FUNCTIONS_SHARABLE_WITH_MSP (FUNCTION_BLACKBOX | ALL_TELEMETRY_FUNCTIONS_MASK | FUNCTION_LOG)

bool isSerialConfigValid(const serialConfig_t *serialConfigToCheck)
Expand Down
2 changes: 1 addition & 1 deletion src/main/io/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ typedef enum {
FUNCTION_NONE = 0,
FUNCTION_MSP = (1 << 0), // 1
FUNCTION_GPS = (1 << 1), // 2
FUNCTION_TELEMETRY_FRSKY = (1 << 2), // 4
FUNCTION_UNUSED_3 = (1 << 2), // 4 //Was FUNCTION_TELEMETRY_FRSKY
FUNCTION_TELEMETRY_HOTT = (1 << 3), // 8
FUNCTION_TELEMETRY_LTM = (1 << 4), // 16
FUNCTION_TELEMETRY_SMARTPORT = (1 << 5), // 32
Expand Down
1 change: 0 additions & 1 deletion src/main/target/ALIENFLIGHTF4/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ void targetConfiguration(void)
rxConfigMutable()->spektrum_sat_bind_autoreset = 1;
} else {
rxConfigMutable()->serialrx_provider = SERIALRX_SBUS;
serialConfigMutable()->portConfigs[3].functionMask = FUNCTION_TELEMETRY_FRSKY;
featureConfigMutable()->enabledFeatures |= (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY);
}

Expand Down
1 change: 0 additions & 1 deletion src/main/target/ALIENFLIGHTNGF7/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ void targetConfiguration(void)
rxConfigMutable()->spektrum_sat_bind_autoreset = 1;
} else {
rxConfigMutable()->serialrx_provider = SERIALRX_SBUS;
serialConfigMutable()->portConfigs[3].functionMask = FUNCTION_TELEMETRY_FRSKY;
featureConfigMutable()->enabledFeatures |= (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY);
}

Expand Down
1 change: 0 additions & 1 deletion src/main/target/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
#define USE_GPS_PROTO_MSP
#define USE_TELEMETRY
#define USE_TELEMETRY_LTM
#define USE_TELEMETRY_FRSKY

#if defined(STM_FAST_TARGET)
#define SCHEDULER_DELAY_LIMIT 10
Expand Down
89 changes: 0 additions & 89 deletions src/main/telemetry/frsky.c

This file was deleted.

26 changes: 0 additions & 26 deletions src/main/telemetry/frsky.h

This file was deleted.

Loading