This commit is contained in:
bsongis
2014-06-05 19:32:29 +02:00
parent 77e9130c37
commit 35e5faa8ad
3 changed files with 9 additions and 5 deletions
+3 -2
View File
@@ -984,8 +984,9 @@ void eeLoadModel(uint8_t id)
#endif #endif
#if defined(CPUARM) #if defined(CPUARM)
if(g_model.frsky.mAhPersistent) if (g_model.frsky.mAhPersistent) {
frskyData.hub.currentConsumption = g_model.frsky.storedMah; frskyData.hub.currentConsumption = g_model.frsky.storedMah;
}
#endif #endif
LOAD_MODEL_CURVES(); LOAD_MODEL_CURVES();
+2 -2
View File
@@ -2441,11 +2441,11 @@ void opentxClose()
saveTimers(); saveTimers();
#if defined(CPUARM) && defined(FRSKY) #if defined(CPUARM) && defined(FRSKY)
if ((g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != frskyData.hub.currentConsumption)) { if (g_model.frsky.mAhPersistent && g_model.frsky.storedMah!=frskyData.hub.currentConsumption) {
g_model.frsky.storedMah = frskyData.hub.currentConsumption; g_model.frsky.storedMah = frskyData.hub.currentConsumption;
eeDirty(EE_MODEL); eeDirty(EE_MODEL);
} }
else if((!g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != 0)){ else if (!g_model.frsky.mAhPersistent && g_model.frsky.storedMah!=0) {
g_model.frsky.storedMah = 0; g_model.frsky.storedMah = 0;
eeDirty(EE_MODEL); eeDirty(EE_MODEL);
} }
+4 -1
View File
@@ -587,6 +587,9 @@ void telemetryInit(void)
telemetryPortInit(); telemetryPortInit();
#endif #endif
// clear telemetry context #if 0
// if we call telemetryReset() here we also reset the consumption after model load
// right now I don't see why we call it here
telemetryReset(); telemetryReset();
#endif
} }