From e2a3b0306fa63a1ec1ba3ffabfd9226177b1bc46 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 19 Jan 2024 07:40:14 -0600 Subject: [PATCH 1/5] Default mqtt root to msh/region from unset (#3111) * Default mqtt root to msh/region from unset * Correct segments --- src/modules/AdminModule.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 0b1e72f9aa..e197017988 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -280,6 +280,7 @@ void AdminModule::handleSetOwner(const meshtastic_User &o) void AdminModule::handleSetConfig(const meshtastic_Config &c) { + auto changes = SEGMENT_CONFIG; auto existingRole = config.device.role; bool isRegionUnset = (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET); @@ -320,6 +321,11 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) config.lora = c.payload_variant.lora; if (isRegionUnset && config.lora.region > meshtastic_Config_LoRaConfig_RegionCode_UNSET) { config.lora.tx_enabled = true; + initRegion(); + if (strcmp(moduleConfig.mqtt.root, default_mqtt_root) == 0) { + sprintf(moduleConfig.mqtt.root, "%s/%s", default_mqtt_root, myRegion->name); + changes = SEGMENT_CONFIG | SEGMENT_MODULECONFIG; + } } break; case meshtastic_Config_bluetooth_tag: @@ -329,7 +335,7 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) break; } - saveChanges(SEGMENT_CONFIG); + saveChanges(changes); } void AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c) @@ -715,4 +721,4 @@ AdminModule::AdminModule() : ProtobufModule("Admin", meshtastic_PortNum_ADMIN_AP { // restrict to the admin channel for rx boundChannel = Channels::adminChannel; -} +} \ No newline at end of file From 751bdf94aa18014bd61c5a0eaa802312decf6bd1 Mon Sep 17 00:00:00 2001 From: orange Date: Fri, 19 Jan 2024 16:28:26 +0000 Subject: [PATCH 2/5] Initial Partial Updates on t-echo (#3090) Co-authored-by: Jonathan Bennett Co-authored-by: Ben Meadors --- src/graphics/EInkDisplay2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/graphics/EInkDisplay2.cpp b/src/graphics/EInkDisplay2.cpp index eb716ac030..787b47e1f7 100644 --- a/src/graphics/EInkDisplay2.cpp +++ b/src/graphics/EInkDisplay2.cpp @@ -55,7 +55,7 @@ GxEPD2_BW *adafruitDisplay; EInkDisplay::EInkDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY geometry, HW_I2C i2cBus) { #if defined(TTGO_T_ECHO) - setGeometry(GEOMETRY_RAWMODE, TECHO_DISPLAY_MODEL::WIDTH, TECHO_DISPLAY_MODEL::HEIGHT); + setGeometry(GEOMETRY_RAWMODE, 200, 200); #elif defined(RAK4630) // GxEPD2_213_BN - RAK14000 2.13 inch b/w 250x122 @@ -129,8 +129,7 @@ bool EInkDisplay::forceDisplay(uint32_t msecLimit) LOG_DEBUG("Updating E-Paper... "); #if defined(TTGO_T_ECHO) - // ePaper.Reset(); // wake the screen from sleep - adafruitDisplay->display(false); // FIXME, use partial update mode + adafruitDisplay->nextPage(); #elif defined(RAK4630) || defined(MAKERPYTHON) // RAK14000 2.13 inch b/w 250x122 actually now does support partial updates @@ -210,6 +209,7 @@ bool EInkDisplay::connect() adafruitDisplay = new GxEPD2_BW(*lowLevel); adafruitDisplay->init(); adafruitDisplay->setRotation(3); + adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight); } #elif defined(RAK4630) || defined(MAKERPYTHON) { @@ -274,4 +274,4 @@ bool EInkDisplay::connect() return true; } -#endif +#endif \ No newline at end of file From b489ee08c85839ba8361be08865fd8396593ed34 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 19 Jan 2024 10:53:00 -0600 Subject: [PATCH 3/5] Update radiolib --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index f6d9bcf356..ffc9b73a02 100644 --- a/platformio.ini +++ b/platformio.ini @@ -69,7 +69,7 @@ build_flags = -Wno-missing-field-initializers monitor_speed = 115200 lib_deps = - jgromes/RadioLib@^6.3.0 + jgromes/RadioLib@^6.4.0 https://github.com/meshtastic/esp8266-oled-ssd1306.git#b38094e03dfa964fbc0e799bc374e91a605c1223 ; ESP8266_SSD1306 mathertel/OneButton@^2.5.0 ; OneButton library for non-blocking button debounce https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159 From af157d276a507693d76d24b6dda0e72b0a1732d5 Mon Sep 17 00:00:00 2001 From: Manuel <71137295+mverch67@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:11:19 +0100 Subject: [PATCH 4/5] fix T-Watch flip screen (#3113) --- boards/t-watch-s3.json | 5 ++++- src/graphics/Screen.cpp | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/boards/t-watch-s3.json b/boards/t-watch-s3.json index 080389f39e..e6e3633053 100644 --- a/boards/t-watch-s3.json +++ b/boards/t-watch-s3.json @@ -16,7 +16,10 @@ "f_cpu": "240000000L", "f_flash": "80000000L", "flash_mode": "qio", - "hwids": [["0x303A", "0x1001"]], + "hwids": [ + ["0x303A", "0x1001"], + ["0x303A", "0x0002"] + ], "mcu": "esp32s3", "variant": "t-watch-s3" }, diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 00880ad051..fb27e3c016 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1052,7 +1052,11 @@ void Screen::setup() // Standard behaviour is to FLIP the screen (needed on T-Beam). If this config item is set, unflip it, and thereby logically // flip it. If you have a headache now, you're welcome. if (!config.display.flip_screen) { +#if defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ST7789_CS) || defined(RAK14014) + static_cast(dispdev)->flipScreenVertically(); +#else dispdev->flipScreenVertically(); +#endif } #endif From 2efaaea6257d9dd149149b46b46464930bf4a99b Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 19 Jan 2024 13:14:27 -0600 Subject: [PATCH 5/5] Update oled dep to include RP2040 fix (#3112) --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index ffc9b73a02..e3204f4d9c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -70,7 +70,7 @@ monitor_speed = 115200 lib_deps = jgromes/RadioLib@^6.4.0 - https://github.com/meshtastic/esp8266-oled-ssd1306.git#b38094e03dfa964fbc0e799bc374e91a605c1223 ; ESP8266_SSD1306 + https://github.com/meshtastic/esp8266-oled-ssd1306.git#ee628ee6c9588d4c56c9e3da35f0fc9448ad54a8 ; ESP8266_SSD1306 mathertel/OneButton@^2.5.0 ; OneButton library for non-blocking button debounce https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159 https://github.com/meshtastic/TinyGPSPlus.git#076e8d2c8fb702d9be5b08c55b93ff76f8af7e61