[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
@@ -1040,6 +1040,11 @@ bool __getSwitch(int8_t swtch)
if (cs->v1 >= MIXSRC_FIRST_TELEM) {
if (!TELEMETRY_STREAMING() && cs->v1 >= MIXSRC_FIRST_TELEM+TELEM_TM2)
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);
@@ -3661,8 +3666,8 @@ void perMain()
#if defined(PCBTARANIS)
if (usbState == USB_DISCONNECTING) {
eeReadAll();
eeLoadModel(g_eeGeneral.currModel);
sdInit();
eeLoadModel(g_eeGeneral.currModel);
usbState = USB_DISCONNECTED;
}
#endif