Fixes #1186
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user