diff --git a/Config.h b/Config.h index d92f134..0513531 100644 --- a/Config.h +++ b/Config.h @@ -20,7 +20,7 @@ #define CONFIG_H #define MAJ_VERS 0x01 - #define MIN_VERS 0x4a + #define MIN_VERS 0x4b #define MODE_HOST 0x11 #define MODE_TNC 0x12 diff --git a/Makefile b/Makefile index f6c297a..16d1eee 100644 --- a/Makefile +++ b/Makefile @@ -175,8 +175,8 @@ upload-rnode_ng_21: arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:ttgo-lora32 @sleep 1 rnodeconf /dev/ttyACM0 --firmware-hash $$(./partition_hashes ./build/esp32.esp32.ttgo-lora32/RNode_Firmware.ino.bin) - #@sleep 3 - #python ./Release/esptool/esptool.py --chip esp32 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin + @sleep 3 + python ./Release/esptool/esptool.py --chip esp32 --port /dev/ttyACM0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin upload-t3s3: @echo diff --git a/RNode_Firmware.ino b/RNode_Firmware.ino index b085644..66424a6 100644 --- a/RNode_Firmware.ino +++ b/RNode_Firmware.ino @@ -1372,23 +1372,25 @@ void sleep_now() { } void button_event(uint8_t event, unsigned long duration) { - display_unblank(); - if (duration > 6000) { - bt_enable_pairing(); - } else if (duration > 4000) { - #if HAS_CONSOLE - console_active = true; - console_start(); - #endif - } else if (duration > 2000) { - sleep_now(); - } else { - if (bt_state == BT_STATE_OFF) { - bt_start(); + #if MCU_VARIANT == MCU_ESP32 + display_unblank(); + if (duration > 6000) { + bt_enable_pairing(); + } else if (duration > 4000) { + #if HAS_CONSOLE + console_active = true; + console_start(); + #endif + } else if (duration > 2000) { + sleep_now(); } else { - bt_stop(); + if (bt_state == BT_STATE_OFF) { + bt_start(); + } else { + bt_stop(); + } } - } + #endif } volatile bool serial_polling = false; diff --git a/Release/console_image.bin b/Release/console_image.bin index 54bfab5..4af95f3 100644 Binary files a/Release/console_image.bin and b/Release/console_image.bin differ diff --git a/Utilities.h b/Utilities.h index 634dcb4..5e4cfef 100644 --- a/Utilities.h +++ b/Utilities.h @@ -49,6 +49,8 @@ uint8_t eeprom_read(uint32_t mapped_addr); #if HAS_DISPLAY == true #include "Display.h" +#else + void display_unblank() {} #endif #if HAS_BLUETOOTH == true || HAS_BLE == true @@ -1439,14 +1441,16 @@ void da_conf_save(uint8_t dadr) { } void db_conf_save(uint8_t val) { - if (val == 0x00) { - display_blanking_enabled = false; - } else { - display_blanking_enabled = true; - display_blanking_timeout = val*1000; - } - eeprom_update(eeprom_addr(ADDR_CONF_BSET), CONF_OK_BYTE); - eeprom_update(eeprom_addr(ADDR_CONF_DBLK), val); + #if HAS_DISPLAY + if (val == 0x00) { + display_blanking_enabled = false; + } else { + display_blanking_enabled = true; + display_blanking_timeout = val*1000; + } + eeprom_update(eeprom_addr(ADDR_CONF_BSET), CONF_OK_BYTE); + eeprom_update(eeprom_addr(ADDR_CONF_DBLK), val); + #endif } void np_int_conf_save(uint8_t p_int) {