Switch and Throttle Warnings when loading a model. To be tested and re-tested ...

This commit is contained in:
bsongis
2012-05-25 13:52:39 +00:00
parent d3b14ea3e2
commit 9ef47a1e63
11 changed files with 112 additions and 67 deletions
+12 -1
View File
@@ -852,6 +852,11 @@ bool eeModelExists(uint8_t id)
void eeLoadModel(uint8_t id)
{
if (id<MAX_MODELS) {
if (pulsesStarted()) {
pausePulses();
}
theFile.openRlc(FILE_MODEL(id));
uint16_t sz = theFile.readRlc((uint8_t*)&g_model, sizeof(g_model));
@@ -862,11 +867,17 @@ void eeLoadModel(uint8_t id)
#endif
if (sz < 256) {
// alert("Error Loading Model");
modelDefault(id);
eeCheck(true);
}
if (pulsesStarted()) {
checkTHR();
checkSwitches();
resumePulses();
clearKeyEvents();
}
resetProto();
resetAll();