Beacon mode ptt tail and memory repeat time (#109)

* Update k3ng_keyer.ino

Modified the beacon code so that it has options for including the memory repeat time (to space out the repeated playing of memory 1) and the ptt tail time.
To the keyer_features_and_options.h file add two new options
#define OPTION_BEACON_MODE_MEMORY_REPEAT_TIME
#define OPTION_BEACON_MODE_PTT_TAIL_TIME

* Update keyer_features_and_options.h

* Update keyer_features_and_options.h

* Update keyer_features_and_options.h
pull/110/head
VK2EFL 2021-03-10 13:50:00 +11:00 zatwierdzone przez GitHub
rodzic acf6305c26
commit 81e9e2d7d8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 24 dodań i 7 usunięć

Wyświetl plik

@ -2283,24 +2283,39 @@ void loop()
wdt_reset();
#endif //OPTION_WATCHDOG_TIMER
#if defined(FEATURE_BEACON) && defined(FEATURE_MEMORIES) // paddle_left pin LOW at boot up beacon mode
#if defined(FEATURE_BEACON) && defined(FEATURE_MEMORIES)
if (keyer_machine_mode == BEACON) {
delay(201);
while (keyer_machine_mode == BEACON) { // if we're in beacon mode, just keep playing memory 1
delay(201); // an odd duration delay before we enter BEACON mode
#ifdef OPTION_BEACON_MODE_MEMORY_REPEAT_TIME
unsigned int time_to_delay = configuration.memory_repeat_time - configuration.ptt_tail_time[configuration.current_tx - 1];
#endif // OPTION_BEACON_MODE_MEMORY_REPEAT_TIME
while (keyer_machine_mode == BEACON) { // if we're in beacon mode, just keep playing memory 1
if (!send_buffer_bytes) {
add_to_send_buffer(SERIAL_SEND_BUFFER_MEMORY_NUMBER);
add_to_send_buffer(0);
}
service_send_buffer(PRINTCHAR);
#ifdef OPTION_BEACON_MODE_PTT_TAIL_TIME
delay(configuration.ptt_tail_time[configuration.current_tx - 1]); // after memory 1 has played, this holds the PTT line active for the ptt tail time of the current tx
check_ptt_tail(); // this resets things so that the ptt line will go high during the next playout
digitalWrite (configuration.current_ptt_line, ptt_line_inactive_state); // forces the ptt line of the current tx to be inactive
#endif // OPTION_BEACON_MODE_PTT_TAIL_TIME
#ifdef FEATURE_SERIAL
check_serial();
#endif
#ifdef OPTION_WATCHDOG_TIMER
wdt_reset();
#endif //OPTION_WATCHDOG_TIMER
}
}
#endif //defined(FEATURE_BEACON) && defined(FEATURE_MEMORIES)
#endif // OPTION_WATCHDOG_TIMER
#ifdef OPTION_BEACON_MODE_MEMORY_REPEAT_TIME
if (time_to_delay > 0) delay(time_to_delay); // this provdes a delay between succesive playouts of the memory contents
#endif // OPTION_BEACON_MODE_MEMORY_REPEAT_TIME
} // end while (keyer_machine_mode == BEACON)
} // end if (keyer_machine_mode == BEACON)
#endif // defined(FEATURE_BEACON) && defined(FEATURE_MEMORIES)
#if defined(FEATURE_BEACON_SETTING)
service_beacon();

Wyświetl plik

@ -127,6 +127,8 @@
// #define OPTION_PERSONALIZED_STARTUP_SCREEN // displays a user defined string of characters on the second or fourth row of the screen during startup. 1602 display requires OPTION_DO_NOT_SAY_HI
// #define OPTION_SWAP_PADDLE_PARAMETER_CHANGE_DIRECTION // reverses the up/down direction when using the paddles to change the wpm or sidetone frequency
#define OPTION_DISPLAY_MEMORY_CONTENTS_COMMAND_MODE
// #define OPTION_BEACON_MODE_MEMORY_REPEAT_TIME // to space out the repeated playing of memory 1 when in beacon mode
// #define OPTION_BEACON_MODE_PTT_TAIL_TIME // adds the ptt tail time to each playing of memory 1 in beacon mode
//Added in version 2020.07.04.01
//#define OPTION_WINKEY_PROSIGN_COMPATIBILITY // Additional character mappings to support K1EL Winkey emulation prosigns