From 7c9b0960ea70ae209c89ed164f04678963d12057 Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Thu, 5 Dec 2013 11:27:21 +0100 Subject: [PATCH] mAh and pot positions weren't saved on model change --- radio/src/opentx.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 26422db47..a92a2dac0 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -4199,26 +4199,6 @@ void opentxClose() hapticOff(); #endif -#if defined(CPUARM) - if((g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != frskyData.hub.currentConsumption)) { - g_model.frsky.storedMah = frskyData.hub.currentConsumption; - eeDirty(EE_MODEL); - } - else if((!g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != 0)){ - g_model.frsky.storedMah = 0; - eeDirty(EE_MODEL); - } -#endif - -#if defined(PCBTARANIS) - if((g_model.nPotsToWarn >> 6) == 2) { - for (uint8_t i=0; i> 3; - eeDirty(EE_MODEL); - } -#endif - saveTimers(); #if defined(PCBSKY9X) @@ -4816,6 +4796,26 @@ void saveTimers() } } } + +#if !defined(CPUM2560) + if((g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != frskyData.hub.currentConsumption)) { + g_model.frsky.storedMah = frskyData.hub.currentConsumption; + eeDirty(EE_MODEL); + } + else if((!g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != 0)){ + g_model.frsky.storedMah = 0; + eeDirty(EE_MODEL); + } +#endif + +#if defined(PCBTARANIS) + if((g_model.nPotsToWarn >> 6) == 2) { + for (uint8_t i=0; i> 3; + eeDirty(EE_MODEL); + } +#endif } #endif