[all] Switch warnings can be enabled/disabled for each individual switch

This commit is contained in:
Andre Bernet
2013-11-30 11:49:17 +01:00
parent 6e310b922d
commit b13fbade78
4 changed files with 82 additions and 50 deletions
+3 -1
View File
@@ -107,6 +107,8 @@ PACK(typedef struct {
}) MixData_v215;
#endif
PACK(typedef struct {
int8_t mode; // timer trigger source -> off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw
uint16_t start:12;
@@ -419,7 +421,7 @@ void ConvertModel_215_to_216(ModelData &model)
memcpy(&g_model.phaseData[i], &oldModel.phaseData[i], sizeof(oldModel.phaseData[i])); // the last 4 gvars will remain blank
}
g_model.thrTraceSrc = oldModel.thrTraceSrc;
g_model.switchWarningStates = oldModel.switchWarningStates;
g_model.switchWarningStates = oldModel.switchWarningStates >> 1;
for (uint8_t i=0; i<5; i++) {
memcpy(g_model.gvars[i].name, oldModel.gvar_names[i], LEN_GVAR_NAME);
}