Add option to allow configuration saves without keypress

Add the ability to invoke the Yaesu calibration Yaesu commands F, F2, O, and O2, to perform the EEPROM write without waiting for a user keystroke.   Rotor position will be assumed to be at the desired place when invoking the command.
This commit is contained in:
KD4Z 2022-12-01 11:06:34 -05:00
parent 4f24fe3cf7
commit dedd7a3ddb
2 changed files with 7 additions and 4 deletions

View File

@ -7127,10 +7127,12 @@ void update_lcd_display(){
// --------------------------------------------------------------
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
void get_keystroke(){
while (control_port->available() == 0) {
}
while (control_port->available() > 0)
incoming_serial_byte = control_port->read();
#ifndef OPTION_SAVE_CONFIGURATION_WITHOUT_WAITING_FOR_KEYSTROKE
while (control_port->available() == 0) {
}
while (control_port->available() > 0)
incoming_serial_byte = control_port->read();
#endif
}
#endif // defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)

View File

@ -181,6 +181,7 @@
// #define OPTION_MORE_SERIAL_CHECKS
// #define OPTION_STEPPER_MOTOR_USE_TIMER_ONE_INSTEAD_OF_FIVE
// #define OPTION_ALLOW_ROTATIONAL_AND_CONFIGURATION_CMDS_AT_BOOT_UP // if disabled, rotational and configuration commands will be ignored on the serial port for the first 10 second after boot up
// #define OPTION_SAVE_CONFIGURATION_WITHOUT_WAITING_FOR_KEYSTROKE
// #define OPTION_STEPPER_MOTOR_MAX_2_KHZ
// #define OPTION_STEPPER_MOTOR_MAX_5_KHZ