diff --git a/k3ng_keyer/k3ng_keyer.ino b/k3ng_keyer/k3ng_keyer.ino index b25dd54..ef8e55e 100644 --- a/k3ng_keyer/k3ng_keyer.ino +++ b/k3ng_keyer/k3ng_keyer.ino @@ -1363,6 +1363,9 @@ Recent Update History 2023.09.21.0033 Additional updates for Raspberry Pi Pico compilation + 2023.09.25.2346 + Fixed HI_TEXT compilation warning + Documentation: https://github.com/k3ng/k3ng_cw_keyer/wiki Support: https://groups.io/g/radioartisan ( Please do not email K3NG directly for support. Thanks ) @@ -13086,7 +13089,7 @@ void cli_extended_commands(PRIMARY_SERIAL_CLS * port_to_use) } } } //while (looping) - #if !defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_ARCH_MBED)|| (defined(ARDUINO_SAM_DUE) && defined(FEATURE_EEPROM_E24C1024)) + #if (!defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_ARCH_MBED) && !defined(ARDUINO_RASPBERRY_PI_PICO_W) && !defined(ARDUINO_RASPBERRY_PI_PICO)) || (defined(ARDUINO_SAM_DUE) && defined(FEATURE_EEPROM_E24C1024)) if (userinput.startsWith("EEPROMDUMP")){cli_eeprom_dump(port_to_use);return;} #endif //#if !defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_ARCH_MBED)|| (defined(ARDUINO_SAM_DUE) && defined(FEATURE_EEPROM_E24C1024)) if (userinput.startsWith("TIMING")){cli_timing_print(port_to_use);return;} @@ -13396,8 +13399,7 @@ void sd_card_save_eeprom_to_file(PRIMARY_SERIAL_CLS * port_to_use,String filenam #endif //defined(FEATURE_SERIAL) && defined(FEATURE_COMMAND_LINE_INTERFACE) && d!defined(OPTION_EXCLUDE_EXTENDED_CLI_COMMANDS) //--------------------------------------------------------------------- -#if defined(FEATURE_SERIAL) && defined(FEATURE_COMMAND_LINE_INTERFACE) && !defined(OPTION_EXCLUDE_EXTENDED_CLI_COMMANDS) -#if !defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_ARCH_MBED)|| (defined(ARDUINO_SAM_DUE) && defined(FEATURE_EEPROM_E24C1024)) +#if defined(FEATURE_SERIAL) && defined(FEATURE_COMMAND_LINE_INTERFACE) && !defined(OPTION_EXCLUDE_EXTENDED_CLI_COMMANDS) && ((!defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_ARCH_MBED) && !defined(ARDUINO_RASPBERRY_PI_PICO_W) && !defined(ARDUINO_RASPBERRY_PI_PICO)) || (defined(ARDUINO_SAM_DUE) && defined(FEATURE_EEPROM_E24C1024))) void cli_eeprom_dump(PRIMARY_SERIAL_CLS * port_to_use){ byte eeprom_byte_in; @@ -13458,8 +13460,7 @@ void cli_eeprom_dump(PRIMARY_SERIAL_CLS * port_to_use){ } } -#endif //#if !defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_ARCH_MBED)|| (defined(ARDUINO_SAM_DUE) && defined(FEATURE_EEPROM_E24C1024)) -#endif //defined(FEATURE_SERIAL) && defined(FEATURE_COMMAND_LINE_INTERFACE) && !defined(OPTION_EXCLUDE_EXTENDED_CLI_COMMANDS) +#endif //--------------------------------------------------------------------- #ifdef FEATURE_PADDLE_ECHO void service_paddle_echo() @@ -17403,15 +17404,8 @@ int memory_end(byte memory_number) { void initialize_pins() { -#if defined (ARDUINO_MAPLE_MINI)||defined(ARDUINO_GENERIC_STM32F103C) //sp5iou 20180329 pinMode (paddle_left, INPUT_PULLUP); pinMode (paddle_right, INPUT_PULLUP); -#else - pinMode (paddle_left, INPUT); - digitalWrite (paddle_left, HIGH); - pinMode (paddle_right, INPUT); - digitalWrite (paddle_right, HIGH); -#endif //defined (ARDUINO_MAPLE_MINI)||defined(ARDUINO_GENERIC_STM32F103C) sp5iou 20180329 #if defined(FEATURE_CAPACITIVE_PADDLE_PINS) if (capactive_paddle_pin_inhibit_pin){ @@ -18454,10 +18448,13 @@ void initialize_display(){ byte oldSideTone = configuration.sidetone_mode; key_tx = 0; configuration.sidetone_mode = SIDETONE_ON; - char* hi_text = HI_TEXT; - for (int x = 0;x < strlen(hi_text);x++){ + + char hi_text[16]; + strcpy(hi_text,HI_TEXT); + for (int x = 0;hi_text[x] != 0;x++){ send_char(hi_text[x],KEYER_NORMAL); } + configuration.sidetone_mode = oldSideTone; key_tx = oldKey; #endif //OPTION_DO_NOT_SAY_HI @@ -22424,9 +22421,9 @@ void so2r_command() { void debug_blink(){ #if defined(DEBUG_STARTUP_BLINKS) - digitalWrite(13,HIGH); + digitalWrite(PIN_LED,HIGH); delay(250); - digitalWrite(13,LOW); + digitalWrite(PIN_LED,LOW); delay(1000); #endif //DEBUG_STARTUP } diff --git a/k3ng_keyer/keyer_dependencies.h b/k3ng_keyer/keyer_dependencies.h index 1a35226..f5547d7 100644 --- a/k3ng_keyer/keyer_dependencies.h +++ b/k3ng_keyer/keyer_dependencies.h @@ -49,3 +49,6 @@ #error "FEATURE_COMMAND_MODE requires FEATURE_BUTTONS" #endif +#if defined(PICO_STDIO_USB_ENABLE_RESET_VIA_BAUD_RATE) +#error "PICO_STDIO_USB_ENABLE_RESET_VIA_BAUD_RATE set" +#endif diff --git a/k3ng_keyer/keyer_features_and_options_test.h b/k3ng_keyer/keyer_features_and_options_test.h index c11eddd..a6d93d9 100644 --- a/k3ng_keyer/keyer_features_and_options_test.h +++ b/k3ng_keyer/keyer_features_and_options_test.h @@ -13,8 +13,8 @@ #if defined(TEST_CONFIG_1) -#define FEATURE_BUTTONS -#define FEATURE_COMMAND_MODE +// #define FEATURE_BUTTONS +// #define FEATURE_COMMAND_MODE // #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 @@ -22,7 +22,7 @@ // #define FEATURE_BEACON // Go into beacon mode if paddle_left pin is LOW at boot up // #define FEATURE_BEACON_SETTING // Go into beacon mode at boot up if EEPROM setting is enabled (\_ CLI Command) // #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 +#define FEATURE_POTENTIOMETER // do not enable unless you have a potentiometer connected, otherwise noise will falsely trigger wpm changes // #define FEATURE_SIDETONE_SWITCH // adds switch control for the sidetone output. requires an external toggle switch (assigned to an arduino pin - see keyer_pin_settings.h). // #define FEATURE_SIDETONE_NEWTONE // Use the NewTone library, ~1k smaller code size than the standard tone library. Uses timer1 (pins 9 or 10) https://bitbucket.org/teckel12/arduino-new-tone/wiki/Home // #define FEATURE_SERIAL_HELP @@ -31,7 +31,7 @@ // #define FEATURE_USB_KEYBOARD // Use a USB keyboard to send code - Uncomment three lines in k3ng_keyer.ino (search for note_usb_uncomment_lines) // #define FEATURE_CW_COMPUTER_KEYBOARD // Have an Arduino Due or Leonardo act as a USB HID (Human Interface Device) keyboard and use the paddle to "type" characters on the computer // #define FEATURE_DEAD_OP_WATCHDOG -#define FEATURE_AUTOSPACE +// #define FEATURE_AUTOSPACE // #define FEATURE_FARNSWORTH // #define FEATURE_DL2SBA_BANKSWITCH // Switch memory banks feature as described here: http://dl2sba.com/index.php?option=com_content&view=article&id=131:nanokeyer&catid=15:shack&Itemid=27#english // #define FEATURE_LCD_4BIT // classic LCD display using 4 I/O lines @@ -72,7 +72,7 @@ // #define FEATURE_SO2R_BASE // SO2R Box base protocol extensions // #define FEATURE_SO2R_SWITCHES // SO2R Box TX and RX switches // #define FEATURE_SO2R_ANTENNA // SO2R Box antenna selection (not fully implemented) -#define FEATURE_COMMAND_MODE_ENHANCED_CMD_ACKNOWLEDGEMENT +// #define FEATURE_COMMAND_MODE_ENHANCED_CMD_ACKNOWLEDGEMENT // #define FEATURE_WEB_SERVER // Details: https://github.com/k3ng/k3ng_cw_keyer/wiki/390-Feature:-Ethernet,-Web-Server,-and-Internet-Linking // #define FEATURE_INTERNET_LINK // Details: https://github.com/k3ng/k3ng_cw_keyer/wiki/390-Feature:-Ethernet,-Web-Server,-and-Internet-Linking @@ -81,8 +81,8 @@ // #define FEATURE_SINEWAVE_SIDETONE_USING_TIMER_3 // Arduino Mega: sidetone_line = 2, 3, or 5 (Further info: https://www.pjrc.com/teensy/td_libs_TimerOne.html) -#define FEATURE_COMMAND_LINE_INTERFACE_ON_SECONDARY_PORT // Activate the Command Line interface on the secondary serial port -#define OPTION_PRIMARY_SERIAL_PORT_DEFAULT_WINKEY_EMULATION // Use when activating both FEATURE_WINKEY_EMULATION and FEATURE_COMMAND_LINE_INTERFACE +// #define FEATURE_COMMAND_LINE_INTERFACE_ON_SECONDARY_PORT // Activate the Command Line interface on the secondary serial port +// #define OPTION_PRIMARY_SERIAL_PORT_DEFAULT_WINKEY_EMULATION // Use when activating both FEATURE_WINKEY_EMULATION and FEATURE_COMMAND_LINE_INTERFACE // simultaneously. This will make Winkey emulation be the default at boot up; // hold command button down at boot up to activate CLI mode @@ -92,7 +92,7 @@ // #define OPTION_WINKEY_DISCARD_BYTES_AT_STARTUP // if ASR is not disabled, you may need this to discard errant serial port bytes at startup // #define OPTION_WINKEY_STRICT_EEPROM_WRITES_MAY_WEAR_OUT_EEPROM // with this activated the unit will write non-volatile settings to EEPROM when set by Winkey commands // #define OPTION_WINKEY_SEND_WORDSPACE_AT_END_OF_BUFFER -#define OPTION_WINKEY_STRICT_HOST_OPEN // require an admin host open Winkey command before doing any other commands +// #define OPTION_WINKEY_STRICT_HOST_OPEN // require an admin host open Winkey command before doing any other commands #define OPTION_WINKEY_2_SUPPORT // comment out to revert to Winkey version 1 emulation //this is removed from other features files - may depricate totally - 2016-09-28 - #define OPTION_WINKEY_SEND_BREAKIN_STATUS_BYTE // additional code to check_dit_paddle() and check_dah_paddle() to send 0xC2 status byte when paddles are hit #define OPTION_WINKEY_INTERRUPTS_MEMORY_REPEAT @@ -148,10 +148,10 @@ // #define OPTION_DFROBOT_LCD_COMMAND_BUTTONS #define OPTION_EXCLUDE_MILL_MODE -// #define OPTION_NO_ULTIMATIC // reduce memory usage by removing ultimatic code. +#define OPTION_NO_ULTIMATIC // reduce memory usage by removing ultimatic code. -// #define OPTION_DISABLE_SERIAL_PORT_CHECKING_WHILE_SENDING_CW +#define OPTION_DISABLE_SERIAL_PORT_CHECKING_WHILE_SENDING_CW // #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 diff --git a/k3ng_keyer/keyer_pin_settings_mortty_regular_with_potentiometer.h b/k3ng_keyer/keyer_pin_settings_mortty_regular_with_potentiometer.h index 556c423..ea602b9 100755 --- a/k3ng_keyer/keyer_pin_settings_mortty_regular_with_potentiometer.h +++ b/k3ng_keyer/keyer_pin_settings_mortty_regular_with_potentiometer.h @@ -11,7 +11,7 @@ #define tx_key_line_5 0 #define tx_key_line_6 0 #define sidetone_line 4 // connect a speaker for sidetone -#define potentiometer A0 // Speed potentiometer (0 to 5 V) Use pot from 1k to 10k +#define potentiometer A0 // Speed potentiometer (0 to 5 V) Use pot from 1k to 10k #define ptt_tx_1 13 // PTT ("push to talk") lines #define ptt_tx_2 0 // Can be used for keying fox transmitter, T/R switch, or keying slow boatanchors #define ptt_tx_3 0 // These are optional - set to 0 if unused diff --git a/k3ng_keyer/keyer_pin_settings_test.h b/k3ng_keyer/keyer_pin_settings_test.h index bd60ee8..7657375 100644 --- a/k3ng_keyer/keyer_pin_settings_test.h +++ b/k3ng_keyer/keyer_pin_settings_test.h @@ -12,20 +12,20 @@ #define keyer_pin_settings_h #define paddle_left 2 -#define paddle_right 5 -#define tx_key_line_1 11 // (high = key down/tx on) -#define tx_key_line_2 13 +#define paddle_right 3 //5 +#define tx_key_line_1 PIN_LED //11 // (high = key down/tx on) +#define tx_key_line_2 0 #define tx_key_line_3 0 #define tx_key_line_4 0 #define tx_key_line_5 0 #define tx_key_line_6 0 #if !defined(FEATURE_ETHERNET) - #define sidetone_line 4 // connect a speaker for sidetone (pin 4 is used by the Ethernet shield!) + #define sidetone_line 6 //4 // connect a speaker for sidetone (pin 4 is used by the Ethernet shield!) #else #define sidetone_line 12 #endif -#define potentiometer A0 // Speed potentiometer (0 to 5 V) Use pot from 1k to 10k -#define ptt_tx_1 13 // PTT ("push to talk") lines +#define potentiometer 28 //A0 // Speed potentiometer (0 to 5 V) Use pot from 1k to 10k +#define ptt_tx_1 0 // PTT ("push to talk") lines #define ptt_tx_2 0 // Can be used for keying fox transmitter, T/R switch, or keying slow boatanchors #define ptt_tx_3 0 // These are optional - set to 0 if unused #define ptt_tx_4 0