Skip to content

Commit

Permalink
Merge branch 'meshtastic:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Mictronics authored Jan 19, 2024
2 parents 42e7e04 + 2efaaea commit b0e98c9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
5 changes: 4 additions & 1 deletion boards/t-watch-s3.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ build_flags = -Wno-missing-field-initializers
monitor_speed = 115200

lib_deps =
jgromes/RadioLib@^6.3.0
https://github.com/meshtastic/esp8266-oled-ssd1306.git#b38094e03dfa964fbc0e799bc374e91a605c1223 ; ESP8266_SSD1306
jgromes/RadioLib@^6.4.0
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
Expand Down
8 changes: 4 additions & 4 deletions src/graphics/EInkDisplay2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT> *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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -210,6 +209,7 @@ bool EInkDisplay::connect()
adafruitDisplay = new GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT>(*lowLevel);
adafruitDisplay->init();
adafruitDisplay->setRotation(3);
adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight);
}
#elif defined(RAK4630) || defined(MAKERPYTHON)
{
Expand Down Expand Up @@ -274,4 +274,4 @@ bool EInkDisplay::connect()
return true;
}

#endif
#endif
4 changes: 4 additions & 0 deletions src/graphics/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TFTDisplay *>(dispdev)->flipScreenVertically();
#else
dispdev->flipScreenVertically();
#endif
}
#endif

Expand Down
10 changes: 8 additions & 2 deletions src/modules/AdminModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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:
Expand All @@ -329,7 +335,7 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
break;
}

saveChanges(SEGMENT_CONFIG);
saveChanges(changes);
}

void AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c)
Expand Down Expand Up @@ -715,4 +721,4 @@ AdminModule::AdminModule() : ProtobufModule("Admin", meshtastic_PortNum_ADMIN_AP
{
// restrict to the admin channel for rx
boundChannel = Channels::adminChannel;
}
}

0 comments on commit b0e98c9

Please sign in to comment.