kopia lustrzana https://github.com/k3ng/k3ng_cw_keyer
2019.05.16.01
Fixed issue with factory reset functionality and asynchronous EEPROM write feature Relocated sidetone_hz_limit_low and sidetone_hz_limit_high setting from ino file to settings.h filespull/74/head
rodzic
6996453c68
commit
dfcee38f14
|
@ -1048,6 +1048,9 @@ Recent Update History
|
|||
Merged pull request https://github.com/k3ng/k3ng_cw_keyer/pull/67 (Thanks, OK1CDJ); New hardware profile: HARDWARE_OPENCWKEYER_MK2 https://github.com/ok1cdj/OpenCWKeyerMK2
|
||||
Merged pull request https://github.com/k3ng/k3ng_cw_keyer/pull/66 (Thanks, woodjrx); Last update for K5BCQ
|
||||
|
||||
2019.05.16.01
|
||||
Fixed issue with factory reset functionality and asynchronous EEPROM write feature
|
||||
Relocated sidetone_hz_limit_low and sidetone_hz_limit_high setting from ino file to settings.h files
|
||||
|
||||
This code is currently maintained for and compiled with Arduino 1.8.x. Your mileage may vary with other versions.
|
||||
|
||||
|
@ -1063,7 +1066,7 @@ Recent Update History
|
|||
|
||||
*/
|
||||
|
||||
#define CODE_VERSION "2019.05.15.01"
|
||||
#define CODE_VERSION "2019.05.16.01"
|
||||
#define eeprom_magic_number 35 // you can change this number to have the unit re-initialize EEPROM
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1543,9 +1546,6 @@ byte send_buffer_status = SERIAL_SEND_BUFFER_NORMAL;
|
|||
|
||||
#endif //FEATURE_HELL
|
||||
|
||||
#define SIDETONE_HZ_LOW_LIMIT 299
|
||||
#define SIDETONE_HZ_HIGH_LIMIT 2001
|
||||
|
||||
#ifdef FEATURE_DEAD_OP_WATCHDOG
|
||||
byte dead_op_watchdog_active = 1;
|
||||
byte dit_counter = 0;
|
||||
|
@ -5579,10 +5579,18 @@ void write_settings_to_eeprom(int initialize_eeprom) {
|
|||
EEPROM.write(0,eeprom_magic_number);
|
||||
#ifdef FEATURE_MEMORIES
|
||||
initialize_eeprom_memories();
|
||||
#endif //FEATURE_MEMORIES
|
||||
}
|
||||
#endif //FEATURE_MEMORIES
|
||||
const byte* p = (const byte*)(const void*)&configuration;
|
||||
unsigned int i;
|
||||
int ee = 1; // starting point of configuration struct
|
||||
for (i = 0; i < sizeof(configuration); i++){
|
||||
EEPROM.write(ee++, *p++);
|
||||
}
|
||||
} else {
|
||||
|
||||
async_eeprom_write = 1; // initiate an asyncrhonous eeprom write
|
||||
async_eeprom_write = 1; // initiate an asyncrhonous eeprom write
|
||||
|
||||
}
|
||||
|
||||
#endif //!defined(ARDUINO_SAM_DUE) || (defined(ARDUINO_SAM_DUE) && defined(FEATURE_EEPROM_E24C1024))
|
||||
|
||||
|
@ -7636,7 +7644,7 @@ void command_tuning_mode() {
|
|||
#if defined(FEATURE_SINEWAVE_SIDETONE)
|
||||
void sidetone_adj(int hz) {
|
||||
|
||||
if ((configuration.hz_sidetone + hz) > SIDETONE_HZ_LOW_LIMIT && (configuration.hz_sidetone + hz) < SIDETONE_HZ_HIGH_LIMIT) {
|
||||
if ((configuration.hz_sidetone + hz) > sidetone_hz_limit_low && (configuration.hz_sidetone + hz) < sidetone_hz_limit_high) {
|
||||
configuration.hz_sidetone = configuration.hz_sidetone + hz;
|
||||
compute_sinetone(configuration.hz_sidetone,configuration.sidetone_volume);
|
||||
config_dirty = 1;
|
||||
|
@ -7655,7 +7663,7 @@ void command_tuning_mode() {
|
|||
|
||||
void sidetone_adj(int hz) {
|
||||
|
||||
if ((configuration.hz_sidetone + hz) > SIDETONE_HZ_LOW_LIMIT && (configuration.hz_sidetone + hz) < SIDETONE_HZ_HIGH_LIMIT) {
|
||||
if ((configuration.hz_sidetone + hz) > sidetone_hz_limit_low && (configuration.hz_sidetone + hz) < sidetone_hz_limit_high) {
|
||||
configuration.hz_sidetone = configuration.hz_sidetone + hz;
|
||||
config_dirty = 1;
|
||||
#if defined(FEATURE_DISPLAY) && defined(OPTION_MORE_DISPLAY_MSGS)
|
||||
|
@ -12818,8 +12826,8 @@ void serial_set_pot_low_high(PRIMARY_SERIAL_CLS * port_to_use)
|
|||
#if defined(FEATURE_SERIAL) && defined(FEATURE_COMMAND_LINE_INTERFACE)
|
||||
void serial_set_sidetone_freq(PRIMARY_SERIAL_CLS * port_to_use)
|
||||
{
|
||||
int set_sidetone_hz = serial_get_number_input(4,(SIDETONE_HZ_LOW_LIMIT-1),(SIDETONE_HZ_HIGH_LIMIT+1), port_to_use, RAISE_ERROR_MSG);
|
||||
if ((set_sidetone_hz > SIDETONE_HZ_LOW_LIMIT) && (set_sidetone_hz < SIDETONE_HZ_HIGH_LIMIT)) {
|
||||
int set_sidetone_hz = serial_get_number_input(4,(sidetone_hz_limit_low-1),(sidetone_hz_limit_high+1), port_to_use, RAISE_ERROR_MSG);
|
||||
if ((set_sidetone_hz > sidetone_hz_limit_low) && (set_sidetone_hz < sidetone_hz_limit_high)) {
|
||||
port_to_use->write("\r\nSetting sidetone to ");
|
||||
port_to_use->print(set_sidetone_hz,DEC);
|
||||
port_to_use->println(F(" hz"));
|
||||
|
@ -15611,7 +15619,7 @@ byte play_memory(byte memory_number)
|
|||
input_error = 1;
|
||||
}
|
||||
}
|
||||
if ((input_error != 1) && (int_from_macro > SIDETONE_HZ_LOW_LIMIT) && (int_from_macro < SIDETONE_HZ_HIGH_LIMIT)) {
|
||||
if ((input_error != 1) && (int_from_macro > sidetone_hz_limit_low) && (int_from_macro < sidetone_hz_limit_high)) {
|
||||
configuration.hz_sidetone = int_from_macro;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#define FEATURE_COMMAND_LINE_INTERFACE // Command Line Interface functionality
|
||||
#define FEATURE_MEMORIES // on the Arduino Due, you must have FEATURE_EEPROM_E24C1024 and E24C1024 EEPROM hardware in order to compile this
|
||||
#define FEATURE_MEMORY_MACROS
|
||||
//#define FEATURE_WINKEY_EMULATION // disabling Automatic Software Reset is highly recommended (see documentation)
|
||||
#define FEATURE_WINKEY_EMULATION // disabling Automatic Software Reset is highly recommended (see documentation)
|
||||
// #define FEATURE_BEACON
|
||||
#define FEATURE_TRAINING_COMMAND_LINE_INTERFACE
|
||||
#define FEATURE_POTENTIOMETER // do not enable unless you have a potentiometer connected, otherwise noise will falsely trigger wpm changes
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -8,6 +8,8 @@ GENERIC STM32F103C
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 700 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#define initial_speed_wpm 20 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define initial_speed_wpm 25 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
@ -306,6 +308,8 @@
|
|||
|
||||
#define initial_speed_wpm 17 // "factory default" keyer speed setting
|
||||
#define initial_sidetone_freq 588 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define initial_speed_wpm 30 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 444 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 300 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define initial_speed_wpm 26 // "factory default" keyer speed setting
|
||||
#define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting
|
||||
#define initial_sidetone_freq 600 // "factory default" sidetone frequency setting
|
||||
#define sidetone_hz_limit_low 299
|
||||
#define sidetone_hz_limit_high 2001
|
||||
#define hz_high_beep 1500 // frequency in hertz of high beep
|
||||
#define hz_low_beep 400 // frequency in hertz of low beep
|
||||
#define initial_dah_to_dit_ratio 300 // 300 = 3 / normal 3:1 ratio
|
||||
|
|
Ładowanie…
Reference in New Issue