[Taranis] Bitmap loaded upon USB disconnection, A2 never valid if proto==X16

This commit is contained in:
bernet.andre@gmail.com
2013-05-20 11:38:48 +00:00
parent 20af91b9e1
commit c107643d69
+6 -1
View File
@@ -1041,6 +1041,11 @@ bool __getSwitch(int8_t swtch)
if (!TELEMETRY_STREAMING() && cs->v1 >= MIXSRC_FIRST_TELEM+TELEM_TM2) if (!TELEMETRY_STREAMING() && cs->v1 >= MIXSRC_FIRST_TELEM+TELEM_TM2)
return swtch > 0 ? false : true; return swtch > 0 ? false : true;
#if defined (PCBTARANIS)
if (cs->v1 == MIXSRC_FIRST_TELEM+TELEM_A2-1 && g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_X16)
return swtch > 0 ? false : true;
#endif
y = convertCswTelemValue(cs); y = convertCswTelemValue(cs);
#if defined(FRSKY_HUB) #if defined(FRSKY_HUB)
@@ -3661,8 +3666,8 @@ void perMain()
#if defined(PCBTARANIS) #if defined(PCBTARANIS)
if (usbState == USB_DISCONNECTING) { if (usbState == USB_DISCONNECTING) {
eeReadAll(); eeReadAll();
eeLoadModel(g_eeGeneral.currModel);
sdInit(); sdInit();
eeLoadModel(g_eeGeneral.currModel);
usbState = USB_DISCONNECTED; usbState = USB_DISCONNECTED;
} }
#endif #endif