mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-09-10 17:04:33 -04:00
Re-order cw settings to match the menu
This commit is contained in:
parent
850cda59e4
commit
d032664620
64
setup.cpp
64
setup.cpp
@ -225,6 +225,38 @@ const SettingScreen_t ssBfo PROGMEM = {
|
|||||||
};
|
};
|
||||||
void runBfoSetting(){runSetting(&ssBfo);}
|
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
|
//CW Tone
|
||||||
void ssCwToneInitialize(long int* start_value_out)
|
void ssCwToneInitialize(long int* start_value_out)
|
||||||
{
|
{
|
||||||
@ -334,38 +366,6 @@ const SettingScreen_t ssKeyer PROGMEM = {
|
|||||||
};
|
};
|
||||||
void runKeyerSetting(){runSetting(&ssKeyer);}
|
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()
|
void setupResetAll()
|
||||||
{
|
{
|
||||||
//displayDialog(F("Reset all cals and settings?"),F("Press tune to Confirm"));
|
//displayDialog(F("Reset all cals and settings?"),F("Press tune to Confirm"));
|
||||||
|
Loading…
Reference in New Issue
Block a user