[Taranis] Problem with SWR and Altitude in custom switches

This commit is contained in:
bsongis@gmail.com
2013-08-30 18:02:00 +00:00
parent 8453e13fe1
commit 851c4c0225
2 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -812,7 +812,13 @@ enum TelemetrySource {
#else
TELEM_DISPLAY_MAX = TELEM_TM2, // because used also in PlayValue
#endif
TELEM_STATUS_MAX = TELEM_GPS_TIME
TELEM_STATUS_MAX = TELEM_GPS_TIME,
#if defined(FRSKY_SPORT)
TELEM_SWR = TELEM_RSSI_TX,
TELEM_FIRST_STREAMED_VALUE = TELEM_RSSI_RX,
#else
TELEM_FIRST_STREAMED_VALUE = TELEM_RSSI_TX,
#endif
};
enum VarioSource {
+2 -2
View File
@@ -1006,7 +1006,7 @@ bool getSwitch(int8_t swtch)
#if defined(FRSKY)
// Telemetry
if (cs->v1 >= MIXSRC_FIRST_TELEM) {
if ((!TELEMETRY_STREAMING() && cs->v1 >= MIXSRC_FIRST_TELEM+TELEM_TM2) || IS_FAI_FORBIDDEN(cs->v1-1))
if ((!TELEMETRY_STREAMING() && cs->v1 >= MIXSRC_FIRST_TELEM+TELEM_FIRST_STREAMED_VALUE-1) || IS_FAI_FORBIDDEN(cs->v1-1))
return swtch > 0 ? false : true;
#if defined (PCBTARANIS)
@@ -1401,7 +1401,7 @@ getvalue_t convertTelemValue(uint8_t channel, uint8_t value)
break;
case TELEM_ALT:
#if defined(PCBTARANIS)
result = value * 80 - 5000;
result = value * 800 - 50000;
break;
#endif
case TELEM_GPSALT: