Issue 3473 port to next (#3587)
This commit is contained in:
committed by
Bertrand Songis
parent
13558214a8
commit
dd12d09c92
@@ -1397,7 +1397,7 @@ void ModelData::clear()
|
||||
moduleData[1].protocol = PULSES_OFF;
|
||||
}
|
||||
for (int i=0; i<C9X_MAX_FLIGHT_MODES; i++) {
|
||||
flightModeData[i].clear();
|
||||
flightModeData[i].clear(i);
|
||||
}
|
||||
clearInputs();
|
||||
clearMixes();
|
||||
@@ -1857,3 +1857,16 @@ unsigned int getNumSubtypes(MultiModuleRFProtocols type) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void FlightModeData::clear(const int phase)
|
||||
{
|
||||
memset(this, 0, sizeof(FlightModeData));
|
||||
if (phase != 0) {
|
||||
for (int idx=0; idx<C9X_MAX_GVARS; idx++) {
|
||||
gvars[idx] = 1025;
|
||||
}
|
||||
for (int idx=0; idx<C9X_MAX_ENCODERS; idx++) {
|
||||
rotaryEncoders[idx] = 1025;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user