Re-order cw settings to match the menu

This commit is contained in:
Reed Nightingale 2020-01-19 20:21:51 -08:00
parent 850cda59e4
commit d032664620

View File

@ -225,6 +225,38 @@ const SettingScreen_t ssBfo PROGMEM = {
};
void runBfoSetting(){runSetting(&ssBfo);}
//CW Speed
void ssCwSpeedInitialize(long int* start_value_out)
{
*start_value_out = 1200L/globalSettings.cwDitDurationMs;
}
void ssCwSpeedValidate(const long int candidate_value_in, long int* validated_value_out)
{
*validated_value_out = LIMIT(candidate_value_in,1,100);
}
void ssCwSpeedChange(const long int new_value, char* buff_out, const size_t buff_out_size)
{
ltoa(new_value, buff_out, 10);
}
void ssCwSpeedFinalize(const long int final_value)
{
globalSettings.cwDitDurationMs = 1200L/final_value;
SaveSettingsToEeprom();
}
const char SS_CW_SPEED_T [] PROGMEM = "Set CW Speed";
const char SS_CW_SPEED_A [] PROGMEM = "Select speed to play CW\ncharacters";
const SettingScreen_t ssCwSpeed PROGMEM = {
SS_CW_SPEED_T,
SS_CW_SPEED_A,
5,
1,
ssCwSpeedInitialize,
ssCwSpeedValidate,
ssCwSpeedChange,
ssCwSpeedFinalize
};
void runCwSpeedSetting(){runSetting(&ssCwSpeed);}
//CW Tone
void ssCwToneInitialize(long int* start_value_out)
{
@ -334,38 +366,6 @@ const SettingScreen_t ssKeyer PROGMEM = {
};
void runKeyerSetting(){runSetting(&ssKeyer);}
//CW Speed
void ssCwSpeedInitialize(long int* start_value_out)
{
*start_value_out = 1200L/globalSettings.cwDitDurationMs;
}
void ssCwSpeedValidate(const long int candidate_value_in, long int* validated_value_out)
{
*validated_value_out = LIMIT(candidate_value_in,1,100);
}
void ssCwSpeedChange(const long int new_value, char* buff_out, const size_t buff_out_size)
{
ltoa(new_value, buff_out, 10);
}
void ssCwSpeedFinalize(const long int final_value)
{
globalSettings.cwDitDurationMs = 1200L/final_value;
SaveSettingsToEeprom();
}
const char SS_CW_SPEED_T [] PROGMEM = "Set CW Speed";
const char SS_CW_SPEED_A [] PROGMEM = "Select speed to play CW\ncharacters";
const SettingScreen_t ssCwSpeed PROGMEM = {
SS_CW_SPEED_T,
SS_CW_SPEED_A,
5,
1,
ssCwSpeedInitialize,
ssCwSpeedValidate,
ssCwSpeedChange,
ssCwSpeedFinalize
};
void runCwSpeedSetting(){runSetting(&ssCwSpeed);}
void setupResetAll()
{
//displayDialog(F("Reset all cals and settings?"),F("Press tune to Confirm"));