Add Spectrum resume
This commit is contained in:
@@ -1163,6 +1163,10 @@ static void OnKeyDown(uint8_t key)
|
||||
}
|
||||
#ifdef ENABLE_FEAT_F4HWN_SPECTRUM
|
||||
SaveSettings();
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
|
||||
gEeprom.CURRENT_STATE = 0;
|
||||
SETTINGS_WriteCurrentState();
|
||||
#endif
|
||||
DeInitSpectrum();
|
||||
break;
|
||||
@@ -1639,11 +1643,22 @@ void APP_RunSpectrum()
|
||||
}
|
||||
}
|
||||
settings.stepsCount = STEPS_128;
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
|
||||
gEeprom.CURRENT_STATE = 5;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
else {
|
||||
#endif
|
||||
currentFreq = initialFreq = gTxVfo->pRX->Frequency -
|
||||
((GetStepsCount() / 2) * GetScanStep());
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
|
||||
gEeprom.CURRENT_STATE = 4;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
|
||||
SETTINGS_WriteCurrentState();
|
||||
#endif
|
||||
|
||||
BackupRegisters();
|
||||
|
||||
|
Reference in New Issue
Block a user