mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 06:15:10 +03:00
Preparation for A3/A4
This commit is contained in:
parent
b01a936b4d
commit
2a6e69f902
4 changed files with 11 additions and 6 deletions
|
@ -1438,9 +1438,6 @@ bool isSourceAvailable(int source)
|
|||
|
||||
bool isTelemetrySourceAvailable(int source)
|
||||
{
|
||||
if (source == TELEM_RX_VOLTAGE || source == TELEM_A3 || source == TELEM_A4 || source == TELEM_MIN_A3 || source == TELEM_MIN_A4)
|
||||
return false;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
if (source == TELEM_RSSI_TX)
|
||||
return false;
|
||||
|
|
|
@ -333,7 +333,7 @@ getvalue_t getValue(uint8_t i)
|
|||
#endif
|
||||
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_RSSI_TX) return frskyData.rssi[1].value;
|
||||
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_RSSI_RX) return frskyData.rssi[0].value;
|
||||
else if (i<=MIXSRC_FIRST_TELEM-1+TELEM_A2) return frskyData.analog[i-MIXSRC_FIRST_TELEM+1-TELEM_A1].value;
|
||||
else if (i<=MIXSRC_FIRST_TELEM-1+TELEM_A_LAST) return frskyData.analog[i-MIXSRC_FIRST_TELEM+1-TELEM_A1].value;
|
||||
#if defined(FRSKY_SPORT)
|
||||
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_ALT) return frskyData.hub.baroAltitude;
|
||||
#elif defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
|
||||
|
|
|
@ -1006,6 +1006,12 @@ PACK(typedef struct t_FrSkyChannelData {
|
|||
}) FrSkyChannelData;
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TELEM_A_COUNT 4
|
||||
#else
|
||||
#define TELEM_A_COUNT 2
|
||||
#endif
|
||||
|
||||
enum TelemetrySource {
|
||||
TELEM_NONE,
|
||||
TELEM_TX_VOLTAGE,
|
||||
|
@ -1027,12 +1033,14 @@ enum TelemetrySource {
|
|||
#if defined(CPUARM)
|
||||
TELEM_RX_VOLTAGE,
|
||||
#endif
|
||||
TELEM_A1,
|
||||
TELEM_A_FIRST,
|
||||
TELEM_A1=TELEM_A_FIRST,
|
||||
TELEM_A2,
|
||||
#if defined(CPUARM)
|
||||
TELEM_A3,
|
||||
TELEM_A4,
|
||||
#endif
|
||||
TELEM_A_LAST=TELEM_A_FIRST+TELEM_A_COUNT-1,
|
||||
TELEM_ALT,
|
||||
TELEM_RPM,
|
||||
TELEM_FUEL,
|
||||
|
|
|
@ -282,7 +282,7 @@ PACK(struct FrskySerialData {
|
|||
#endif
|
||||
|
||||
struct FrskyData {
|
||||
FrskyValueWithMinMax analog[2];
|
||||
FrskyValueWithMinMax analog[TELEM_A_COUNT];
|
||||
FrskyValueWithMin rssi[2];
|
||||
#if defined(CPUARM)
|
||||
FrskyValueWithMin swr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue