From 32d91ed85944523d358b190c81f5599e70fb2760 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 30 Mar 2025 14:35:51 -0500 Subject: [PATCH 001/100] [create-pull-request] automated change (#6464) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/protobufs b/protobufs index f00e96f12..5e032099b 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit f00e96f12da48abfa9a992f8b5546fd75a370250 +Subproject commit 5e032099be353f1bebdda021bf66e2c90943f4dd diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index daee04f90..2f47d5503 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -326,7 +326,9 @@ typedef enum _meshtastic_ExcludedModules { /* Detection Sensor module */ meshtastic_ExcludedModules_DETECTIONSENSOR_CONFIG = 2048, /* Paxcounter module */ - meshtastic_ExcludedModules_PAXCOUNTER_CONFIG = 4096 + meshtastic_ExcludedModules_PAXCOUNTER_CONFIG = 4096, + /* Bluetooth module */ + meshtastic_ExcludedModules_BLUETOOTH_CONFIG = 8192 } meshtastic_ExcludedModules; /* How the location was acquired: manual, onboard GPS, external (EUD) GPS */ @@ -1122,8 +1124,8 @@ extern "C" { #define _meshtastic_CriticalErrorCode_ARRAYSIZE ((meshtastic_CriticalErrorCode)(meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE+1)) #define _meshtastic_ExcludedModules_MIN meshtastic_ExcludedModules_EXCLUDED_NONE -#define _meshtastic_ExcludedModules_MAX meshtastic_ExcludedModules_PAXCOUNTER_CONFIG -#define _meshtastic_ExcludedModules_ARRAYSIZE ((meshtastic_ExcludedModules)(meshtastic_ExcludedModules_PAXCOUNTER_CONFIG+1)) +#define _meshtastic_ExcludedModules_MAX meshtastic_ExcludedModules_BLUETOOTH_CONFIG +#define _meshtastic_ExcludedModules_ARRAYSIZE ((meshtastic_ExcludedModules)(meshtastic_ExcludedModules_BLUETOOTH_CONFIG+1)) #define _meshtastic_Position_LocSource_MIN meshtastic_Position_LocSource_LOC_UNSET #define _meshtastic_Position_LocSource_MAX meshtastic_Position_LocSource_LOC_EXTERNAL From 95523a9659efe2a4e711d7e42f84e1b99f8a4b54 Mon Sep 17 00:00:00 2001 From: Andrew Yong Date: Mon, 31 Mar 2025 08:21:47 +0800 Subject: [PATCH 002/100] Fix: Update xiao_ble E22-900M30S regulatory gain to 7 dB (#6466) Allow 3 dBm increase in power from previous value of 10 dB gain, based on actual measurements from https://github.com/S5NC/EBYTE_ESP32-S3/blob/main/E22-900M30S%20power%20output%20testing.txt Signed-off-by: Andrew Yong --- variants/xiao_ble/variant.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/variants/xiao_ble/variant.h b/variants/xiao_ble/variant.h index a86ddfde2..d00f8be89 100644 --- a/variants/xiao_ble/variant.h +++ b/variants/xiao_ble/variant.h @@ -143,9 +143,10 @@ static const uint8_t SCK = PIN_SPI_SCK; #define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO3_TCXO_VOLTAGE 1.8 #ifdef EBYTE_E22_900M30S -// 10dB PA gain and 30dB rated output; based on PA output table from Ebyte Robin -#define REGULATORY_GAIN_LORA 10 -#define SX126X_MAX_POWER 20 +// 10dB PA gain and 30dB rated output; based on measurements from +// https://github.com/S5NC/EBYTE_ESP32-S3/blob/main/E22-900M30S%20power%20output%20testing.txt +#define REGULATORY_GAIN_LORA 7 +#define SX126X_MAX_POWER 22 #endif #ifdef EBYTE_E22_900M33S // 25dB PA gain and 33dB rated output; based on TX Power Curve from E22-900M33S_UserManual_EN_v1.0.pdf From e79d4492e8c56458b75d47d8cb3388a76b85bc39 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 30 Mar 2025 20:33:22 -0500 Subject: [PATCH 003/100] [create-pull-request] automated change (#6468) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/protobufs b/protobufs index 5e032099b..484d002a5 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 5e032099be353f1bebdda021bf66e2c90943f4dd +Subproject commit 484d002a52bc20fa9f91ebf1b216d585c5f93a1b diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index 2f47d5503..defaaad28 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -327,8 +327,10 @@ typedef enum _meshtastic_ExcludedModules { meshtastic_ExcludedModules_DETECTIONSENSOR_CONFIG = 2048, /* Paxcounter module */ meshtastic_ExcludedModules_PAXCOUNTER_CONFIG = 4096, - /* Bluetooth module */ - meshtastic_ExcludedModules_BLUETOOTH_CONFIG = 8192 + /* Bluetooth config (not technically a module, but used to indicate bluetooth capabilities) */ + meshtastic_ExcludedModules_BLUETOOTH_CONFIG = 8192, + /* Network config (not technically a module, but used to indicate network capabilities) */ + meshtastic_ExcludedModules_NETWORK_CONFIG = 16384 } meshtastic_ExcludedModules; /* How the location was acquired: manual, onboard GPS, external (EUD) GPS */ @@ -1124,8 +1126,8 @@ extern "C" { #define _meshtastic_CriticalErrorCode_ARRAYSIZE ((meshtastic_CriticalErrorCode)(meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE+1)) #define _meshtastic_ExcludedModules_MIN meshtastic_ExcludedModules_EXCLUDED_NONE -#define _meshtastic_ExcludedModules_MAX meshtastic_ExcludedModules_BLUETOOTH_CONFIG -#define _meshtastic_ExcludedModules_ARRAYSIZE ((meshtastic_ExcludedModules)(meshtastic_ExcludedModules_BLUETOOTH_CONFIG+1)) +#define _meshtastic_ExcludedModules_MAX meshtastic_ExcludedModules_NETWORK_CONFIG +#define _meshtastic_ExcludedModules_ARRAYSIZE ((meshtastic_ExcludedModules)(meshtastic_ExcludedModules_NETWORK_CONFIG+1)) #define _meshtastic_Position_LocSource_MIN meshtastic_Position_LocSource_LOC_UNSET #define _meshtastic_Position_LocSource_MAX meshtastic_Position_LocSource_LOC_EXTERNAL From b52c355f2f560078ff27d2516a8b0ae639c3e1b0 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Mon, 31 Mar 2025 03:37:08 +0200 Subject: [PATCH 004/100] Update ScreenFonts.h (#6412) --- src/graphics/ScreenFonts.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/graphics/ScreenFonts.h b/src/graphics/ScreenFonts.h index 910d1b0b9..079a3e282 100644 --- a/src/graphics/ScreenFonts.h +++ b/src/graphics/ScreenFonts.h @@ -16,6 +16,10 @@ #include "graphics/fonts/OLEDDisplayFontsCS.h" #endif +#ifdef CROWPANEL_ESP32S3_5_EPAPER +#include "graphics/fonts/EinkDisplayFonts.h" +#endif + #ifdef OLED_PL #define FONT_SMALL_LOCAL ArialMT_Plain_10_PL #else @@ -74,13 +78,12 @@ #endif #if defined(CROWPANEL_ESP32S3_5_EPAPER) -#include "graphics/fonts/EinkDisplayFonts.h" #undef FONT_SMALL #undef FONT_MEDIUM #undef FONT_LARGE -#define FONT_SMALL FONT_LARGE_LOCAL // Height: 30 -#define FONT_MEDIUM FONT_LARGE_LOCAL // Height: 30 -#define FONT_LARGE FONT_LARGE_LOCAL // Height: 30 +#define FONT_SMALL Monospaced_plain_30 +#define FONT_MEDIUM Monospaced_plain_30 +#define FONT_LARGE Monospaced_plain_30 #endif #define _fontHeight(font) ((font)[1] + 1) // height is position 1 From e08177ba986d915894d7f95a6a2b498b6c8fee2e Mon Sep 17 00:00:00 2001 From: Tavis Date: Sun, 30 Mar 2025 15:38:24 -1000 Subject: [PATCH 005/100] update to handle ws80 as well (#6440) Small change to make the string parsing of Name = value less brittle. Adds a function to parse a line without knowing how many spaces are after the = sign. This allows it to also work with the ws80 serial output. --- src/modules/SerialModule.cpp | 127 ++++++++++++++++++++--------------- 1 file changed, 72 insertions(+), 55 deletions(-) diff --git a/src/modules/SerialModule.cpp b/src/modules/SerialModule.cpp index f3f23b080..e088b4612 100644 --- a/src/modules/SerialModule.cpp +++ b/src/modules/SerialModule.cpp @@ -408,6 +408,49 @@ uint32_t SerialModule::getBaudRate() return BAUD; } +// Add this structure to help with parsing WindGust = 24.4 serial lines. +struct ParsedLine { + String name; + String value; +}; + +/** + * Parse a line of format "Name = Value" into name/value pair + * @param line Input line to parse + * @return ParsedLine containing name and value, or empty strings if parse failed + */ +ParsedLine parseLine(const char *line) +{ + ParsedLine result = {"", ""}; + + // Find equals sign + const char *equals = strchr(line, '='); + if (!equals) { + return result; + } + + // Extract name by copying substring + char nameBuf[64]; // Temporary buffer + size_t nameLen = equals - line; + if (nameLen >= sizeof(nameBuf)) { + nameLen = sizeof(nameBuf) - 1; + } + strncpy(nameBuf, line, nameLen); + nameBuf[nameLen] = '\0'; + + // Create trimmed name string + String name = String(nameBuf); + name.trim(); + + // Extract value after equals sign + String value = String(equals + 1); + value.trim(); + + result.name = name; + result.value = value; + return result; +} + /** * Process the received weather station serial data, extract wind, voltage, and temperature information, * calculate averages and send telemetry data over the mesh network. @@ -453,6 +496,7 @@ void SerialModule::processWXSerial() // WindSpeed = 0.5 // WindGust = 0.6 // GXTS04Temp = 24.4 + // Temperature = 23.4 // WS80 // RainIntSum = 0 // Rain = 0.0 @@ -471,75 +515,48 @@ void SerialModule::processWXSerial() memset(line, '\0', sizeof(line)); if (lineEnd - lineStart < sizeof(line) - 1) { memcpy(line, &serialBytes[lineStart], lineEnd - lineStart); - if (strstr(line, "Wind") != NULL) // we have a wind line - { - gotwind = true; - // Find the positions of "=" signs in the line - char *windDirPos = strstr(line, "WindDir = "); - char *windSpeedPos = strstr(line, "WindSpeed = "); - char *windGustPos = strstr(line, "WindGust = "); - if (windDirPos != NULL) { - // Extract data after "=" for WindDir - strlcpy(windDir, windDirPos + 15, sizeof(windDir)); // Add 15 to skip "WindDir = " + ParsedLine parsed = parseLine(line); + if (parsed.name.length() > 0) { + if (parsed.name == "WindDir") { + strlcpy(windDir, parsed.value.c_str(), sizeof(windDir)); double radians = GeoCoord::toRadians(strtof(windDir, nullptr)); dir_sum_sin += sin(radians); dir_sum_cos += cos(radians); dirCount++; - } else if (windSpeedPos != NULL) { - // Extract data after "=" for WindSpeed - strlcpy(windVel, windSpeedPos + 15, sizeof(windVel)); // Add 15 to skip "WindSpeed = " + gotwind = true; + } else if (parsed.name == "WindSpeed") { + strlcpy(windVel, parsed.value.c_str(), sizeof(windVel)); float newv = strtof(windVel, nullptr); velSum += newv; velCount++; - if (newv < lull || lull == -1) + if (newv < lull || lull == -1) { lull = newv; - - } else if (windGustPos != NULL) { - strlcpy(windGust, windGustPos + 15, sizeof(windGust)); // Add 15 to skip "WindSpeed = " + } + gotwind = true; + } else if (parsed.name == "WindGust") { + strlcpy(windGust, parsed.value.c_str(), sizeof(windGust)); float newg = strtof(windGust, nullptr); - if (newg > gust) + if (newg > gust) { gust = newg; - } - - // these are also voltage data we care about possibly - } else if (strstr(line, "BatVoltage") != NULL) { // we have a battVoltage line - char *batVoltagePos = strstr(line, "BatVoltage = "); - if (batVoltagePos != NULL) { - strlcpy(batVoltage, batVoltagePos + 17, sizeof(batVoltage)); // 18 for ws 80, 17 for ws85 + } + gotwind = true; + } else if (parsed.name == "BatVoltage") { + strlcpy(batVoltage, parsed.value.c_str(), sizeof(batVoltage)); batVoltageF = strtof(batVoltage, nullptr); break; // last possible data we want so break - } - } else if (strstr(line, "CapVoltage") != NULL) { // we have a cappVoltage line - char *capVoltagePos = strstr(line, "CapVoltage = "); - if (capVoltagePos != NULL) { - strlcpy(capVoltage, capVoltagePos + 17, sizeof(capVoltage)); // 18 for ws 80, 17 for ws85 + } else if (parsed.name == "CapVoltage") { + strlcpy(capVoltage, parsed.value.c_str(), sizeof(capVoltage)); capVoltageF = strtof(capVoltage, nullptr); - } - // GXTS04Temp = 24.4 - } else if (strstr(line, "GXTS04Temp") != NULL) { // we have a temperature line - char *tempPos = strstr(line, "GXTS04Temp = "); - if (tempPos != NULL) { - strlcpy(temperature, tempPos + 15, sizeof(temperature)); // 15 spaces for ws85 + } else if (parsed.name == "GXTS04Temp" || parsed.name == "Temperature") { + strlcpy(temperature, parsed.value.c_str(), sizeof(temperature)); temperatureF = strtof(temperature, nullptr); - } - - } else if (strstr(line, "RainIntSum") != NULL) { // we have a rainsum line - // LOG_INFO(line); - char *pos = strstr(line, "RainIntSum = "); - if (pos != NULL) { - strlcpy(rainStr, pos + 17, sizeof(rainStr)); // 17 spaces for ws85 + } else if (parsed.name == "RainIntSum") { + strlcpy(rainStr, parsed.value.c_str(), sizeof(rainStr)); rainSum = int(strtof(rainStr, nullptr)); - } - - } else if (strstr(line, "Rain") != NULL) { // we have a rain line - if (strstr(line, "WaveRain") == NULL) { // skip WaveRain lines though. - // LOG_INFO(line); - char *pos = strstr(line, "Rain = "); - if (pos != NULL) { - strlcpy(rainStr, pos + 17, sizeof(rainStr)); // 17 spaces for ws85 - rain = strtof(rainStr, nullptr); - } + } else if (parsed.name == "Rain") { + strlcpy(rainStr, parsed.value.c_str(), sizeof(rainStr)); + rain = strtof(rainStr, nullptr); } } @@ -557,7 +574,7 @@ void SerialModule::processWXSerial() } if (gotwind) { - LOG_INFO("WS85 : %i %.1fg%.1f %.1fv %.1fv %.1fC rain: %.1f, %i sum", atoi(windDir), strtof(windVel, nullptr), + LOG_INFO("WS8X : %i %.1fg%.1f %.1fv %.1fv %.1fC rain: %.1f, %i sum", atoi(windDir), strtof(windVel, nullptr), strtof(windGust, nullptr), batVoltageF, capVoltageF, temperatureF, rain, rainSum); } if (gotwind && !Throttle::isWithinTimespanMs(lastAveraged, averageIntervalMillis)) { @@ -607,7 +624,7 @@ void SerialModule::processWXSerial() m.variant.environment_metrics.wind_lull = lull; m.variant.environment_metrics.has_wind_lull = true; - LOG_INFO("WS85 Transmit speed=%fm/s, direction=%d , lull=%f, gust=%f, voltage=%f temperature=%f", + LOG_INFO("WS8X Transmit speed=%fm/s, direction=%d , lull=%f, gust=%f, voltage=%f temperature=%f", m.variant.environment_metrics.wind_speed, m.variant.environment_metrics.wind_direction, m.variant.environment_metrics.wind_lull, m.variant.environment_metrics.wind_gust, m.variant.environment_metrics.voltage, m.variant.environment_metrics.temperature); From 850d21dcb9b7ab82016a464d6c05e5950da6fb9f Mon Sep 17 00:00:00 2001 From: "Jason B. Cox" Date: Sun, 30 Mar 2025 18:39:01 -0700 Subject: [PATCH 006/100] Add a static_assert to verify assumption about NodeInfoLite size (#6428) Co-authored-by: Ben Meadors --- src/mesh/mesh-pb-constants.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesh/mesh-pb-constants.h b/src/mesh/mesh-pb-constants.h index 1c86653dc..f748d295e 100644 --- a/src/mesh/mesh-pb-constants.h +++ b/src/mesh/mesh-pb-constants.h @@ -18,6 +18,10 @@ #define MAX_RX_TOPHONE 32 #endif +/// Verify baseline assumption of node size. If it increases, we need to reevaluate +/// the impact of its memory footprint, notably on MAX_NUM_NODES. +static_assert(sizeof(meshtastic_NodeInfoLite) <= 192, "NodeInfoLite size increased. Reconsider impact on MAX_NUM_NODES."); + /// max number of nodes allowed in the nodeDB #ifndef MAX_NUM_NODES #if defined(ARCH_STM32WL) From f18f60cd0b38cb333a6ca2ebcf28669391b50b85 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 30 Mar 2025 21:47:15 -0400 Subject: [PATCH 007/100] meshtasticd: CH341 / HAT+ Auto Configuration (#6446) --- bin/config-dist.yaml | 6 ++ ...dafruit-RFM9x => lora-Adafruit-RFM9x.yaml} | 0 src/platform/portduino/PortduinoGlue.cpp | 71 +++++++++++++++++-- src/platform/portduino/PortduinoGlue.h | 11 +++ 4 files changed, 84 insertions(+), 4 deletions(-) rename bin/config.d/{lora-Adafruit-RFM9x => lora-Adafruit-RFM9x.yaml} (100%) diff --git a/bin/config-dist.yaml b/bin/config-dist.yaml index da4c192c7..722f80fae 100644 --- a/bin/config-dist.yaml +++ b/bin/config-dist.yaml @@ -6,6 +6,12 @@ ### Including the "Module:" line! --- Lora: + # Default to auto-detecting the module type + # This will be overridden by configs from config.d + Module: auto + +# # Uncomment to enable Simulation mode, or use --sim +# Module: sim # Module: sx1262 # Waveshare SX1302 LISTEN ONLY AT THIS TIME! # CS: 7 diff --git a/bin/config.d/lora-Adafruit-RFM9x b/bin/config.d/lora-Adafruit-RFM9x.yaml similarity index 100% rename from bin/config.d/lora-Adafruit-RFM9x rename to bin/config.d/lora-Adafruit-RFM9x.yaml diff --git a/src/platform/portduino/PortduinoGlue.cpp b/src/platform/portduino/PortduinoGlue.cpp index 7b13971b4..a4050e702 100644 --- a/src/platform/portduino/PortduinoGlue.cpp +++ b/src/platform/portduino/PortduinoGlue.cpp @@ -33,6 +33,7 @@ std::ofstream traceFile; Ch341Hal *ch341Hal = nullptr; char *configPath = nullptr; char *optionMac = nullptr; +bool forceSimulated = false; // FIXME - move setBluetoothEnable into a HALPlatform class void setBluetoothEnable(bool enable) @@ -61,6 +62,9 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) case 'c': configPath = arg; break; + case 's': + forceSimulated = true; + break; case 'h': optionMac = arg; break; @@ -78,6 +82,7 @@ void portduinoCustomInit() static struct argp_option options[] = {{"port", 'p', "PORT", 0, "The TCP port to use."}, {"config", 'c', "CONFIG_PATH", 0, "Full path of the .yaml config file to use."}, {"hwid", 'h', "HWID", 0, "The mac address to assign to this virtual machine"}, + {"sim", 's', 0, 0, "Run in Simulated radio mode"}, {0}}; static void *childArguments; static char doc[] = "Meshtastic native build."; @@ -157,7 +162,9 @@ void portduinoSetup() YAML::Node yamlConfig; - if (configPath != nullptr) { + if (forceSimulated == true) { + settingsMap[use_simradio] = true; + } else if (configPath != nullptr) { if (loadConfig(configPath)) { std::cout << "Using " << configPath << " as config file" << std::endl; } else { @@ -179,7 +186,12 @@ void portduinoSetup() exit(EXIT_FAILURE); } } else { - std::cout << "No 'config.yaml' found, running simulated." << std::endl; + std::cout << "No 'config.yaml' found..." << std::endl; + settingsMap[use_simradio] = true; + } + + if (settingsMap[use_simradio] == true) { + std::cout << "Running in simulated mode." << std::endl; settingsMap[maxnodes] = 200; // Default to 200 nodes settingsMap[logoutputlevel] = level_debug; // Default to debug // Set the random seed equal to TCPPort to have a different seed per instance @@ -197,6 +209,56 @@ void portduinoSetup() } } } + + // If LoRa `Module: auto` (default in config.yaml), + // attempt to auto config based on Product Strings + if (settingsMap[use_autoconf] == true) { + char autoconf_product[96] = {0}; + // Try CH341 + try { + std::cout << "autoconf: Looking for CH341 device..." << std::endl; + ch341Hal = + new Ch341Hal(0, settingsStrings[lora_usb_serial_num], settingsMap[lora_usb_vid], settingsMap[lora_usb_pid]); + ch341Hal->getProductString(autoconf_product, 95); + delete ch341Hal; + std::cout << "autoconf: Found CH341 device " << autoconf_product << std::endl; + } catch (...) { + std::cout << "autoconf: Could not locate CH341 device" << std::endl; + } + // Try Pi HAT+ + std::cout << "autoconf: Looking for Pi HAT+..." << std::endl; + if (access("/proc/device-tree/hat/product", R_OK) == 0) { + std::ifstream hatProductFile("/proc/device-tree/hat/product"); + if (hatProductFile.is_open()) { + hatProductFile.read(autoconf_product, 95); + hatProductFile.close(); + } + std::cout << "autoconf: Found Pi HAT+ " << autoconf_product << " at /proc/device-tree/hat/product" << std::endl; + } else { + std::cout << "autoconf: Could not locate Pi HAT+ at /proc/device-tree/hat/product" << std::endl; + } + // Load the config file based on the product string + if (strlen(autoconf_product) > 0) { + // From configProducts map in PortduinoGlue.h + std::string product_config = ""; + try { + product_config = configProducts.at(autoconf_product); + } catch (std::out_of_range &e) { + std::cerr << "autoconf: Unable to find config for " << autoconf_product << std::endl; + exit(EXIT_FAILURE); + } + if (loadConfig(("/etc/meshtasticd/available.d/" + product_config).c_str())) { + std::cout << "autoconf: Using " << product_config << " as config file for " << autoconf_product << std::endl; + } else { + std::cerr << "autoconf: Unable to use " << product_config << " as config file for " << autoconf_product + << std::endl; + exit(EXIT_FAILURE); + } + } else { + std::cerr << "autoconf: Could not locate any devices" << std::endl; + } + } + // if we're using a usermode driver, we need to initialize it here, to get a serial number back for mac address uint8_t dmac[6] = {0}; if (settingsStrings[spidev] == "ch341") { @@ -358,8 +420,9 @@ bool loadConfig(const char *configPath) const struct { configNames cfgName; std::string strName; - } loraModules[] = {{use_rf95, "RF95"}, {use_sx1262, "sx1262"}, {use_sx1268, "sx1268"}, {use_sx1280, "sx1280"}, - {use_lr1110, "lr1110"}, {use_lr1120, "lr1120"}, {use_lr1121, "lr1121"}, {use_llcc68, "LLCC68"}}; + } loraModules[] = {{use_simradio, "sim"}, {use_autoconf, "auto"}, {use_rf95, "RF95"}, {use_sx1262, "sx1262"}, + {use_sx1268, "sx1268"}, {use_sx1280, "sx1280"}, {use_lr1110, "lr1110"}, {use_lr1120, "lr1120"}, + {use_lr1121, "lr1121"}, {use_llcc68, "LLCC68"}}; for (auto &loraModule : loraModules) { settingsMap[loraModule.cfgName] = false; } diff --git a/src/platform/portduino/PortduinoGlue.h b/src/platform/portduino/PortduinoGlue.h index a52ca88f8..a7aea1c3e 100644 --- a/src/platform/portduino/PortduinoGlue.h +++ b/src/platform/portduino/PortduinoGlue.h @@ -1,9 +1,18 @@ #pragma once #include #include +#include #include "platform/portduino/USBHal.h" +// Product strings for auto-configuration +// {"PRODUCT_STRING", "CONFIG.YAML"} +// YAML paths are relative to `meshtastic/available.d` +inline const std::unordered_map configProducts = {{"MESHTOAD", "lora-usb-meshtoad-e22.yaml"}, + {"MESHSTICK", "lora-meshstick-1262.yaml"}, + {"MESHADV-PI", "lora-MeshAdv-900M30S.yaml"}, + {"POWERPI", "lora-MeshAdv-900M30S.yaml"}}; + enum configNames { default_gpiochip, cs_pin, @@ -34,6 +43,8 @@ enum configNames { rf95_max_power, dio2_as_rf_switch, dio3_tcxo_voltage, + use_simradio, + use_autoconf, use_rf95, use_sx1262, use_sx1268, From f626f02005bfafd0553ebebe8d1db251fae7c8e5 Mon Sep 17 00:00:00 2001 From: Plant Daddy <5402293+PlantDaddy@users.noreply.github.com> Date: Mon, 31 Mar 2025 02:14:48 -0500 Subject: [PATCH 008/100] Add 'bluetooth' option to the LilyGo T-Watch-S3 definition. --- boards/t-watch-s3.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/t-watch-s3.json b/boards/t-watch-s3.json index e6e363305..5d4afd322 100644 --- a/boards/t-watch-s3.json +++ b/boards/t-watch-s3.json @@ -23,7 +23,7 @@ "mcu": "esp32s3", "variant": "t-watch-s3" }, - "connectivity": ["wifi"], + "connectivity": ["wifi", "bluetooth"], "debug": { "openocd_target": "esp32s3.cfg" }, From da26ff5b95d6723cd415d0b328d0eaac32e7e87d Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Mon, 31 Mar 2025 20:15:54 +1300 Subject: [PATCH 009/100] feat: more toggles for InkHUD menu (#6469) GPS on/off Wifi off -> Bluetooth on 12 / 24 hour clock --- src/graphics/niche/InkHUD/Applet.cpp | 7 ++- .../InkHUD/Applets/System/Menu/MenuAction.h | 6 +- .../InkHUD/Applets/System/Menu/MenuApplet.cpp | 63 +++++++++++-------- 3 files changed, 47 insertions(+), 29 deletions(-) diff --git a/src/graphics/niche/InkHUD/Applet.cpp b/src/graphics/niche/InkHUD/Applet.cpp index 9fda9a87e..459f30213 100644 --- a/src/graphics/niche/InkHUD/Applet.cpp +++ b/src/graphics/niche/InkHUD/Applet.cpp @@ -582,9 +582,12 @@ std::string InkHUD::Applet::getTimeString(uint32_t epochSeconds) uint32_t hour = hms / SEC_PER_HOUR; uint32_t min = (hms % SEC_PER_HOUR) / SEC_PER_MIN; - // Format the clock string + // Format the clock string, either 12 hour or 24 hour char clockStr[11]; - sprintf(clockStr, "%u:%02u %s", (hour % 12 == 0 ? 12 : hour % 12), min, hour > 11 ? "PM" : "AM"); + if (config.display.use_12h_clock) + sprintf(clockStr, "%u:%02u %s", (hour % 12 == 0 ? 12 : hour % 12), min, hour > 11 ? "PM" : "AM"); + else + sprintf(clockStr, "%02u:%02u", hour, min); return clockStr; } diff --git a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h index 6950bb110..4f8205647 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h +++ b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h @@ -22,15 +22,17 @@ enum MenuAction { SEND_POSITION, SHUTDOWN, NEXT_TILE, + TOGGLE_BACKLIGHT, + TOGGLE_GPS, + ENABLE_BLUETOOTH, TOGGLE_APPLET, - ACTIVATE_APPLETS, // Todo: remove? Possible redundant, handled by TOGGLE_APPLET? TOGGLE_AUTOSHOW_APPLET, SET_RECENTS, ROTATE, LAYOUT, TOGGLE_BATTERY_ICON, TOGGLE_NOTIFICATIONS, - TOGGLE_BACKLIGHT, + TOGGLE_12H_CLOCK, }; } // namespace NicheGraphics::InkHUD diff --git a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp index 7397f7e9f..4c411bb85 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp +++ b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp @@ -5,8 +5,13 @@ #include "RTC.h" #include "airtime.h" +#include "main.h" #include "power.h" +#if !MESHTASTIC_EXCLUDE_GPS +#include "GPS.h" +#endif + using namespace NicheGraphics; static constexpr uint8_t MENU_TIMEOUT_SEC = 60; // How many seconds before menu auto-closes @@ -161,12 +166,6 @@ void InkHUD::MenuApplet::execute(MenuItem item) case TOGGLE_APPLET: settings->userApplets.active[cursor] = !settings->userApplets.active[cursor]; inkhud->updateAppletSelection(); - // requestUpdate(Drivers::EInk::UpdateTypes::FULL); // Select FULL, seeing how this action doesn't auto exit - break; - - case ACTIVATE_APPLETS: - // Todo: remove this action? Already handled by TOGGLE_APPLET? - inkhud->updateAppletSelection(); break; case TOGGLE_AUTOSHOW_APPLET: @@ -205,6 +204,25 @@ void InkHUD::MenuApplet::execute(MenuItem item) backlight->latch(); break; + case TOGGLE_12H_CLOCK: + config.display.use_12h_clock = !config.display.use_12h_clock; + nodeDB->saveToDisk(SEGMENT_CONFIG); + break; + + case TOGGLE_GPS: + gps->toggleGpsMode(); + nodeDB->saveToDisk(SEGMENT_CONFIG); + break; + + case ENABLE_BLUETOOTH: + // This helps users recover from a bad wifi config + LOG_INFO("Enabling Bluetooth"); + config.network.wifi_enabled = false; + config.bluetooth.enabled = true; + nodeDB->saveToDisk(); + rebootAtMsec = millis() + 2000; + break; + default: LOG_WARN("Action not implemented"); } @@ -242,13 +260,21 @@ void InkHUD::MenuApplet::showPage(MenuPage page) case OPTIONS: // Optional: backlight - if (settings->optionalMenuItems.backlight) { - assert(backlight); + if (settings->optionalMenuItems.backlight) items.push_back(MenuItem(backlight->isLatched() ? "Backlight Off" : "Keep Backlight On", // Label MenuAction::TOGGLE_BACKLIGHT, // Action MenuPage::EXIT // Exit once complete )); - } + + // Optional: GPS + if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_DISABLED) + items.push_back(MenuItem("Enable GPS", MenuAction::TOGGLE_GPS, MenuPage::EXIT)); + if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) + items.push_back(MenuItem("Disable GPS", MenuAction::TOGGLE_GPS, MenuPage::EXIT)); + + // Optional: Enable Bluetooth, in case of lost wifi connection + if (!config.bluetooth.enabled || config.network.wifi_enabled) + items.push_back(MenuItem("Enable Bluetooth", MenuAction::ENABLE_BLUETOOTH, MenuPage::EXIT)); items.push_back(MenuItem("Applets", MenuPage::APPLETS)); items.push_back(MenuItem("Auto-show", MenuPage::AUTOSHOW)); @@ -260,26 +286,14 @@ void InkHUD::MenuApplet::showPage(MenuPage page) &settings->optionalFeatures.notifications)); items.push_back(MenuItem("Battery Icon", MenuAction::TOGGLE_BATTERY_ICON, MenuPage::OPTIONS, &settings->optionalFeatures.batteryIcon)); - - // TODO - GPS and Wifi switches - /* - // Optional: has GPS - if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_DISABLED) - items.push_back(MenuItem("Enable GPS", MenuPage::EXIT)); // TODO - if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) - items.push_back(MenuItem("Disable GPS", MenuPage::EXIT)); // TODO - - // Optional: using wifi - if (!config.bluetooth.enabled) - items.push_back(MenuItem("Enable Bluetooth", MenuPage::EXIT)); // TODO: escape hatch if wifi configured wrong - */ - + items.push_back( + MenuItem("12-Hour Clock", MenuAction::TOGGLE_12H_CLOCK, MenuPage::OPTIONS, &config.display.use_12h_clock)); items.push_back(MenuItem("Exit", MenuPage::EXIT)); break; case APPLETS: populateAppletPage(); - items.push_back(MenuItem("Exit", MenuAction::ACTIVATE_APPLETS)); + items.push_back(MenuItem("Exit", MenuPage::EXIT)); break; case AUTOSHOW: @@ -293,7 +307,6 @@ void InkHUD::MenuApplet::showPage(MenuPage page) case EXIT: sendToBackground(); // Menu applet dismissed, allow normal behavior to resume - // requestUpdate(Drivers::EInk::UpdateTypes::FULL); break; default: From bd2d2981c963bcd86fedf727ae15ebb028e68ff3 Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Mon, 31 Mar 2025 20:17:24 +1300 Subject: [PATCH 010/100] Add InkHUD driver for WeAct Studio 4.2" display module (#6384) * chore: todo.txt * chore: InkHUD documentation Word salad for maintainers * refactor: don't init system applets using onActivate System applets cannot be deactivated, so we will avoid using onActivate / onDeactivate methods entirely. * chore: update the example applets * fix: SSD16XX reset pulse Allow time for controller IC to wake. Aligns with manufacturer's suggestions. T-Echo button timing adjusted to prevent bouncing as a result(?) of slightly faster refreshes. * fix: allow timeout if display update fails Result is not graceful, but avoids total display lockup requiring power cycle. Typical cause of failure is poor wiring / power supply. * fix: improve display health on shutdown Two extra full refreshes, masquerading as a "shutting down" screen. One is drawn white-on-black, to really shake the pixels up. * feat: driver for display HINK_E042A87 As of Feb. 2025, these panels are used for "WeActStudio 4.2in B&W" display modules. * fix: inkhud rotation should default to 0 * Revert "chore: todo.txt" This reverts commit bea7df44a7cbf2f92e8c67c965e53d26a7885b11. * fix: more generous timeout for display updates Previously this was tied to the expected duration of the update, but this didn't account for any delay if our polling thread got held up by an unrelated firmware task. * fix: don't use the full shutdown screen during reboot * fix: cooldown period during the display shutdown display sequence Observed to prevent border pixels from being locked in place with some residual charge? --- src/graphics/niche/Drivers/EInk/EInk.cpp | 22 +- src/graphics/niche/Drivers/EInk/EInk.h | 5 +- .../niche/Drivers/EInk/HINK_E042A87.cpp | 58 ++ .../niche/Drivers/EInk/HINK_E042A87.h | 43 ++ src/graphics/niche/Drivers/EInk/README.md | 49 +- src/graphics/niche/Drivers/EInk/SSD16XX.cpp | 34 +- src/graphics/niche/Drivers/EInk/SSD16XX.h | 2 +- src/graphics/niche/InkHUD/Applet.cpp | 16 +- src/graphics/niche/InkHUD/Applet.h | 3 +- .../BasicExample/BasicExampleApplet.cpp | 2 +- .../NewMsgExample/NewMsgExampleApplet.cpp | 5 +- .../InkHUD/Applets/System/Logo/LogoApplet.cpp | 44 +- .../InkHUD/Applets/System/Logo/LogoApplet.h | 2 + .../InkHUD/Applets/System/Menu/MenuApplet.cpp | 2 - .../InkHUD/Applets/System/Menu/MenuApplet.h | 1 - .../InkHUD/Applets/System/Tips/TipsApplet.cpp | 2 - .../InkHUD/Applets/System/Tips/TipsApplet.h | 1 - src/graphics/niche/InkHUD/Events.cpp | 16 +- src/graphics/niche/InkHUD/Persistence.h | 2 +- src/graphics/niche/InkHUD/README.md | 12 - src/graphics/niche/InkHUD/SystemApplet.h | 2 + src/graphics/niche/InkHUD/docs/README.md | 640 ++++++++++++++++++ src/graphics/niche/InkHUD/docs/appletfont.png | Bin 0 -> 7797 bytes src/graphics/niche/InkHUD/docs/disclaimer.jpg | Bin 0 -> 17942 bytes src/graphics/niche/InkHUD/docs/rendering.gif | Bin 0 -> 78402 bytes .../niche/InkHUD/docs/tile_translation.png | Bin 0 -> 5832 bytes .../heltec_vision_master_e213/nicheGraphics.h | 19 +- .../heltec_vision_master_e290/nicheGraphics.h | 26 +- .../heltec_wireless_paper/nicheGraphics.h | 21 +- variants/t-echo/nicheGraphics.h | 4 +- 30 files changed, 945 insertions(+), 88 deletions(-) create mode 100644 src/graphics/niche/Drivers/EInk/HINK_E042A87.cpp create mode 100644 src/graphics/niche/Drivers/EInk/HINK_E042A87.h delete mode 100644 src/graphics/niche/InkHUD/README.md create mode 100644 src/graphics/niche/InkHUD/docs/README.md create mode 100644 src/graphics/niche/InkHUD/docs/appletfont.png create mode 100644 src/graphics/niche/InkHUD/docs/disclaimer.jpg create mode 100644 src/graphics/niche/InkHUD/docs/rendering.gif create mode 100644 src/graphics/niche/InkHUD/docs/tile_translation.png diff --git a/src/graphics/niche/Drivers/EInk/EInk.cpp b/src/graphics/niche/Drivers/EInk/EInk.cpp index 043788b13..cd2e9dc98 100644 --- a/src/graphics/niche/Drivers/EInk/EInk.cpp +++ b/src/graphics/niche/Drivers/EInk/EInk.cpp @@ -6,7 +6,7 @@ using namespace NicheGraphics::Drivers; // Separate from EInk::begin method, as derived class constructors can probably supply these parameters as constants EInk::EInk(uint16_t width, uint16_t height, UpdateTypes supported) - : concurrency::OSThread("E-Ink Driver"), width(width), height(height), supportedUpdateTypes(supported) + : concurrency::OSThread("EInkDriver"), width(width), height(height), supportedUpdateTypes(supported) { OSThread::disable(); } @@ -31,8 +31,8 @@ bool EInk::supports(UpdateTypes type) void EInk::beginPolling(uint32_t interval, uint32_t expectedDuration) { updateRunning = true; - updateBegunAt = millis(); pollingInterval = interval; + pollingBegunAt = millis(); // To minimize load, we can choose to delay polling for a few seconds, if we know roughly how long the update will take // By default, expectedDuration is 0, and we'll start polling immediately @@ -45,10 +45,26 @@ void EInk::beginPolling(uint32_t interval, uint32_t expectedDuration) // This is what allows us to update the display asynchronously int32_t EInk::runOnce() { + // Check for polling timeout + // Manually set at 10 seconds, in case some big task holds up the firmware's cooperative multitasking + if (millis() - pollingBegunAt > 10000) + failed = true; + + // Handle failure + // - polling timeout + // - other error (derived classes) + if (failed) { + LOG_WARN("Display update failed. Check wiring & power supply."); + updateRunning = false; + failed = false; + return disable(); + } + + // If update not yet done if (!isUpdateDone()) return pollingInterval; // Poll again in a few ms - // If update done: + // If update done finalizeUpdate(); // Any post-update code: power down panel hardware, hibernate, etc updateRunning = false; // Change what we report via EInk::busy() return disable(); // Stop polling diff --git a/src/graphics/niche/Drivers/EInk/EInk.h b/src/graphics/niche/Drivers/EInk/EInk.h index facb8ce72..3c51d4f1d 100644 --- a/src/graphics/niche/Drivers/EInk/EInk.h +++ b/src/graphics/niche/Drivers/EInk/EInk.h @@ -24,7 +24,7 @@ class EInk : private concurrency::OSThread enum UpdateTypes : uint8_t { UNSPECIFIED = 0, FULL = 1 << 0, - FAST = 1 << 1, + FAST = 1 << 1, // "Partial Refresh" }; EInk(uint16_t width, uint16_t height, UpdateTypes supported); @@ -41,14 +41,15 @@ class EInk : private concurrency::OSThread void beginPolling(uint32_t interval, uint32_t expectedDuration); // Begin checking repeatedly if update finished virtual bool isUpdateDone() = 0; // Check once if update finished virtual void finalizeUpdate() {} // Run any post-update code + bool failed = false; // If an error occurred during update private: int32_t runOnce() override; // Repeated checking if update finished const UpdateTypes supportedUpdateTypes; // Capabilities of a derived display class bool updateRunning = false; // see EInk::busy() - uint32_t updateBegunAt = 0; // For initial pause before polling for update completion uint32_t pollingInterval = 0; // How often to check if update complete (ms) + uint32_t pollingBegunAt = 0; // To timeout during polling }; } // namespace NicheGraphics::Drivers diff --git a/src/graphics/niche/Drivers/EInk/HINK_E042A87.cpp b/src/graphics/niche/Drivers/EInk/HINK_E042A87.cpp new file mode 100644 index 000000000..1b72bc4a9 --- /dev/null +++ b/src/graphics/niche/Drivers/EInk/HINK_E042A87.cpp @@ -0,0 +1,58 @@ +#include "./HINK_E042A87.h" + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +using namespace NicheGraphics::Drivers; + +// Load settings about how the pixels are moved from old state to new state during a refresh +// - manually specified, +// - or with stored values from displays OTP memory +void HINK_E042A87::configWaveform() +{ + sendCommand(0x3C); // Border waveform: + sendData(0x01); // Follow LUT for VSH1 + + sendCommand(0x18); // Temperature sensor: + sendData(0x80); // Use internal temperature sensor to select an appropriate refresh waveform +} + +// Describes the sequence of events performed by the displays controller IC during a refresh +// Includes "power up", "load settings from memory", "update the pixels", etc +void HINK_E042A87::configUpdateSequence() +{ + switch (updateType) { + case FAST: + sendCommand(0x21); // Use both "old" and "new" image memory (differential) + sendData(0x00); + sendData(0x00); + + sendCommand(0x22); // Set "update sequence" + sendData(0xFF); // Differential, load waveform from OTP + break; + + case FULL: + default: + sendCommand(0x21); // Bypass "old" image memory (non-differential) + sendData(0x40); + sendData(0x00); + + sendCommand(0x22); // Set "update sequence": + sendData(0xF7); // Non-differential, load waveform from OTP + break; + } +} + +// Once the refresh operation has been started, +// begin periodically polling the display to check for completion, using the normal Meshtastic threading code +// Only used when refresh is "async" +void HINK_E042A87::detachFromUpdate() +{ + switch (updateType) { + case FAST: + return beginPolling(50, 1000); // At least 1 second, then check every 50ms + case FULL: + default: + return beginPolling(100, 3500); // At least 3.5 seconds, then check every 100ms + } +} +#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/HINK_E042A87.h b/src/graphics/niche/Drivers/EInk/HINK_E042A87.h new file mode 100644 index 000000000..ac03b65ef --- /dev/null +++ b/src/graphics/niche/Drivers/EInk/HINK_E042A87.h @@ -0,0 +1,43 @@ +/* + +E-Ink display driver + - HINK-E042A87 + - Manufacturer: Holitech + - Size: 4.2 inch + - Resolution: 400px x 300px + - Flex connector marking: HINK-E042A07-FPC-A1 + - Silver sticker with QR code, marked: HE042A87 + + Note: as of Feb. 2025, these panels are used for "WeActStudio 4.2in B&W" display modules + +*/ + +#pragma once + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +#include "configuration.h" + +#include "./SSD16XX.h" + +namespace NicheGraphics::Drivers +{ +class HINK_E042A87 : public SSD16XX +{ + // Display properties + private: + static constexpr uint32_t width = 400; + static constexpr uint32_t height = 300; + static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST); + + public: + HINK_E042A87() : SSD16XX(width, height, supported) {} + + protected: + void configWaveform() override; + void configUpdateSequence() override; + void detachFromUpdate() override; +}; + +} // namespace NicheGraphics::Drivers +#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/README.md b/src/graphics/niche/Drivers/EInk/README.md index 04a23a31f..eca91c6a8 100644 --- a/src/graphics/niche/Drivers/EInk/README.md +++ b/src/graphics/niche/Drivers/EInk/README.md @@ -28,6 +28,17 @@ void setupNicheGraphics() } ``` +- [Methods](#methods) + - [`update(uint8_t *imageData, UpdateTypes type)`](#updateuint8_t-imagedata-updatetypes-type) + - [`await()`](#await) + - [`supports(UpdateTypes type)`](#supportsupdatetypes-type) + - [`busy()`](#busy) + - [`width()`](#width) + - [`height()`](#height) +- [Supporting New Displays](#supporting-new-displays) + - [Controller IC](#controller-ic) + - [Finding Information](#finding-information) + ## Methods ### `update(uint8_t *imageData, UpdateTypes type)` @@ -37,7 +48,7 @@ Update the image on the display - _`imageData`_ to draw to the display. - _`type`_ which type of update to perform. - `FULL` - - `FAST` + - `FAST` (partial refresh) - (Other custom types may be possible) The imageData is a 1-bit image. X-Pixels are 8-per byte, with the MSB being the leftmost pixel. This was not an InkHUD design decision; it is the raw format accepted by the E-Ink display controllers ICs. @@ -83,3 +94,39 @@ Width of the display, in pixels. Note: most displays are portrait. Your UI will ### `height()` Height of the display, in pixels. Note: most displays are portrait. Your UI will need to implement rotation in software. + +## Supporting New Displays + +_This topic is not covered in depth, but these notes may be helpful._ + +The `InkHUD::Drivers::EInk` class contains only the mechanism for implementing an E-Ink driver on-top of Meshtastic's `OSThread`. A driver for a specific display needs to extend this class. + +### Controller IC + +If your display uses a controller IC from Solomon Systech, you can probably extend the existing `Drivers::SSD16XX` class, making only minor modifications. + +At this stage, displays using controller ICS from other manufacturers (UltraChip, Fitipower, etc) need to manually implemented. See `Drivers::LCMEN2R13EFC1` for an example. + +Generic base classes for manufacturers other than Solomon Systech might be added here in future. + +### Finding Information + +#### Flex-Connector Labels + +The orange flex-connector attached to E-Ink displays is often printed with an identifying label. This is not a _totally_ unique identifier, but does give a very strong clue as to the true model of the display, which can be used to search out further information. + +#### Datasheets + +The manufacturer of a DIY display module may publish a datasheet. These are often incomplete, but might reveal the true model of the display, or the controller IC. + +If you can determine the true model name of the display, you can likely find a more complete datasheet on the display manufacturer's website. This will often provide a "typical operating sequence"; a general overview of the code used to drive the display + +#### Example Code + +The manufacturer of a DIY module may publish example code. You may have more luck finding example code published by the display manufacturer themselves, if you can determine the true model of the panel. These examples are a very valuable reference. + +#### Other E-Ink drivers + +Libraries like ZinggJM's GxEPD2 can be valuable sources of information, although your panel may not be _specifically_ supported, and only _compatible_ with a driver there, so some caution is advised. + +The display selection file in GxEPD2's Hello World example is also a useful resource for matching "flex connector labels" with display models, but the flex connector label is _not_ a unique identifier, so this is only another clue. diff --git a/src/graphics/niche/Drivers/EInk/SSD16XX.cpp b/src/graphics/niche/Drivers/EInk/SSD16XX.cpp index 07d02a2ae..5a5397dbd 100644 --- a/src/graphics/niche/Drivers/EInk/SSD16XX.cpp +++ b/src/graphics/niche/Drivers/EInk/SSD16XX.cpp @@ -37,11 +37,26 @@ void SSD16XX::begin(SPIClass *spi, uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_b reset(); } -void SSD16XX::wait() +// Poll the displays busy pin until an operation is complete +// Timeout and set fail flag if something went wrong and the display got stuck +void SSD16XX::wait(uint32_t timeout) { + // Don't bother waiting if part of the update sequence failed + // In that situation, we're now just failing-through the process, until we can try again with next update. + if (failed) + return; + + uint32_t startMs = millis(); + // Busy when HIGH - while (digitalRead(pin_busy) == HIGH) + while (digitalRead(pin_busy) == HIGH) { + // Check for timeout + if (millis() - startMs > timeout) { + failed = true; + break; + } yield(); + } } void SSD16XX::reset() @@ -50,8 +65,9 @@ void SSD16XX::reset() if (pin_rst != 0xFF) { pinMode(pin_rst, OUTPUT); digitalWrite(pin_rst, LOW); - delay(50); - pinMode(pin_rst, INPUT_PULLUP); + delay(10); + digitalWrite(pin_rst, HIGH); + delay(10); wait(); } @@ -61,6 +77,11 @@ void SSD16XX::reset() void SSD16XX::sendCommand(const uint8_t command) { + // Abort if part of the update sequence failed + // This will unlock again once we have failed-through the entire process + if (failed) + return; + spi->beginTransaction(spiSettings); digitalWrite(pin_dc, LOW); // DC pin low indicates command digitalWrite(pin_cs, LOW); @@ -77,6 +98,11 @@ void SSD16XX::sendData(uint8_t data) void SSD16XX::sendData(const uint8_t *data, uint32_t size) { + // Abort if part of the update sequence failed + // This will unlock again once we have failed-through the entire process + if (failed) + return; + spi->beginTransaction(spiSettings); digitalWrite(pin_dc, HIGH); // DC pin HIGH indicates data, instead of command digitalWrite(pin_cs, LOW); diff --git a/src/graphics/niche/Drivers/EInk/SSD16XX.h b/src/graphics/niche/Drivers/EInk/SSD16XX.h index 88fe4dc25..799a378c0 100644 --- a/src/graphics/niche/Drivers/EInk/SSD16XX.h +++ b/src/graphics/niche/Drivers/EInk/SSD16XX.h @@ -27,7 +27,7 @@ class SSD16XX : public EInk virtual void update(uint8_t *imageData, UpdateTypes type) override; protected: - virtual void wait(); + virtual void wait(uint32_t timeout = 1000); virtual void reset(); virtual void sendCommand(const uint8_t command); virtual void sendData(const uint8_t data); diff --git a/src/graphics/niche/InkHUD/Applet.cpp b/src/graphics/niche/InkHUD/Applet.cpp index 459f30213..6c6245ec3 100644 --- a/src/graphics/niche/InkHUD/Applet.cpp +++ b/src/graphics/niche/InkHUD/Applet.cpp @@ -802,7 +802,7 @@ uint16_t InkHUD::Applet::getLogoHeight(uint16_t limitWidth, uint16_t limitHeight // // \\ */ -void InkHUD::Applet::drawLogo(int16_t centerX, int16_t centerY, uint16_t width, uint16_t height) +void InkHUD::Applet::drawLogo(int16_t centerX, int16_t centerY, uint16_t width, uint16_t height, Color color) { struct Point { int x; @@ -908,24 +908,24 @@ void InkHUD::Applet::drawLogo(int16_t centerX, int16_t centerY, uint16_t width, Point aq2{a2.x - fromPath.x, a2.y - fromPath.y}; Point aq3{a2.x + fromPath.x, a2.y + fromPath.y}; Point aq4{a1.x + fromPath.x, a1.y + fromPath.y}; - fillTriangle(aq1.x, aq1.y, aq2.x, aq2.y, aq3.x, aq3.y, BLACK); - fillTriangle(aq1.x, aq1.y, aq3.x, aq3.y, aq4.x, aq4.y, BLACK); + fillTriangle(aq1.x, aq1.y, aq2.x, aq2.y, aq3.x, aq3.y, color); + fillTriangle(aq1.x, aq1.y, aq3.x, aq3.y, aq4.x, aq4.y, color); // Make the path thick: path b becomes quad b Point bq1{b1.x - fromPath.x, b1.y - fromPath.y}; Point bq2{b2.x - fromPath.x, b2.y - fromPath.y}; Point bq3{b2.x + fromPath.x, b2.y + fromPath.y}; Point bq4{b1.x + fromPath.x, b1.y + fromPath.y}; - fillTriangle(bq1.x, bq1.y, bq2.x, bq2.y, bq3.x, bq3.y, BLACK); - fillTriangle(bq1.x, bq1.y, bq3.x, bq3.y, bq4.x, bq4.y, BLACK); + fillTriangle(bq1.x, bq1.y, bq2.x, bq2.y, bq3.x, bq3.y, color); + fillTriangle(bq1.x, bq1.y, bq3.x, bq3.y, bq4.x, bq4.y, color); // Make the path thick: path c becomes quad c Point cq1{c1.x - fromPath.x, c1.y + fromPath.y}; Point cq2{c2.x - fromPath.x, c2.y + fromPath.y}; Point cq3{c2.x + fromPath.x, c2.y - fromPath.y}; Point cq4{c1.x + fromPath.x, c1.y - fromPath.y}; - fillTriangle(cq1.x, cq1.y, cq2.x, cq2.y, cq3.x, cq3.y, BLACK); - fillTriangle(cq1.x, cq1.y, cq3.x, cq3.y, cq4.x, cq4.y, BLACK); + fillTriangle(cq1.x, cq1.y, cq2.x, cq2.y, cq3.x, cq3.y, color); + fillTriangle(cq1.x, cq1.y, cq3.x, cq3.y, cq4.x, cq4.y, color); // Radius the intersection of quad b and quad c /* @@ -944,7 +944,7 @@ void InkHUD::Applet::drawLogo(int16_t centerX, int16_t centerY, uint16_t width, // The radius for the cap *should* be the same as logoTh, but it's not, due to accumulated rounding // We get better results just re-deriving it int16_t capRad = sqrt(pow(fromPath.x, 2) + pow(fromPath.y, 2)); - fillCircle(b2.x, b2.y, capRad, BLACK); + fillCircle(b2.x, b2.y, capRad, color); } } diff --git a/src/graphics/niche/InkHUD/Applet.h b/src/graphics/niche/InkHUD/Applet.h index 028b24f9c..8f4466647 100644 --- a/src/graphics/niche/InkHUD/Applet.h +++ b/src/graphics/niche/InkHUD/Applet.h @@ -130,7 +130,8 @@ class Applet : public GFX static constexpr float LOGO_ASPECT_RATIO = 1.9; // Width:Height for drawing the Meshtastic logo uint16_t getLogoWidth(uint16_t limitWidth, uint16_t limitHeight); // Size Meshtastic logo to fit within region uint16_t getLogoHeight(uint16_t limitWidth, uint16_t limitHeight); // Size Meshtastic logo to fit within region - void drawLogo(int16_t centerX, int16_t centerY, uint16_t width, uint16_t height); // Draw the meshtastic logo + void drawLogo(int16_t centerX, int16_t centerY, uint16_t width, uint16_t height, + Color color = BLACK); // Draw the Meshtastic logo std::string hexifyNodeNum(NodeNum num); // Style as !0123abdc SignalStrength getSignalStrength(float snr, float rssi); // Interpret SNR and RSSI, as an easy to understand value diff --git a/src/graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.cpp b/src/graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.cpp index 17458ab96..b12ea4809 100644 --- a/src/graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.cpp +++ b/src/graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.cpp @@ -8,7 +8,7 @@ using namespace NicheGraphics; // Our basic example doesn't do anything useful. It just passively prints some text. void InkHUD::BasicExampleApplet::onRender() { - print("Hello, World!"); + printAt(0, 0, "Hello, World!"); } #endif \ No newline at end of file diff --git a/src/graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.cpp b/src/graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.cpp index e31f534ac..6b02f4c92 100644 --- a/src/graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.cpp +++ b/src/graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.cpp @@ -4,11 +4,12 @@ using namespace NicheGraphics; -// We configured MeshModule API to call this method when we receive a new text message +// We configured the Module API to call this method when we receive a new text message ProcessMessage InkHUD::NewMsgExampleApplet::handleReceived(const meshtastic_MeshPacket &mp) { // Abort if applet fully deactivated + // Don't waste time: we wouldn't be rendered anyway if (!isActive()) return ProcessMessage::CONTINUE; @@ -25,7 +26,7 @@ ProcessMessage InkHUD::NewMsgExampleApplet::handleReceived(const meshtastic_Mesh requestUpdate(); } - // Tell MeshModule API to continue informing other firmware components about this message + // Tell Module API to continue informing other firmware components about this message // We're not the only component which is interested in new text messages return ProcessMessage::CONTINUE; } diff --git a/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.cpp b/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.cpp index 24c2d88a4..520b3ef65 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.cpp +++ b/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.cpp @@ -34,7 +34,15 @@ void InkHUD::LogoApplet::onRender() int16_t logoCX = X(0.5); int16_t logoCY = Y(0.5 - 0.05); - drawLogo(logoCX, logoCY, logoW, logoH); + // Invert colors if black-on-white + // Used during shutdown, to resport display health + // Todo: handle this in InkHUD::Renderer instead + if (inverted) { + fillScreen(BLACK); + setTextColor(WHITE); + } + + drawLogo(logoCX, logoCY, logoW, logoH, inverted ? WHITE : BLACK); if (!textLeft.empty()) { setFont(fontSmall); @@ -74,13 +82,45 @@ void InkHUD::LogoApplet::onBackground() // Begin displaying the screen which is shown at shutdown void InkHUD::LogoApplet::onShutdown() { + bringToForeground(); + + textLeft = ""; + textRight = ""; + textTitle = "Shutting Down..."; + fontTitle = fontSmall; + + // Draw a shutting down screen, twice. + // Once white on black, once black on white. + // Intention is to restore display health. + + inverted = true; + inkhud->forceUpdate(Drivers::EInk::FULL, false); + delay(1000); // Cooldown. Back to back updates aren't great for health. + inverted = false; + inkhud->forceUpdate(Drivers::EInk::FULL, false); + delay(1000); // Cooldown + + // Prepare for the powered-off screen now + // We can change these values because the initial "shutting down" screen has already rendered at this point textLeft = ""; textRight = ""; textTitle = owner.short_name; fontTitle = fontLarge; + // This is then drawn by InkHUD::Events::onShutdown, with a blocking FULL update, after InkHUD's flash write is complete +} + +void InkHUD::LogoApplet::onReboot() +{ bringToForeground(); - // This is then drawn by InkHUD::Events::onShutdown, with a blocking FULL update + + textLeft = ""; + textRight = ""; + textTitle = "Rebooting..."; + fontTitle = fontSmall; + + inkhud->forceUpdate(Drivers::EInk::FULL, false); + // Perform the update right now, waiting here until complete } int32_t InkHUD::LogoApplet::runOnce() diff --git a/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.h b/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.h index b55d4a2d9..3f604baed 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.h +++ b/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.h @@ -25,6 +25,7 @@ class LogoApplet : public SystemApplet, public concurrency::OSThread void onForeground() override; void onBackground() override; void onShutdown() override; + void onReboot() override; protected: int32_t runOnce() override; @@ -33,6 +34,7 @@ class LogoApplet : public SystemApplet, public concurrency::OSThread std::string textRight; std::string textTitle; AppletFont fontTitle; + bool inverted = false; // Invert colors. Used during shutdown, to restore display health. }; } // namespace NicheGraphics::InkHUD diff --git a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp index 4c411bb85..f59579230 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp +++ b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp @@ -32,8 +32,6 @@ InkHUD::MenuApplet::MenuApplet() : concurrency::OSThread("MenuApplet") } } -void InkHUD::MenuApplet::onActivate() {} - void InkHUD::MenuApplet::onForeground() { // We do need this before we render, but we can optimize by just calculating it once now diff --git a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.h b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.h index fe72d826b..d9297c8ed 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.h +++ b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.h @@ -21,7 +21,6 @@ class MenuApplet : public SystemApplet, public concurrency::OSThread { public: MenuApplet(); - void onActivate() override; void onForeground() override; void onBackground() override; void onButtonShortPress() override; diff --git a/src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.cpp b/src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.cpp index 1abf3ccfa..82a196cb1 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.cpp +++ b/src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.cpp @@ -207,8 +207,6 @@ void InkHUD::TipsApplet::onBackground() inkhud->forceUpdate(EInk::UpdateTypes::FULL); } -void InkHUD::TipsApplet::onActivate() {} - // While our SystemApplet::handleInput flag is true void InkHUD::TipsApplet::onButtonShortPress() { diff --git a/src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.h b/src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.h index e7bb7bedc..db88585e9 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.h +++ b/src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.h @@ -33,7 +33,6 @@ class TipsApplet : public SystemApplet TipsApplet(); void onRender() override; - void onActivate() override; void onForeground() override; void onBackground() override; void onButtonShortPress() override; diff --git a/src/graphics/niche/InkHUD/Events.cpp b/src/graphics/niche/InkHUD/Events.cpp index 10072b302..ddd01b7e1 100644 --- a/src/graphics/niche/InkHUD/Events.cpp +++ b/src/graphics/niche/InkHUD/Events.cpp @@ -70,6 +70,9 @@ void InkHUD::Events::onButtonLong() // Returns 0 to signal that we agree to sleep now int InkHUD::Events::beforeDeepSleep(void *unused) { + // If a previous display update is in progress, wait for it to complete. + inkhud->awaitUpdate(); + // Notify all applets that we're shutting down for (Applet *ua : inkhud->userApplets) { ua->onDeactivate(); @@ -87,9 +90,12 @@ int InkHUD::Events::beforeDeepSleep(void *unused) inkhud->persistence->saveSettings(); inkhud->persistence->saveLatestMessage(); - // LogoApplet::onShutdown will have requested an update, to draw the shutdown screen - // Draw that now, and wait here until the update is complete + // LogoApplet::onShutdown attempted to heal the display by drawing a "shutting down" screen twice, + // then prepared a final powered-off screen for us, which shows device shortname. + // We're updating to show that one now. + inkhud->forceUpdate(Drivers::EInk::UpdateTypes::FULL, false); + delay(1000); // Cooldown, before potentially yanking display power return 0; // We agree: deep sleep now } @@ -106,16 +112,16 @@ int InkHUD::Events::beforeReboot(void *unused) a->onDeactivate(); a->onShutdown(); } - for (Applet *sa : inkhud->systemApplets) { + for (SystemApplet *sa : inkhud->systemApplets) { // Note: no onDeactivate. System applets are always active. - sa->onShutdown(); + sa->onReboot(); } inkhud->persistence->saveSettings(); inkhud->persistence->saveLatestMessage(); // Note: no forceUpdate call here - // Because OSThread will not be given another chance to run before reboot, this means that no display update will occur + // We don't have any final screen to draw, although LogoApplet::onReboot did already display a "rebooting" screen return 0; // No special status to report. Ignored anyway by this Observable } diff --git a/src/graphics/niche/InkHUD/Persistence.h b/src/graphics/niche/InkHUD/Persistence.h index 28841d4d9..40f1dd521 100644 --- a/src/graphics/niche/InkHUD/Persistence.h +++ b/src/graphics/niche/InkHUD/Persistence.h @@ -99,7 +99,7 @@ class Persistence // Rotation of the display // Multiples of 90 degrees clockwise // Most commonly: rotation is 0 when flex connector is oriented below display - uint8_t rotation = 1; + uint8_t rotation = 0; // How long do we consider another node to be "active"? // Used when applets want to filter for "active nodes" only diff --git a/src/graphics/niche/InkHUD/README.md b/src/graphics/niche/InkHUD/README.md deleted file mode 100644 index 8d788ffa8..000000000 --- a/src/graphics/niche/InkHUD/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# InkHUD - -A heads-up-display for E-Ink devices, intended to supplement a connected phone / client. Implemented as a "NicheGraphics" UI. - -Supported devices (as of 1st Feb. 2025): - -- Heltec Vision Master E213 -- Heltec Vision Master E290 -- Heltec Wireless Paper V1.1 -- LILYGO T-Echo - -More to follow diff --git a/src/graphics/niche/InkHUD/SystemApplet.h b/src/graphics/niche/InkHUD/SystemApplet.h index 0f8ceedc7..7ee47eeb9 100644 --- a/src/graphics/niche/InkHUD/SystemApplet.h +++ b/src/graphics/niche/InkHUD/SystemApplet.h @@ -26,6 +26,8 @@ class SystemApplet : public Applet bool lockRendering = false; // - prevent other applets from being rendered during an update bool lockRequests = false; // - prevent other applets from triggering display updates + virtual void onReboot() { onShutdown(); } // - handle reboot specially + // Other system applets may take precedence over our own system applet though // The order an applet is passed to WindowManager::addSystemApplet determines this hierarchy (added earlier = higher rank) diff --git a/src/graphics/niche/InkHUD/docs/README.md b/src/graphics/niche/InkHUD/docs/README.md new file mode 100644 index 000000000..07fe6c942 --- /dev/null +++ b/src/graphics/niche/InkHUD/docs/README.md @@ -0,0 +1,640 @@ +# InkHUD + +This document is intended as a reference for maintainers. A haphazard collection of notes which _might_ be helpful. + +self deprecating meme + +--- + +- [Purpose](#purpose) +- [Design Principles](#design-principles) + - [Self-Contained](#self-contained) + - [Static](#static) + - [Non-interactive](#non-interactive) + - [Customizable](#customizable) + - [Event-Driven Rendering](#event-driven-rendering) + - [No `#ifdef` spaghetti](#no-ifdef-spaghetti) +- [The Implementation](#the-implementation) +- [The Rendering Process](#the-rendering-process) +- [Concepts](#concepts) + - [NicheGraphics Framework](#nichegraphics-framework) + - [NicheGraphics E-Ink Drivers](#nichegraphics-e-ink-drivers) + - [InkHUD Applets](#inkhud-applets) +- [Adding a Variant](#adding-a-variant) + - [platformio.ini](#platformioini) + - [nicheGraphics.h](#nichegraphicsh) +- [Class Notes](#class-notes) + - [`InkHUD::InkHUD`](#inkhudinkhud) + - [`InkHUD::Persistence`](#inkhudpersistence) + - [`InkHUD::Persistence::Settings`](#inkhudpersistencesettings) + - [`InkHUD::Persistence::LatestMessage`](#inkhudpersistencelatestmessage) + - [`InkHUD::WindowManager`](#inkhudwindowmanager) + - [`InkHUD::Renderer`](#inkhudrenderer) + - [`InkHUD::Renderer::DisplayHealth`](#inkhudrendererdisplayhealth) + - [`InkHUD::Events`](#inkhudevents) + - [`InkHUD::Applet`](#inkhudapplet) + - [`InkHUD::SystemApplet`](#inkhudsystemapplet) + - [`InkHUD::Tile`](#inkhudtile) + - [`InkHUD::AppletFont`](#inkhudappletfont) + +## Purpose + +InkHUD is a minimal UI for E-Ink devices. It displays the user's choice of info, as statically as possible, to minimize the amount of display refreshing. + +It is intended to supplement a connected client app. + +## Design Principles + +### Self-Contained + +- Keep InkHUD code within `/src/graphics/niche/InkHUD`. +- Place reusable components within `/src/graphics/niche`, for other UIs to take advantage of. +- Interact with the firmware code using the **Module API**, **Observables**, and other similarly non-intrusive hooks. + +### Static + +Information should be displayed as statically as possible. Unnecessary updates should be avoided. + +As as example, fixed timestamps are used instead of `X seconds ago` labels, as these need to be constantly updated to remain current. + +### Non-interactive + +InkHUD aims to be a "heads up display". The intention is for the user to glance at the display. The intention is _not_ for the user to frequently interact with the display. + +Some interactivity is tolerated as a means to an end: the display _should_ be customizable, but this should be minimized as much as possible. + +_Edit: there's significant demand for keyboard support, so some sort of free-text feature will need to be added eventually, although it does go against the original design principles._ + +### Customizable + +The user should be given the choice to decide which information they would like to receive, and how they would like to receive it. + +### Event-Driven Rendering + +The display image does not update "automatically". Individual applets are responsible for deciding when they have new information to show, and then requesting a display update. + +### No `#ifdef` spaghetti + +**Don't** use preprocessor macros for device-specific configuration. This should be achieved with config methods, in [`nicheGraphics.h`](#nichegraphicsh). + +**Do** use preprocessor macros to guard all files + +- `#ifdef MESHTASTIC_INCLUDE_INKHUD` for InkHUD files +- `#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS` for reusable components (drivers, etc) + +## The Implementation + +- Variant's platformio.ini file extends `inkhud` (defined in InkHUD/PlatformioConfig.ini) + - original screen class suppressed: `MESHTASTIC_EXCLUDE_SCREEN` + - ButtonThread suppressed: `HAS_BUTTON=0` + - NicheGraphics components included: `MESHTASTIC_INCLUDE_NICHE_GRAPHICS` + - InkHUD components included: `MESHTASTIC_INCLUDE_INKHUD` +- `main.cpp` + - includes `nicheGraphics.h` (from variant folder) + - calls `setupNicheGraphics`, (from nicheGraphics.h) +- `nicheGraphics.h` + - includes InkHUD components + - includes shared NicheGraphics components + - `setupNicheGraphics` + - configures and connects components + - `inkhud->begin` + +## The Rendering Process + +(animated diagram) + +animated process diagram of InkHUD rendering + +An overview: + +- A component calls `requestUpdate` (applets only) or `InkHUD::forceUpdate` +- `Renderer` schedules a render cycle for the next loop(), using `Renderer::runOnce` +- `Renderer` determines whether the update request is valid +- `Renderer` asks relevant applets to render +- Applet dimensions are updated (by Applet's `Tile`) +- Applets generate pixel output, and pass this to their `Tile` +- Tiles shift these "relative" pixels to their true region, for multiplexing +- Tiles pass the pixels to `Renderer` +- `Renderer` applies any global display rotation to the pixels +- `Renderer` combines the pixels into the finished image +- The finished image is passed to the display driver, starting the physical update process + +## Concepts + +### NicheGraphics Framework + +InkHUD is implemented as a _NicheGraphics_ UI. + +Intended as a pattern / philosophy for implementing self-contained UIs, to suit various niche devices, which are best served by their own custom user interface. + +Hypothetical examples: E-Ink, 1602 LCDs, tiny OLEDs, smart watches, etc + +A NicheGraphics UI: + +- Is self-contained +- Makes use of the loose collection of resources (drivers, input methods, etc) gathered in the `/src/graphics/niche` folder. +- Implements a `setupNicheGraphics()` method. + +### NicheGraphics E-Ink Drivers + +InkHUD uses a set of custom E-Ink drivers. These are not based on GxEPD2, or any other code base. They are written directly on-top of the Meshtastic firmware, to make use of the OSThread class for asynchronous display updates. + +Interacting with the drivers is straightforward. InkHUD generates a frame of 1-bit image data. This image data is passed to the driver, along with the type of refresh to use (FULL or FAST). + +`driver->update(uint8_t* buffer, EInk::UpdateTypes::FULL)` + +For more information, see the documentation in `src/graphics/niche/Drivers/EInk` + +### InkHUD Applets + +An InkHUD applet is a class which generates a screen of info for the display. + +Consider: `DMApplet.h` (displays most recent direct message) and `RecentsList.h` (displays a list of recently heard nodes) + +- Applets are modular: they are easy to write, and easy to implement. Users select which applets they want, using the menu. +- Applets use responsive design. They should scale for different screens / layouts / fonts. +- Applets decide when to update. They use the Module API, Observers, etc, to retrieve information, and request a display update when they have something interesting to show. + +See `src/graphics/niche/InkHUD/Applets/Examples` for example code. + +#### Writing an Applet + +Your new applet class will inherit `InkHUD::Applet`. + +```cpp +class BasicExampleApplet : public Applet +{ + public: + // You must have an onRender() method + // All drawing happens here + + void onRender() override; +}; +``` + +The `onRender` method is called when the display image is redrawn. This can happen at any time, so be ready! + +```cpp +// All drawing happens here +// Our basic example doesn't do anything useful. It just passively prints some text. +void InkHUD::BasicExampleApplet::onRender() +{ + printAt(0, 0, "Hello, world!"); +} +``` + +Your applet will need to scale automatically, to suit a variety of screens / layouts / fonts. Make sure you draw relative to applet's size. + +| edge | coordinate | shorthand | +| ------ | ---------- | --------- | +| left | 0 | `X(0.0)` | +| top | 0 | `Y(0.0)` | +| right | `width()` | `X(1.0)` | +| bottom | `height()` | `Y(1.0)` | + +The same principles apply for drawing text. Methods like `AppletFont::lineHeight` and `getTextWidth` are useful here. + +```cpp +std::string line1 = "Line 1"; +printAt(0, Y(0.5), line1); +drawRect(0, Y(0.5), getTextWidth(line1), fontSmall.lineHeight(), BLACK); +``` + +Your applet will only be redrawn when _something_ requests a display update. Your applet is welcome to request a display update, when it determines that it has new info to display, by calling `requestUpdate`. + +Exactly how you determine this, depends on what your applet actually does. Here's a code snippet from one of the example applets. The applet is requesting an update when a new message is received. + +```cpp +// We configured the Module API to call this method when we receive a new text message +ProcessMessage InkHUD::NewMsgExampleApplet::handleReceived(const meshtastic_MeshPacket &mp) +{ + + // Abort if applet fully deactivated + // Don't waste time: we wouldn't be rendered anyway + if (!isActive()) + return ProcessMessage::CONTINUE; + + // Check that this is an incoming message + // Outgoing messages (sent by us) will also call handleReceived + + if (!isFromUs(&mp)) { + // Store the sender's nodenum + // We need to keep this information, so we can re-use it anytime render() is called + haveMessage = true; + fromWho = mp.from; + + // Tell InkHUD that we have something new to show on the screen + requestUpdate(); + } + + // Tell Module API to continue informing other firmware components about this message + // We're not the only component which is interested in new text messages + return ProcessMessage::CONTINUE; +} +``` + +#### Implementing an Applet + +Incorporating your new applet into InkHUD is easy. + +In a variant's `nicheGraphics.h`: + +- `#include` your applet +- `inkhud->addApplet("My Applet", new InkHUD::MyApplet);` + +You will need to add these lines to any variants which will use your applet. + +#### Applet Bases + +If you need to create several similar applets, it might make sense to create a reusable base class. Several of these already exist in `src/graphics/niche/InkHUD/Applets/Bases`, but use these with caution, as they may be modified in future. + +#### System Applets + +So far, we have been talking about "user applets". We also recognize a separate category of "system applets". These handle things like the menu, and the boot screen. These often need special handling, and need to be implemented manually. + +## Adding a Variant + +In `/variants//`: + +### platformio.ini + +Extend `inkhud`, then combine with any other platformio config your hardware variant requires. + +_(Example shows only config required by InkHUD. This is not a complete `env` definition.)_ + +```ini +[env:YOUR_VARIANT-inkhud] +extends = esp32s3_base, inkhud ; or nrf52840_base, etc + +build_src_filter = +${esp32_base.build_src_filter} +${inkhud.build_src_filter} + +build_flags = +${esp32s3_base.build_flags} +${inkhud.build_flags} + +lib_deps = +${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX +${esp32s3_base.lib_deps} +``` + +### nicheGraphics.h + +⚠ Wrap this file in `#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS` + +`nicheGraphics.h` should be placed in the same folder as your variant's `platformio.ini`. If this is not possible, modify `build_src_filter`. + +`nicheGraphics.h` should contain a `setupNicheGraphics` method, which creates and configures the various components for InkHUD. + +- Display + - Start SPI + - Create display driver +- InkHUD + - Create InkHUD instance + - Set E-Ink fast refresh limit (`setDisplayResilience`) + - Set fonts + - Set default user-settings + - Select applets to build (`addApplet`) + - Start InkHUD +- Buttons + - Setup `TwoButton` driver (user button, optional "auxiliary" button) + - Connect to InkHUD handlers (use lambdas) + +For well commented examples, see: + +- `variants/heltec_vision_master_e290/nicheGraphics.h` (ESP32) +- `variants/t-echo/nicheGraphics.h` (NRF52) + +## Class Notes + +### `InkHUD::InkHUD` + +_`src/graphics/niche/InkHUD/InkHUD.h`_ + +- singleton +- mediator between other InkHUD components + +#### `getInstance()` + +Gets access to the class. +First `getInstance` call instantiates the class, and the subclasses: + +- `InkHUD::Persistence` +- `InkHUD::WindowManager` +- `InkHUD::Renderer` +- `InkHUD::Events` + +For convenience, many InkHUD components call this on `begin`, and store it as `InkHUD* inkhud`. + +--- + +### `InkHUD::Persistence` + +_`src/graphics/niche/InkHUD/Persistence.h`_ + +Stores InkHUD data in flash + +- settings +- most recent text message received (both for broadcast and DM) + +In rare cases, applets may store their own specific data separately (e.g. `ThreadedMessageApplet`) + +Data saved only on shutdown / reboot. Not saved if power is removed unexpectedly. + +--- + +### `InkHUD::Persistence::Settings` + +_`src/graphics/niche/InkHUD/Persistence.h`_ + +Settings which relate to InkHUD. Mostly user's customization, but some values record the UI's state (e.g. `tips.safeShutdownSeen`) + +- stored using `FlashData.h` (a shared Niche Graphics tool) +- not encoded as protobufs +- serialized directly as bytes of struct + +#### Defaults + +Global default values are set when the struct is defined (Persistence.h). +Per-variant defaults are set by modifying the values of the settings instance during `setupNicheGraphics()`, before `inkhud->begin` is called. + +```cpp +inkhud->persistence->settings.userTiles.count = 2; +inkhud->persistence->settings.userTiles.maxCount = 4; +inkhud->persistence->settings.rotation = 3; +``` + +By modifying the values at this point, they will be used if we fail to load previous settings from flash (not yet saved, old version, etc) + +--- + +### `InkHUD::Persistence::LatestMessage` + +_`src/graphics/niche/InkHUD/Persistence.h`_ + +Most recently received text message + +- most recent DM +- most recent broadcast + +Collected here, so various user applets don't all have to store their own copy of this info. + +We are unable to use `devicestate.rx_text_message` for this purpose, because: + +- it is cleared by an outgoing text message +- we want to store both a recent broadcast and a recent DM + +#### Saving / Loading + +_A bit of a hack.._ +Stored to flash using `InkHUD::MessageStore`, which is really intended for storing a thread of messages (see `ThreadedMessageApplet`). Used because it stores strings more efficiently than `FlashData.h`. + +The hack is: + +- If most recent message was a DM, we only store the DM. +- If most recent message was a broadcast, we store both a DM and a broadcast. The DM may be 0-length string. + +--- + +### `InkHUD::WindowManager` + +_`src/graphics/niche/InkHUD/WindowManager.h`_ + +Manages which applets are shown, and their size / position (by manipulating the "tiles") + +- owns the `Tile` instances +- creates and destroys tiles; sets size and position: + - at startup + - at runtime, when config changes (layout, rotation, etc) +- activates (or deactivates) applets +- cycling through applets (e.g. on button press) + +The window manager doesn't process pixels; that is handled by the `InkHUD::Tile` objects. + +Note: Some of the methods (incl. `changeLayout`, `changeActivatedApplets`) don't trigger changes themselves. They should be called _after_ the relevant values in `inkhud->persistence->settings` have been modified. + +--- + +### `InkHUD::Renderer` + +_`src/graphics/niche/InkHUD/Renderer.h`_ + +Get pixel output from applets (via a tile), combine, and pass to the driver. + +- triggered by `requestUpdate` or `forceUpdate` +- not run immediately: allows multiple applets to share one render cycle +- calls `Applet::onRender` for relevant applets +- applies global rotation +- passes finalized image to driver + +`requestUpdate` is for applets (user or system). Renderer will honor the request if the applet is visible. `forceUpdate` can be used anywhere, but not from user applets, please. + +#### Asynchronous updates + +`requestUpdate` and `forceUpdate` do not block code execution. They schedule rendering for "ASAP", using `Renderer::runOnce`. Renderer then gets pixel output from relevant applets, and hands the assembled image to the driver. Driver's update process is also asynchronous. If the driver is busy when `requestUpdate` or `forceUpdate` is called, another rendering will run as soon as possible. This is handled by `Renderer::runOnce` + +#### Blocking updates + +If needed, call `forceUpdate` with the optional argument `async=false` to wait while an update runs (> 1 second). Additionally, the `awaitUpdate` method can be used to block until any previous update has completed. An example usage of this is waiting to draw the shutdown screen. + +#### Global rotation + +The exact size / position / rotation of InkHUD applets is configurable by the user. To achieve this, applets draw pixels between 0,0 and `Applet::width()`, `Applet::height()` + +- **Scaling**: Applet's `width()` and `height()` are set by `Tile` before rendering starts +- **Translation**: `Tile` shifts applet pixels up/down/left/right +- **Rotation**: `Renderer` rotates all pixels it receives, before placing them into the final image buffer + +--- + +### `InkHUD::Renderer::DisplayHealth` + +_`src/graphics/niche/InkHUD/DisplayHealth.h`_ + +Responsible for maintaining display health, by optimizing the ratio of FAST vs FULL refreshes + +- count number of FAST vs FULL refreshes (debt) +- suggest either FAST or FULL type +- periodically FULL refresh the display unprovoked, if needed + +#### Background Info + +When the image on an E-Ink display is updated, different procedures can be used to move the pixels to their new states. We have defined two procedures: `FAST` and `FULL`. + +A `FAST` update moves pixels directly from their old position, to their new position. This is aesthetically pleasing, and quick, _but_ it is challenging for the display hardware. If used excessively, pixels can build up residual charge, which negatively impacts the display's lifespan and image quality. + +A `FULL` update first moves all pixels between black and white, before letting them eventually settle at their final position. This causes an unpleasant flashing of the display image, but is best for the display health and image quality. + +Most displays readily tolerate `FAST` updates, so long as a `FULL` update is occasionally performed. How often this `FULL` update is required depends on the display model. + +#### Debt + +`InkHUD::DisplayHealth` records how many `FAST` refreshes have occurred since the previous `FULL` refresh. + +This is referred to as the "full refresh debt". + +If an update of a specific type (`FULL` / `FAST`) is requested / forced, this will be granted. + +If an update is requested / forced _without_ a specified type (`UpdateTypes::UNSPECIFIED`), `DisplayHealth` will select either `FAST` or `FULL`, in an attempt to maintain a target ratio of fast to full updates. + +This target is set by `InkHUD::setDisplayResilience`, when setting up in `nichegraphics.h` + +If an _excessive_ amount of `FAST` refreshes are performed back-to-back, `DisplayHealth` will begin artificially inflating the full refresh debt. This will cause the next few `UNSPECIFIED` updates to _all_ be performed as `FULL`, while the debt is paid down. + +This system of "full refresh debt" allows us to increase perceived responsiveness by tolerating additional strain on the display during periods of user interaction, and attempting to "repair the damage" later, once user interaction ceases. + +#### Maintenance + +The system of "full refresh debt" assumes that the display will perform many updates of `UNSPECIFIED` type between periods of user interaction. Depending on the amount of mesh traffic / applet selection, this may not be the case. + +If debt is particularly high, and no updates are taking place organically, `DisplayHealth` will begin infrequently performing `FULL` updates, purely to pay down the full refresh debt. + +--- + +### `InkHUD::Events` + +Handles events which impact the InkHUD system generally (e.g. shutdown, button press). + +Applets themselves do also listen separately for various events, but for the purpose of gathering information which they would like to display. + +#### Buttons + +Button input is sometimes handled by a system applet. `InkHUD::Events` determines whether the button should be handled by a specific system applet, or should instead trigger a default behavior + +--- + +### `InkHUD::Applet` + +A base class for applets. An applet is one "program", which may show info on the display. + +To oversimplify, all of the InkHUD code "under the hood" only exists to support applets. Applets are what actually shows useful information to the user. This base class exposes the functionality needed to write an applet. + +#### Drawing Methods + +`Applet` implements most AdafruitGFX drawing methods. Exception is the text handling. `printAt`, `printWrapped`, and `printThick` should be used instead. These are intended to be more convenient, but they also implement the character substitution system which powers the foreign alphabet support. + +`Applet` also adds methods for drawing several design elements which are re-used commonly though-out InkHUD. + +#### InkHUD Events + +Applets undergo a number of state changes: activated / deactivated by user, brought to foreground / hidden to background by user button press, etc. The `Applet` class provides a set of virtual methods, which an applet can override to appropriately handle these events. + +The `onRender` virtual method is one example. This is called when an applet is rendered, and should execute all drawing code. An applet _must_ implement this method. + +#### Responsive Design + +An applet's size will vary depending on the screen size, and the user's layout (multiplexing). Immediately before `onRender` is called, an applet's dimensions are updated, so that `width()` and `height()` will give the required size. The applet should draw its graphical elements relative to these values. The methods `X(float)` and `Y(float)` are also provided for convenience. + +| edge | coordinate | shorthand | +| ------ | ---------- | --------- | +| left | 0 | `X(0.0)` | +| top | 0 | `Y(0.0)` | +| right | `width()` | `X(1.0)` | +| bottom | `height()` | `Y(1.0)` | + +The same principles apply for drawing text. Methods like `AppletFont::lineHeight` and `getTextWidth` are useful here. + +Applets should always draw relative to their top left corner, at _x=0, y=0._ The applet's pixels are automatically moved to the correct position on-screen by an InkHUD::Tile. + +#### User Applets + +User applets are the "normal" applets, each one displaying a specific set of information to the user. They can be activated / deactivated at run-time using the on-screen menu. Examples include `DMApplet.h` and `PositionsApplet.h`. User applets are not expected to interact with lower layers of the InkHUD code. + +Users applets are instantiated in a variant's `setupNicheGraphics` method, and passed to `InkHUD::addApplet`. Their class should not be mentioned elsewhere, so that its code can be stripped away during compilation if a variant does not implement the specific applet. Internal processing of user applets treats them all as the generic `Applet` type only. + +#### Activated / Deactivated + +User applets can be activated or deactivated. This changes at run-time: the user selects which applets should be active using the on-screen menu. An applet should not process data while it is deactivated. It can unobserve any observables, ignore `handleReceived` calls, etc. + +An applet can implement the virtual `onActivate` and `onDeactivate` methods to handle this change in state. It can check this state internally by calling `isActive`. + +System applets cannot be deactivated. + +#### Foreground / Background + +An activated applet can either be _foreground_ or _background_. A foreground applet is one which will be rendered to a tile when the screen updates. A background applet will not be drawn. The applet cycling which takes place when the user button is pressed is implemented using foreground / background. + +Regardless of whether it is foreground or background, an activated applet should continue to collect / process data, and request update when it has new info to display. This is because of the _autoshow_ mechanic, which might bring a background applet to foreground in order to display its data. If an applet remains background, its update requests will be safely ignored. + +#### Autoshow + +Autoshow is a feature which allows the user to select which applets (if any) they would like to be shown automatically. If autoshow is enabled for an applet, it will be brought to foreground when it has new information to display. The user grants this privilege on a per-applet basis, using the on-screen menu. If an event causes an applet to be autoshown, NotificationApplet should not be shown for the same event. + +An applet needs to decide when it has information worthy of autoshowing. It signals this by calling `requestAutoshow`, in addition to the usual `requestUpdate` call. + +--- + +### `InkHUD::SystemApplet` + +_System applets_ are applets with special roles, which require special handling. Examples include `BatteryIconApplet.h` and `LogoApplet.h`. These are manually implemented, one-by-one, in `WindowManager.h`. + +This class is a slight extension of `Applet`. It adds extra flags for some special features which are restricted to system applets: exclusive use of the display, and the handling of user input. Having a separate system applet class also allows us to make it clear within the code when system applets are being handled, rather than user applets + +We store reference to these as a `vector`. This parallels how we treat user applets, and makes rendering convenient. +Because system applets do have unique roles, there are times when we will need to interact with a specific applet. Rather than keeping an extra set of references, we access them from the `vector`. Use `InkHUD::getSystemApplet` to access the applet by its `Applet::name` value, and then typecast. + +--- + +### `InkHUD::Tile` + +A tile represents a region of the display. A tile controls the size and position of an applet. + +For an applet to render, it must be assigned to a tile. When an applet is assigned to a tile, the two become linked. The applet is aware of the tile; the tile is aware of the applet. Applets cannot share a tile; assigning a different applet will remove any existing link. + +Before an applet renders, its width and height are set to the dimensions of the tile. During `onRender`, an applet's drawing methods generate pixels between _x=0, y=0_ and _x=Applet::width(), y=Applet::height()_. These pixels are passed to its tile's `Tile::handleAppletPixel` method. The tile then applies x and y offset, "translating" these pixels to the tile's region of the display. These translated pixels are then passed on to the `InkHUD::Renderer`. + +![depiction of a tile translating applet pixels](./tile_translation.png) + +#### User Tiles + +_User applets_ are the "normal" applets. They can be activated / deactivated at run-time using the on-screen menu. User applets are rendered to one of the **user tiles**. + +The user can customize the "layout", using the on-screen menu. Depending on their selected layout, a certain number of _user tiles_ are created. These tiles are automatically positioned and sized so that they fill the entire screen. + +Often, a user will have enabled more applets than they have tiles. Pressing the user-button will cycle through these applets. The old applet is sent to _background_, the new applet is brought to _foreground_. When a user applet is brought to foreground, it becomes assigned to a user tile (the focused tile). When it renders, its size will be set by this tile, and its pixels will be translated to this tile's region. The user applet which was sent to background loses its assignment; it no longer has an assigned tile. + +#### Focused Tile + +The focused tile is one of the user tiles. This is tile whose applet will change when the user button is pressed. This also the tile where the menu will appear on longpress. The focused tile is identified by its index in `vector userTiles`. + +#### Highlighting + +In addition to the user button, some devices have a second "auxiliary button". The function of this button can vary from device to device, but it is sometimes used to focus a different tile. When this happens, the newly focused tile is temporarily "highlighted", by drawing it with a border. This border is automatically removed after several seconds. As drawing code may only be executed by applets, this highlighting is a collaborative effort between a `Tile` and an `Applet`: performed in `Applet::render`, after the virtual `onRender` method has already run. + +Highlighting is only used when `nextTile` is fired by an aux button. It does not occur if performed via the on-screen menu. + +#### System Tiles + +_System applets_ are applets with special roles, which require special handling. Examples include `BatteryIconApplet.h` and `LogoApplet.h`. _Mostly_, these applets do not render to user tiles. Instead, they are given their own unique tile, which is positioned / dimensioned manually. The only reference we keep to these special tiles is stored within the linked system applet. They can be accessed with `Applet::getTile`. + +--- + +### `InkHUD::AppletFont` + +Wrapper which extends the functionality of an AdafruitGFX font. + +#### Dimension Info + +The AppletFont class pre-calculates some info about a font's dimensions, which is useful for design (`AppletFont::lineHeight`), and is used to power InkHUD's custom text handling. + +The default AdafruitGFX text handling places characters "upon a line", as if hand-written on a sheet of ruled paper. `InkHUD::AppletFont` measures the character set of the font, so that we instead draw fixed-height lines of text, positioned by the bounding box, with optional horizontal and vertical alignment. + +![text origins in InkHUD vs AdafruitGFX](./appletfont.png) + +The height of this box is `AppletFont::lineHeight`, which is the height of the tallest character in the font. This gives us a fixed-height for text, which is much tighter than with AdafruitGFX's default line spacing. + +#### UTF-8 Substitutions + +To enable non-English text, the `AppletFont` class includes a mechanism to detect specific UTF-8 characters, and replace them with alternative glyphs from the AdafruitGFX font. This can be used to remap characters for a custom font, or to offer a suitable ASCII replacement. + +```cpp +// With a custom font +// ї is ASCII 0xBF, in Windows-1251 encoding +addSubstitution("ї", "\xBF"); + +// Substitution (with a default font) +addSubstitution("ö", "oe"); +``` + +These substitutions should be performed in a variant's `setupNicheGraphics` method. For convenience, some common ASCII encodings have ready-to-go sets of substitutions you can apply, for example `AppletFont::addSubstitutionsWin1251` diff --git a/src/graphics/niche/InkHUD/docs/appletfont.png b/src/graphics/niche/InkHUD/docs/appletfont.png new file mode 100644 index 0000000000000000000000000000000000000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al 0 HcmV?d00001 diff --git a/src/graphics/niche/InkHUD/docs/disclaimer.jpg b/src/graphics/niche/InkHUD/docs/disclaimer.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d4c2c890e56705770336672cfa426fe449950a1c GIT binary patch literal 17942 zcmb4qRZtvEu=U~&!CiuTg1fu>;_kAz1q&V=77y+$vbald5ANj9Rdq|Q3sAVd3XZ@&UDqGng zWu<`O)u?DP}3CxGwS?|MDP} zhJ^yt-}dj2pu-xpM@8m)xt$@wi;s0@cbp|!&XZfdxDbv=JiFryU0GP=ge}IKLHG zl6;XuFF;dbQ7O(30K?`x19Z)ifJ4c_7tHtfj4AXN_mk-jvkK0h5SymftpF_3t&har z=-oe4hZo1Pm;SZeP0Kv9+Z;Ss-=rXurhD+Pkrfl00a+CzqnDC^E{hu>#bwO68!&OA z-xrGEC*!D2GYb^_c5C*!2qLtmUxuv!6JQ|=@aVcmSW`n6qbU_(ZxC-iCQ(t9#CbgC z6G1L4Mn*XxB)gYIS%E4x?*4M8>Jp0H*V$l{K!Ns-WUW`Z7)lVfAQtgM5ZO)4kfZ~l zv^=K2&WN&s6mM0>Bjp#TcsFMJ&2Fvawtaz1oe2sN=6#tZy7}6IqyhNeufQ7`_|$vi z`_cWJMS?(65*1gUA4Eg1|;h13eGqVO*e{G#szwj??qt-J(P^?>Nc7#cNO)$P;)i;XM`h6?{E#dLG5$q4J*2TFeIQiYy&Rwc;tKOXGg6daCiD4 zSR?1UYE{lm?6U^?UibRp%K~F9M?)UdesKrq-kpk9g#@iS@_!+%BcS-hI&P*ND0r2O!Z3Q zkvvmlN+ep0&)tEiW$@Hco|EWA!Xq}z8G-y-W$o->_zG<9@a_4ewe@3qDKj_5s`uT| z%a4@j>Z}0~g}=Hm%uQcCLdDwJ4*|tC?F9eO50m**(>$gY@qrdWgd@UaFCi*wqLkvA zQ?@nD*3YJ#u2PBNUB#po^xKmTC0X~nhr3GugrDw3-G2`J@e@g|#M7n2Djz4#)?D|tD z7mjI4;i!G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p&lxjApX5=;7>F zTD$45^vC}I0seKBlwy$BKMgK**ZrHk{{RhTWdj=%hmQ0nq5Z1;t1Bo&G=Bd8l@8yE zva+EGp!{n^+5Z5nBL4swtgNbG`Z`1Z0IApfLZh?%HI9<4w08_Wz)>c!{lmg$5wjYGnR#thMv42SC n9Z~+VrYrvd^c#Qh3d+jQi~46{&;J0P1rzr*m6esG;-CN7b|qoB literal 0 HcmV?d00001 diff --git a/src/graphics/niche/InkHUD/docs/rendering.gif b/src/graphics/niche/InkHUD/docs/rendering.gif new file mode 100644 index 0000000000000000000000000000000000000000..cb712381b91c13f5ce3bf7ebe81f998057c57722 GIT binary patch literal 78402 zcmc$_WmsIxzV6#Va0wv^5F{ax;O-8=-QC^Y-QC??8+UiN#@*fBJ$=ZWYp%WSv(G*s z?sKI-!04jnUt`oLs_OT?g2DpKEZT99agaIh0Lj0T0RR9P3%c6(R#fiu6#Oh>jWv*|hjpt-;W?{?f#DTA^XQ`vl z`gZ*%nF=58uPk<^9QeQf`~mMzo4l4b`gn|#)D*hZ)UwIqi4V>!zb{sw%)#R;2YW5S+P=4IXXI0I?_>E+89#N zu&}UDQPWb<(o($Tps;neu+w&;u&^cgrv^TKTU{GtD?4LL3%oxyYU^0q+i~E(Mf!Ia z%&q=it%WV+U)`b9wKS)4(zc?ap``xPrGGMti~paqnw$SSx2>Iw{(r^$zpdC-&e=+z zN=Dz-(%wc_|1CSgpQfx>d2RHy?JRBNEG^Ccxr(RR|6|!dW5L|&tz|xa8)FB3Jpmg_bG*O$%xe5U z$HMYI*7vWndjE4Qzy8OvRByph{duzg@udGrdK*4}F8@7l-@g2N)7% z#K*@}C@U!{$jiyfNJ~jdh>MAe2nz`c@bmHV{Nm=~XJqj`sA_6=dEDZEJD9E?j;rrt| z=vK&g0P;W6$Dg?c00m}lUinQuEL_sYd_39$)*_D3GtMw7E-%<we*OW0LBS!RVc`*xQPDB6aq$U>Ny#axY3Ui6S=l+cdHDr}z@p-k(z5c3 z%Bt#`+Pe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xw1q;a{T0ID3IU7t)Juoa z|B*ZAH|R^E_#B?sPq4~w4F?C)YZl*qwU?1zmLi)P{xUn~v#9y2Ss4IP&-O{|LDkymdW z;kIVwaeIx@Vzn5QlONm+d{-Cq)=7JHS{r>ruOw5B76L0EG! yQrDKeAVwSG)Ia&>z6xV3{`*<(e|#l4?3gl^khhjD8z1{KqPDekI96rulkg9-YVGg< literal 0 HcmV?d00001 diff --git a/variants/heltec_vision_master_e213/nicheGraphics.h b/variants/heltec_vision_master_e213/nicheGraphics.h index b14c72896..75e4423be 100644 --- a/variants/heltec_vision_master_e213/nicheGraphics.h +++ b/variants/heltec_vision_master_e213/nicheGraphics.h @@ -67,25 +67,20 @@ void setupNicheGraphics() InkHUD::Applet::fontSmall.addSubstitutionsWin1251(); */ - // Init settings, and customize defaults + // Customize default settings inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle? inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users inkhud->persistence->settings.optionalMenuItems.nextTile = false; // Behavior handled by aux button instead // Pick applets - // Note: order of applets determines priority of "auto-show" feature - // Optional arguments for defaults: - // - is activated? - // - is autoshown? - // - is foreground on a specific tile (index)? inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown - inkhud->addApplet("DMs", new InkHUD::DMApplet); - inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); - inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); - inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated - inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); - inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0 + inkhud->addApplet("DMs", new InkHUD::DMApplet); // Inactive + inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // Inactive + inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // Inactive + inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated + inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // Inactive + inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0 // inkhud->addApplet("Basic", new InkHUD::BasicExampleApplet); // inkhud->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet); diff --git a/variants/heltec_vision_master_e290/nicheGraphics.h b/variants/heltec_vision_master_e290/nicheGraphics.h index c14ee76ec..2674436b8 100644 --- a/variants/heltec_vision_master_e290/nicheGraphics.h +++ b/variants/heltec_vision_master_e290/nicheGraphics.h @@ -80,25 +80,27 @@ void setupNicheGraphics() InkHUD::Applet::fontSmall.addSubstitutionsWin1251(); */ - // Init settings, and customize defaults + // Customize default settings inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle? inkhud->persistence->settings.rotation = 1; // 90 degrees clockwise inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users inkhud->persistence->settings.optionalMenuItems.nextTile = false; // Behavior handled by aux button instead // Pick applets - // Note: order of applets determines priority of "auto-show" feature - // Optional arguments for defaults: - // - is activated? - // - is autoshown? - // - is foreground on a specific tile (index)? + + // Order of applets determines priority of "auto-show" feature. + // Optional arguments for default state: + // - is activated? + // - is autoshown? + // - is foreground on a specific tile (index)? + inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown - inkhud->addApplet("DMs", new InkHUD::DMApplet); - inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); - inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); - inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated - inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); - inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0 + inkhud->addApplet("DMs", new InkHUD::DMApplet); // Inactive + inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // Inactive + inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // Inactive + inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated + inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // Inactive + inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0 // inkhud->addApplet("Basic", new InkHUD::BasicExampleApplet); // inkhud->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet); diff --git a/variants/heltec_wireless_paper/nicheGraphics.h b/variants/heltec_wireless_paper/nicheGraphics.h index 44405b8f6..ece4225d0 100644 --- a/variants/heltec_wireless_paper/nicheGraphics.h +++ b/variants/heltec_wireless_paper/nicheGraphics.h @@ -67,26 +67,21 @@ void setupNicheGraphics() InkHUD::Applet::fontSmall.addSubstitutionsWin1251(); */ - // Init settings, and customize defaults + // Customize default settings inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle? inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users // Pick applets - // Note: order of applets determines priority of "auto-show" feature - // Optional arguments for defaults: - // - is activated? - // - is autoshown? - // - is foreground on a specific tile (index)? inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown - inkhud->addApplet("DMs", new InkHUD::DMApplet); - inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); - inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); - inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated - inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); - inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0 + inkhud->addApplet("DMs", new InkHUD::DMApplet); // Inactive + inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // Inactive + inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // Inactive + inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated + inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // Inactive + inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0 // inkhud->addApplet("Basic", new InkHUD::BasicExampleApplet); - // inkhud->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet); + // inkhud->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet); // Start running InkHUD inkhud->begin(); diff --git a/variants/t-echo/nicheGraphics.h b/variants/t-echo/nicheGraphics.h index f0ffe4108..e8a9232f1 100644 --- a/variants/t-echo/nicheGraphics.h +++ b/variants/t-echo/nicheGraphics.h @@ -68,8 +68,7 @@ void setupNicheGraphics() InkHUD::Applet::fontSmall.addSubstitutionsWin1251(); */ - // Init settings, and customize defaults - // Values ignored individually if found saved to flash + // Customize default settings inkhud->persistence->settings.userTiles.maxCount = 2; // Two applets side-by-side inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise inkhud->persistence->settings.optionalFeatures.batteryIcon = true; // Device definitely has a battery @@ -106,6 +105,7 @@ void setupNicheGraphics() // Setup the main user button buttons->setWiring(MAIN_BUTTON, BUTTON_PIN, LOW); + buttons->setTiming(MAIN_BUTTON, 75, 500); buttons->setHandlerShortPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->shortpress(); }); buttons->setHandlerLongPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->longpress(); }); From 72db671e007bcccc0cb67c6a44889aed0ad94e59 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 31 Mar 2025 02:54:27 -0500 Subject: [PATCH 011/100] Try-fix some import of configuration inconsistencies (#6364) --- src/modules/AdminModule.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index c04c26a5a..88109bc78 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -265,7 +265,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta disableBluetooth(); LOG_INFO("Commit transaction for edited settings"); hasOpenEditTransaction = false; - saveChanges(SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS); + saveChanges(SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS | SEGMENT_NODEDATABASE); break; } case meshtastic_AdminMessage_get_device_connection_status_request_tag: { @@ -334,7 +334,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta node->position = TypeConversions::ConvertToPositionLite(r->set_fixed_position); nodeDB->setLocalPosition(r->set_fixed_position); config.position.fixed_position = true; - saveChanges(SEGMENT_DEVICESTATE | SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false); + saveChanges(SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false); #if !MESHTASTIC_EXCLUDE_GPS if (gps != nullptr) gps->enable(); @@ -347,7 +347,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta LOG_INFO("Client received remove_fixed_position command"); nodeDB->clearLocalPosition(); config.position.fixed_position = false; - saveChanges(SEGMENT_DEVICESTATE | SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false); + saveChanges(SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false); break; } case meshtastic_AdminMessage_set_time_only_tag: { @@ -574,7 +574,6 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) config.has_position = true; config.position = c.payload_variant.position; // Save nodedb as well in case we got a fixed position packet - saveChanges(SEGMENT_DEVICESTATE, false); break; case meshtastic_Config_power_tag: LOG_INFO("Set config: Power"); From 3314b00fcc9500a722ac3e0fc700871a88ce74dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:16:13 +0200 Subject: [PATCH 012/100] Upgrade trunk (#6471) Co-authored-by: sachaw <11172820+sachaw@users.noreply.github.com> --- .trunk/trunk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 8f938ce9e..4c570c856 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -9,12 +9,12 @@ plugins: lint: enabled: - prettier@3.5.3 - - trufflehog@3.88.18 + - trufflehog@3.88.20 - yamllint@1.37.0 - bandit@1.8.3 - checkov@3.2.394 - terrascan@1.19.9 - - trivy@0.60.0 + - trivy@0.61.0 - taplo@0.9.3 - ruff@0.11.2 - isort@6.0.1 From 39408fd3b1f39c6799caf9d214cc3dd613d4824c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 31 Mar 2025 05:50:53 -0500 Subject: [PATCH 013/100] Disable network config for non-eth_gateway nrf52 and non-W RP2040 targets (#6462) * Disable network config for non-eth_gateway nrf52 and non-W RP2040 targets * Use HAS_ETHERNET logic --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 59cd6d8e9..f8443f9e9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1274,6 +1274,12 @@ extern meshtastic_DeviceMetadata getDeviceMetadata() deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AMBIENTLIGHTING_CONFIG; #endif +#if defined(ARCH_NRF52) && !HAS_ETHERNET // nrf52 doesn't have network unless it's a RAK ethernet gateway currently + deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_NETWORK_CONFIG; // No network on nRF52 +#elif defined(ARCH_RP2040) && !HAS_WIFI && !HAS_ETHERNET + deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_NETWORK_CONFIG; // No network on RP2040 +#endif + #if !(MESHTASTIC_EXCLUDE_PKI) deviceMetadata.hasPKC = true; #endif From 886bffe8f3b1e27b087c7f866129d7d763bc22de Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Tue, 1 Apr 2025 00:03:44 +1300 Subject: [PATCH 014/100] fix: honor user button customization (#6400) Co-authored-by: Ben Meadors --- src/graphics/niche/Inputs/TwoButton.cpp | 38 ++++++++++++++++++- src/graphics/niche/Inputs/TwoButton.h | 4 +- .../heltec_vision_master_e213/nicheGraphics.h | 2 +- .../heltec_vision_master_e290/nicheGraphics.h | 4 +- .../heltec_wireless_paper/nicheGraphics.h | 2 +- variants/t-echo/nicheGraphics.h | 2 +- 6 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/graphics/niche/Inputs/TwoButton.cpp b/src/graphics/niche/Inputs/TwoButton.cpp index 10d89ef41..b270d56cf 100644 --- a/src/graphics/niche/Inputs/TwoButton.cpp +++ b/src/graphics/niche/Inputs/TwoButton.cpp @@ -2,6 +2,7 @@ #include "./TwoButton.h" +#include "NodeDB.h" // For the helper function TwoButton::getUserButtonPin #include "PowerFSM.h" #include "sleep.h" @@ -57,14 +58,47 @@ void TwoButton::stop() detachInterrupt(buttons[1].pin); } +// Attempt to resolve a GPIO pin for the user button, honoring userPrefs.jsonc and device settings +// This helper method isn't used by the TweButton class itself, it could be moved elsewhere. +// Intention is to pass this value to TwoButton::setWiring in the setupNicheGraphics method. +uint8_t TwoButton::getUserButtonPin() +{ + uint8_t pin = 0xFF; // Unset + + // Use default pin for variant, if no better source +#ifdef BUTTON_PIN + pin = BUTTON_PIN; +#endif + + // From userPrefs.jsonc, if set +#ifdef USERPREFS_BUTTON_PIN + pin = USERPREFS_BUTTON_PIN; +#endif + + // From user's override in device settings, if set + if (config.device.button_gpio) + pin = config.device.button_gpio; + + return pin; +} + // Configures the wiring and logic of either button // Called when outlining your NicheGraphics implementation, in variant/nicheGraphics.cpp void TwoButton::setWiring(uint8_t whichButton, uint8_t pin, bool internalPullup) { + // Prevent the same GPIO being assigned to multiple buttons + // Allows an edge case when the user remaps hardware buttons using device settings, due to a broken user button + for (uint8_t i = 0; i < whichButton; i++) { + if (buttons[i].pin == pin) { + LOG_WARN("Attempted reuse of GPIO %d. Ignoring assignment whichButton=%d", pin, whichButton); + return; + } + } + assert(whichButton < 2); buttons[whichButton].pin = pin; - buttons[whichButton].activeLogic = LOW; - buttons[whichButton].mode = internalPullup ? INPUT_PULLUP : INPUT; // fix me + buttons[whichButton].activeLogic = LOW; // Unimplemented + buttons[whichButton].mode = internalPullup ? INPUT_PULLUP : INPUT; pinMode(buttons[whichButton].pin, buttons[whichButton].mode); } diff --git a/src/graphics/niche/Inputs/TwoButton.h b/src/graphics/niche/Inputs/TwoButton.h index 1e1576256..f1e18dd89 100644 --- a/src/graphics/niche/Inputs/TwoButton.h +++ b/src/graphics/niche/Inputs/TwoButton.h @@ -30,6 +30,8 @@ class TwoButton : protected concurrency::OSThread public: typedef std::function Callback; + static uint8_t getUserButtonPin(); // Resolve the GPIO, considering the various possible source of definition + static TwoButton *getInstance(); // Create or get the singleton instance void start(); // Start handling button input void stop(); // Stop handling button input (disconnect ISRs for sleep) @@ -62,7 +64,7 @@ class TwoButton : protected concurrency::OSThread public: // Per-button config uint8_t pin = 0xFF; // 0xFF: unset - bool activeLogic = LOW; // Active LOW by default. Todo: remove, unused + bool activeLogic = LOW; // Active LOW by default. Currently unimplemented. uint8_t mode = INPUT; // Whether to use internal pull up / pull down resistors uint32_t debounceLength = 50; // Minimum length for shortpress, in ms uint32_t longpressLength = 500; // How long after button down to fire longpress, in ms diff --git a/variants/heltec_vision_master_e213/nicheGraphics.h b/variants/heltec_vision_master_e213/nicheGraphics.h index 75e4423be..d6983bafe 100644 --- a/variants/heltec_vision_master_e213/nicheGraphics.h +++ b/variants/heltec_vision_master_e213/nicheGraphics.h @@ -95,7 +95,7 @@ void setupNicheGraphics() constexpr uint8_t AUX_BUTTON = 1; // Setup the main user button - buttons->setWiring(MAIN_BUTTON, BUTTON_PIN); + buttons->setWiring(MAIN_BUTTON, Inputs::TwoButton::getUserButtonPin()); buttons->setHandlerShortPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->shortpress(); }); buttons->setHandlerLongPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->longpress(); }); diff --git a/variants/heltec_vision_master_e290/nicheGraphics.h b/variants/heltec_vision_master_e290/nicheGraphics.h index 2674436b8..c2f26c7ff 100644 --- a/variants/heltec_vision_master_e290/nicheGraphics.h +++ b/variants/heltec_vision_master_e290/nicheGraphics.h @@ -19,7 +19,7 @@ Different NicheGraphics UIs and different hardware variants will each have their // InkHUD-specific components // --------------------------- -#include "graphics/niche/InkHUD/WindowManager.h" +#include "graphics/niche/InkHUD/InkHUD.h" // Applets #include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h" @@ -113,7 +113,7 @@ void setupNicheGraphics() Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // A shared NicheGraphics component // Setup the main user button (0) - buttons->setWiring(0, BUTTON_PIN); + buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin()); buttons->setHandlerShortPress(0, []() { InkHUD::InkHUD::getInstance()->shortpress(); }); buttons->setHandlerLongPress(0, []() { InkHUD::InkHUD::getInstance()->longpress(); }); diff --git a/variants/heltec_wireless_paper/nicheGraphics.h b/variants/heltec_wireless_paper/nicheGraphics.h index ece4225d0..5e938fa64 100644 --- a/variants/heltec_wireless_paper/nicheGraphics.h +++ b/variants/heltec_wireless_paper/nicheGraphics.h @@ -93,7 +93,7 @@ void setupNicheGraphics() constexpr uint8_t MAIN_BUTTON = 0; // Setup the main user button - buttons->setWiring(MAIN_BUTTON, BUTTON_PIN); + buttons->setWiring(MAIN_BUTTON, Inputs::TwoButton::getUserButtonPin()); buttons->setHandlerShortPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->shortpress(); }); buttons->setHandlerLongPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->longpress(); }); diff --git a/variants/t-echo/nicheGraphics.h b/variants/t-echo/nicheGraphics.h index e8a9232f1..f5dde6b19 100644 --- a/variants/t-echo/nicheGraphics.h +++ b/variants/t-echo/nicheGraphics.h @@ -104,7 +104,7 @@ void setupNicheGraphics() constexpr uint8_t TOUCH_BUTTON = 1; // Setup the main user button - buttons->setWiring(MAIN_BUTTON, BUTTON_PIN, LOW); + buttons->setWiring(MAIN_BUTTON, Inputs::TwoButton::getUserButtonPin()); buttons->setTiming(MAIN_BUTTON, 75, 500); buttons->setHandlerShortPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->shortpress(); }); buttons->setHandlerLongPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->longpress(); }); From a5efbfccd784f77784ec429794378b599476935e Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 31 Mar 2025 06:32:54 -0500 Subject: [PATCH 015/100] Disable bluetooth config on rp2040, portduino (for now), and stm32 (#6465) * Disable bluetooth config on rp2040, portduino (for now), and stm32 * Add comments and exclude C6 --- src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index f8443f9e9..05eeef2ae 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1274,6 +1274,13 @@ extern meshtastic_DeviceMetadata getDeviceMetadata() deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AMBIENTLIGHTING_CONFIG; #endif +// No bluetooth on these targets (yet): +// Pico W / 2W may get it at some point +// Portduino and ESP32-C6 are excluded because we don't have a working bluetooth stacks integrated yet. +#if defined(ARCH_RP2040) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL) || defined(CONFIG_IDF_TARGET_ESP32C6) + deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_BLUETOOTH_CONFIG; +#endif + #if defined(ARCH_NRF52) && !HAS_ETHERNET // nrf52 doesn't have network unless it's a RAK ethernet gateway currently deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_NETWORK_CONFIG; // No network on nRF52 #elif defined(ARCH_RP2040) && !HAS_WIFI && !HAS_ETHERNET From 2c01fad798e17bcc5e6feb4644ba15c12e32fffa Mon Sep 17 00:00:00 2001 From: Austin Date: Mon, 31 Mar 2025 08:31:54 -0400 Subject: [PATCH 016/100] meshtasticd: Add FrequencyLabs MeshAdv-Mini Hat (#6458) --- bin/config.d/lora-MeshAdv-900M30S.yaml | 4 +++- bin/config.d/lora-MeshAdv-Mini-900M22S.yaml | 11 +++++++++++ src/platform/portduino/PortduinoGlue.h | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 bin/config.d/lora-MeshAdv-Mini-900M22S.yaml diff --git a/bin/config.d/lora-MeshAdv-900M30S.yaml b/bin/config.d/lora-MeshAdv-900M30S.yaml index 113901d5e..5c148bf68 100644 --- a/bin/config.d/lora-MeshAdv-900M30S.yaml +++ b/bin/config.d/lora-MeshAdv-900M30S.yaml @@ -1,3 +1,5 @@ +# MeshAdv-Pi E22-900M30S +# https://github.com/chrismyers2000/MeshAdv-Pi-Hat Lora: Module: sx1262 CS: 21 @@ -9,4 +11,4 @@ Lora: DIO3_TCXO_VOLTAGE: true # Only for E22-900M33S: # Limit the output power to 8 dBm - # SX126X_MAX_POWER: 8 \ No newline at end of file + # SX126X_MAX_POWER: 8 diff --git a/bin/config.d/lora-MeshAdv-Mini-900M22S.yaml b/bin/config.d/lora-MeshAdv-Mini-900M22S.yaml new file mode 100644 index 000000000..554116b57 --- /dev/null +++ b/bin/config.d/lora-MeshAdv-Mini-900M22S.yaml @@ -0,0 +1,11 @@ +# MeshAdv Mini E22-900M22S +# https://github.com/chrismyers2000/MeshAdv-Mini +Lora: + Module: sx1262 # Ebyte E22-900M22S + CS: 8 + IRQ: 16 + Busy: 20 + Reset: 24 + TXen: 13 + DIO2_AS_RF_SWITCH: true + DIO3_TCXO_VOLTAGE: true diff --git a/src/platform/portduino/PortduinoGlue.h b/src/platform/portduino/PortduinoGlue.h index a7aea1c3e..4e074be71 100644 --- a/src/platform/portduino/PortduinoGlue.h +++ b/src/platform/portduino/PortduinoGlue.h @@ -11,6 +11,7 @@ inline const std::unordered_map configProducts = {{"MESHTOAD", "lora-usb-meshtoad-e22.yaml"}, {"MESHSTICK", "lora-meshstick-1262.yaml"}, {"MESHADV-PI", "lora-MeshAdv-900M30S.yaml"}, + {"MESHADV-MINI", "lora-MeshAdv-Mini-900M22S.yaml"}, {"POWERPI", "lora-MeshAdv-900M30S.yaml"}}; enum configNames { From ae887590594de8e573ca2ce16334f5534ce34155 Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Tue, 1 Apr 2025 13:08:23 +1300 Subject: [PATCH 017/100] draft an InkHUD variant for Elecrow Thinknode M1 (#6473) Only an initial guess. No hardware here yet for testing. Button assignments are largely placeholder. Co-authored-by: Ben Meadors --- variants/ELECROW-ThinkNode-M1/nicheGraphics.h | 119 ++++++++++++++++++ variants/ELECROW-ThinkNode-M1/platformio.ini | 22 +++- variants/ELECROW-ThinkNode-M1/variant.h | 2 - 3 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 variants/ELECROW-ThinkNode-M1/nicheGraphics.h diff --git a/variants/ELECROW-ThinkNode-M1/nicheGraphics.h b/variants/ELECROW-ThinkNode-M1/nicheGraphics.h new file mode 100644 index 000000000..f68ac9edd --- /dev/null +++ b/variants/ELECROW-ThinkNode-M1/nicheGraphics.h @@ -0,0 +1,119 @@ +#pragma once + +#include "configuration.h" + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +// InkHUD-specific components +// --------------------------- +#include "graphics/niche/InkHUD/InkHUD.h" + +// Applets +#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h" +#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h" +#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h" +#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h" + +// Shared NicheGraphics components +// -------------------------------- +#include "graphics/niche/Drivers/Backlight/LatchingBacklight.h" +#include "graphics/niche/Drivers/EInk/GDEY0154D67.h" +#include "graphics/niche/Inputs/TwoButton.h" + +#include "graphics/niche/Fonts/FreeSans6pt7b.h" +#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h" +#include + +void setupNicheGraphics() +{ + using namespace NicheGraphics; + + // SPI + // ----------------------------- + + // For NRF52 platforms, SPI pins are defined in variant.h, not passed to begin() + SPI1.begin(); + + // Driver + // ----------------------------- + + // Use E-Ink driver + Drivers::EInk *driver = new Drivers::GDEY0154D67; // Todo: confirm display model + driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES); + + // InkHUD + // ---------------------------- + + InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance(); + + // Set the driver + inkhud->setDriver(driver); + + // Set how many FAST updates per FULL update + // Set how unhealthy additional FAST updates beyond this number are + // Todo: observe the display's performance in-person and adjust accordingly. + // Currently set to the values given by Elecrow for EInkDynamicDisplay. + inkhud->setDisplayResilience(10, 1.5); + + // Prepare fonts + InkHUD::Applet::fontLarge = InkHUD::AppletFont(FreeSans9pt7b); + InkHUD::Applet::fontSmall = InkHUD::AppletFont(FreeSans6pt7b); + /* + // Font localization demo: Cyrillic + InkHUD::Applet::fontSmall = InkHUD::AppletFont(FreeSans6pt8bCyrillic); + InkHUD::Applet::fontSmall.addSubstitutionsWin1251(); + */ + + // Customize default settings + inkhud->persistence->settings.userTiles.maxCount = 2; // Two applets side-by-side + inkhud->persistence->settings.rotation = 0; // To be confirmed? + inkhud->persistence->settings.optionalFeatures.batteryIcon = true; // Device definitely has a battery + + // Setup backlight + // Note: button mapping for this configured further down + Drivers::LatchingBacklight *backlight = Drivers::LatchingBacklight::getInstance(); + backlight->setPin(PIN_EINK_EN); + + // Pick applets + // Note: order of applets determines priority of "auto-show" feature + inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown + inkhud->addApplet("DMs", new InkHUD::DMApplet); // Inactive + inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // Inactive + inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // Inactive + inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated + inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // Inactive + inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, no autoshow, default on tile 0 + + // Start running InkHUD + inkhud->begin(); + + // Buttons + // -------------------------- + + Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component + + // As labeled on Elecrow diagram: https://www.elecrow.com/download/product/CIL12901M/ThinkNode-M1_User_Manual.pdf + constexpr uint8_t PAGE_TURN_BUTTON = 0; + constexpr uint8_t FUNCTION_BUTTON = 1; + + // Setup the main user button + buttons->setWiring(PAGE_TURN_BUTTON, PIN_BUTTON2); + buttons->setTiming(PAGE_TURN_BUTTON, 50, 500); // Todo: confirm 50ms is adequate debounce + buttons->setHandlerShortPress(PAGE_TURN_BUTTON, []() { InkHUD::InkHUD::getInstance()->shortpress(); }); + buttons->setHandlerLongPress(PAGE_TURN_BUTTON, []() { InkHUD::InkHUD::getInstance()->longpress(); }); + + // Setup the aux button + // Initial testing only: mapped to the backlight + // Todo: additional features + buttons->setWiring(FUNCTION_BUTTON, PIN_BUTTON1); + buttons->setTiming(FUNCTION_BUTTON, 50, 500); // 500ms before latch + buttons->setHandlerDown(FUNCTION_BUTTON, [backlight]() { backlight->peek(); }); + buttons->setHandlerLongPress(FUNCTION_BUTTON, [backlight]() { backlight->latch(); }); + buttons->setHandlerShortPress(FUNCTION_BUTTON, [backlight]() { backlight->off(); }); + + buttons->start(); +} + +#endif \ No newline at end of file diff --git a/variants/ELECROW-ThinkNode-M1/platformio.ini b/variants/ELECROW-ThinkNode-M1/platformio.ini index f37f6d310..86fbde398 100644 --- a/variants/ELECROW-ThinkNode-M1/platformio.ini +++ b/variants/ELECROW-ThinkNode-M1/platformio.ini @@ -10,6 +10,7 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/ELECROW-ThinkNode-M1 -DELECROW_ThinkNode_M1 -DGPS_POWER_TOGGLE -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DUSE_EINK -DEINK_DISPLAY_MODEL=GxEPD2_154_D67 -DEINK_WIDTH=200 -DEINK_HEIGHT=200 @@ -26,4 +27,23 @@ lib_deps = https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip lewisxhe/PCF8563_Library@^1.0.1 khoih-prog/nRF52_PWM@^1.0.1 -;upload_protocol = fs \ No newline at end of file +;upload_protocol = fs + +[env:thinknode_m1-inkhud] +extends = nrf52840_base, inkhud +board = ThinkNode-M1 +board_check = true +debug_tool = jlink +build_flags = + ${nrf52840_base.build_flags} + ${inkhud.build_flags} + -I variants/ELECROW-ThinkNode-M1 + -D ELECROW_ThinkNode_M1 + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" +build_src_filter = + ${nrf52_base.build_src_filter} + ${inkhud.build_src_filter} +lib_deps = + ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX + ${nrf52840_base.lib_deps} + lewisxhe/PCF8563_Library@^1.0.1 \ No newline at end of file diff --git a/variants/ELECROW-ThinkNode-M1/variant.h b/variants/ELECROW-ThinkNode-M1/variant.h index 3bfa360f6..fc2fddbdf 100644 --- a/variants/ELECROW-ThinkNode-M1/variant.h +++ b/variants/ELECROW-ThinkNode-M1/variant.h @@ -140,8 +140,6 @@ External serial flash WP25R1635FZUIL0 // Controls power for all peripherals (eink + GPS + LoRa + Sensor) #define PIN_POWER_EN (0 + 12) -#define USE_EINK - #define PIN_SPI1_MISO (32 + 7) #define PIN_SPI1_MOSI PIN_EINK_MOSI #define PIN_SPI1_SCK PIN_EINK_SCLK From 128c347c645d64497b5f024364e44c5884079b12 Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Tue, 1 Apr 2025 23:26:46 +1300 Subject: [PATCH 018/100] fix: T-Echo frontlight on at boot when using OLED UI (#6474) --- src/graphics/EInkDisplay2.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/graphics/EInkDisplay2.cpp b/src/graphics/EInkDisplay2.cpp index 96c6b44c1..27117641e 100644 --- a/src/graphics/EInkDisplay2.cpp +++ b/src/graphics/EInkDisplay2.cpp @@ -128,11 +128,7 @@ bool EInkDisplay::connect() #ifdef PIN_EINK_EN // backlight power, HIGH is backlight on, LOW is off pinMode(PIN_EINK_EN, OUTPUT); -#ifdef ELECROW_ThinkNode_M1 digitalWrite(PIN_EINK_EN, LOW); -#else - digitalWrite(PIN_EINK_EN, HIGH); -#endif #endif #if defined(TTGO_T_ECHO) || defined(ELECROW_ThinkNode_M1) From ea4ce8d827d45e82e7ce5b377d956e324f80733c Mon Sep 17 00:00:00 2001 From: Manuel <71137295+mverch67@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:53:15 +0200 Subject: [PATCH 019/100] MUI unPhone-tft: fix defaults (#6477) --- src/mesh/NodeDB.cpp | 2 +- variants/unphone/platformio.ini | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 3f79d18e6..9bb63652a 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -689,7 +689,7 @@ void NodeDB::initConfigIntervals() config.display.screen_on_secs = default_screen_on_secs; -#if defined(T_WATCH_S3) || defined(T_DECK) || defined(MESH_TAB) || defined(RAK14014) +#if defined(T_WATCH_S3) || defined(T_DECK) || defined(UNPHONE) || defined(MESH_TAB) || defined(RAK14014) config.power.is_power_saving = true; config.display.screen_on_secs = 30; config.power.wait_bluetooth_secs = 30; diff --git a/variants/unphone/platformio.ini b/variants/unphone/platformio.ini index 18efbb157..399d65b03 100644 --- a/variants/unphone/platformio.ini +++ b/variants/unphone/platformio.ini @@ -35,19 +35,19 @@ lib_deps = ${esp32s3_base.lib_deps} extends = env:unphone build_flags = ${env:unphone.build_flags} + -D CONFIG_DISABLE_HAL_LOCKS=1 -D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1 -D MESHTASTIC_EXCLUDE_INPUTBROKER=1 - -D MESHTASTIC_EXCLUDE_BLUETOOTH=1 -D MESHTASTIC_EXCLUDE_WEBSERVER=1 -D MESHTASTIC_EXCLUDE_SERIAL=1 -D MESHTASTIC_EXCLUDE_SOCKETAPI=1 -D INPUTDRIVER_BUTTON_TYPE=21 - -D MAX_THREADS=40 -D HAS_SCREEN=0 -D HAS_TFT=1 -D HAS_SDCARD -D DISPLAY_SET_RESOLUTION - -D RAM_SIZE=3072 + -D RAM_SIZE=6144 + -D LV_CACHE_DEF_SIZE=2097152 -D LV_LVGL_H_INCLUDE_SIMPLE -D LV_CONF_INCLUDE_SIMPLE -D LV_COMP_CONF_INCLUDE_SIMPLE @@ -63,6 +63,7 @@ build_flags = -D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_UNPHONE.h\" -D VIEW_320x240 -D USE_PACKET_API + -D MAP_FULL_REDRAW lib_deps = ${env:unphone.lib_deps} From 644849126ca179ee52f31133cc62e72142dde8f7 Mon Sep 17 00:00:00 2001 From: Benjamin Faershtein <119711889+RCGV1@users.noreply.github.com> Date: Tue, 1 Apr 2025 10:50:10 -0700 Subject: [PATCH 020/100] Fixes #6315 (#6475) * Fixed Canned Messages send to non broadcast * Small fix * Fix formatting for singular canned message * Trunk fmt --------- Co-authored-by: Ben Meadors --- src/modules/CannedMessageModule.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index 2a5ec00ab..c16c0e4b3 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -483,7 +483,7 @@ int32_t CannedMessageModule::runOnce() #if defined(USE_VIRTUAL_KEYBOARD) sendText(this->dest, indexChannels[this->channel], this->messages[this->currentMessageIndex], true); #else - sendText(NODENUM_BROADCAST, channels.getPrimaryIndex(), this->messages[this->currentMessageIndex], true); + sendText(this->dest, indexChannels[this->channel], this->messages[this->currentMessageIndex], true); #endif } this->runState = CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE; @@ -1114,20 +1114,19 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st display->drawStringf(0 + x, 0 + y, buffer, "To: %s", cannedMessageModule->getNodeName(this->dest)); int lines = (display->getHeight() / FONT_HEIGHT_SMALL) - 1; if (lines == 3) { - // static (old) behavior for small displays - display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL, cannedMessageModule->getPrevMessage()); display->fillRect(0 + x, 0 + y + FONT_HEIGHT_SMALL * 2, x + display->getWidth(), y + FONT_HEIGHT_SMALL); display->setColor(BLACK); display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL * 2, cannedMessageModule->getCurrentMessage()); display->setColor(WHITE); - display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL * 3, cannedMessageModule->getNextMessage()); + if (this->messagesCount > 1) { + display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL, cannedMessageModule->getPrevMessage()); + display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL * 3, cannedMessageModule->getNextMessage()); + } } else { - // use entire display height for larger displays int topMsg = (messagesCount > lines && currentMessageIndex >= lines - 1) ? currentMessageIndex - lines + 2 : 0; for (int i = 0; i < std::min(messagesCount, lines); i++) { if (i == currentMessageIndex - topMsg) { #ifdef USE_EINK - // Avoid drawing solid black with fillRect: harder to clear for E-Ink display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL * (i + 1), ">"); display->drawString(12 + x, 0 + y + FONT_HEIGHT_SMALL * (i + 1), cannedMessageModule->getCurrentMessage()); @@ -1138,7 +1137,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL * (i + 1), cannedMessageModule->getCurrentMessage()); display->setColor(WHITE); #endif - } else { + } else if (messagesCount > 1) { // Only draw others if there are multiple messages display->drawString(0 + x, 0 + y + FONT_HEIGHT_SMALL * (i + 1), cannedMessageModule->getMessageByIndex(topMsg + i)); } From f6ed10f3298abf6896892ca7906d3231c8b3f567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hampa=C3=AF?= Date: Tue, 1 Apr 2025 22:39:40 +0200 Subject: [PATCH 021/100] Added initial support for Texas Instruments LP5562 (#6381) * Added initial support for Texas Instrument LP5562 * Added proper support for Ambient Lighting * Code merge for all RBG_LED enabled devices * Fixed forgotten log_info & added firstRGBLED() --- src/AmbientLightingThread.h | 43 +++++++++++++++++----- src/configuration.h | 6 +++ src/detect/ScanI2C.cpp | 6 +++ src/detect/ScanI2C.h | 3 ++ src/detect/ScanI2CTwoWire.cpp | 3 ++ src/graphics/NomadStarLED.h | 5 +++ src/main.cpp | 8 ++-- src/modules/ExternalNotificationModule.cpp | 29 +++++++++++++-- 8 files changed, 87 insertions(+), 16 deletions(-) create mode 100644 src/graphics/NomadStarLED.h diff --git a/src/AmbientLightingThread.h b/src/AmbientLightingThread.h index c487f9d53..bff8846d6 100644 --- a/src/AmbientLightingThread.h +++ b/src/AmbientLightingThread.h @@ -6,6 +6,11 @@ NCP5623 rgb; #endif +#ifdef HAS_LP5562 +#include +LP5562 rgbw; +#endif + #ifdef HAS_NEOPIXEL #include Adafruit_NeoPixel pixels(NEOPIXEL_COUNT, NEOPIXEL_DATA, NEOPIXEL_TYPE); @@ -26,7 +31,7 @@ class AmbientLightingThread : public concurrency::OSThread notifyDeepSleepObserver.observe(¬ifyDeepSleep); // Let us know when shutdown() is issued. // Enables Ambient Lighting by default if conditions are meet. -#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) +#ifdef HAS_RGB_LED #ifdef ENABLE_AMBIENTLIGHTING moduleConfig.ambient_lighting.led_state = true; #endif @@ -39,7 +44,7 @@ class AmbientLightingThread : public concurrency::OSThread // moduleConfig.ambient_lighting.green = (myNodeInfo.my_node_num & 0x00FF00) >> 8; // moduleConfig.ambient_lighting.blue = myNodeInfo.my_node_num & 0x0000FF; -#ifdef HAS_NCP5623 +#if defined(HAS_NCP5623) || defined(HAS_LP5562) _type = type; if (_type == ScanI2C::DeviceType::NONE) { LOG_DEBUG("AmbientLighting Disable due to no RGB leds found on I2C bus"); @@ -47,17 +52,21 @@ class AmbientLightingThread : public concurrency::OSThread return; } #endif -#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) +#ifdef HAS_RGB_LED if (!moduleConfig.ambient_lighting.led_state) { LOG_DEBUG("AmbientLighting Disable due to moduleConfig.ambient_lighting.led_state OFF"); disable(); return; } LOG_DEBUG("AmbientLighting init"); -#ifdef HAS_NCP5623 +#if defined(HAS_NCP5623) || defined(HAS_LP5562) if (_type == ScanI2C::NCP5623) { rgb.begin(); #endif +#ifdef HAS_LP5562 + } else if (_type == ScanI2C::LP5562) { + rgbw.begin(); +#endif #ifdef RGBLED_RED pinMode(RGBLED_RED, OUTPUT); pinMode(RGBLED_GREEN, OUTPUT); @@ -70,7 +79,7 @@ class AmbientLightingThread : public concurrency::OSThread #endif setLighting(); #endif -#ifdef HAS_NCP5623 +#if defined(HAS_NCP5623) || defined(HAS_LP5562) } #endif } @@ -78,13 +87,13 @@ class AmbientLightingThread : public concurrency::OSThread protected: int32_t runOnce() override { -#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) -#ifdef HAS_NCP5623 - if (_type == ScanI2C::NCP5623 && moduleConfig.ambient_lighting.led_state) { +#ifdef HAS_RGB_LED +#if defined(HAS_NCP5623) || defined(HAS_LP5562) + if ((_type == ScanI2C::NCP5623 || _type == ScanI2C::LP5562) && moduleConfig.ambient_lighting.led_state) { #endif setLighting(); return 30000; // 30 seconds to reset from any animations that may have been running from Ext. Notification -#ifdef HAS_NCP5623 +#if defined(HAS_NCP5623) || defined(HAS_LP5562) } #endif #endif @@ -108,6 +117,14 @@ class AmbientLightingThread : public concurrency::OSThread rgb.setBlue(0); LOG_INFO("OFF: NCP5623 Ambient lighting"); #endif +#ifdef HAS_LP5562 + rgbw.setCurrent(0); + rgbw.setRed(0); + rgbw.setGreen(0); + rgbw.setBlue(0); + rgbw.setWhite(0); + LOG_INFO("OFF: LP5562 Ambient lighting"); +#endif #ifdef HAS_NEOPIXEL pixels.clear(); pixels.show(); @@ -141,6 +158,14 @@ class AmbientLightingThread : public concurrency::OSThread LOG_DEBUG("Init NCP5623 Ambient light w/ current=%d, red=%d, green=%d, blue=%d", moduleConfig.ambient_lighting.current, moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue); #endif +#ifdef HAS_LP5562 + rgbw.setCurrent(moduleConfig.ambient_lighting.current); + rgbw.setRed(moduleConfig.ambient_lighting.red); + rgbw.setGreen(moduleConfig.ambient_lighting.green); + rgbw.setBlue(moduleConfig.ambient_lighting.blue); + LOG_DEBUG("Init LP5562 Ambient light w/ current=%d, red=%d, green=%d, blue=%d", moduleConfig.ambient_lighting.current, + moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue); +#endif #ifdef HAS_NEOPIXEL pixels.fill(pixels.Color(moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue), diff --git a/src/configuration.h b/src/configuration.h index fd4a5b196..ba6066896 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -170,6 +170,7 @@ along with this program. If not, see . // LED // ----------------------------------------------------------------------------- #define NCP5623_ADDR 0x38 +#define LP5562_ADDR 0x30 // ----------------------------------------------------------------------------- // Security @@ -295,6 +296,11 @@ along with this program. If not, see . #error HW_VENDOR must be defined #endif +// Support multiple RGB LED configuration +#if defined(HAS_NCP5623) || defined(HAS_LP5562) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) +#define HAS_RGB_LED +#endif + // ----------------------------------------------------------------------------- // Global switches to turn off features for a minimized build // ----------------------------------------------------------------------------- diff --git a/src/detect/ScanI2C.cpp b/src/detect/ScanI2C.cpp index 4caa0f730..b88843a78 100644 --- a/src/detect/ScanI2C.cpp +++ b/src/detect/ScanI2C.cpp @@ -41,6 +41,12 @@ ScanI2C::FoundDevice ScanI2C::firstAccelerometer() const return firstOfOrNONE(8, types); } +ScanI2C::FoundDevice ScanI2C::firstRGBLED() const +{ + ScanI2C::DeviceType types[] = {NCP5623, LP5562}; + return firstOfOrNONE(2, types); +} + ScanI2C::FoundDevice ScanI2C::find(ScanI2C::DeviceType) const { return DEVICE_NONE; diff --git a/src/detect/ScanI2C.h b/src/detect/ScanI2C.h index 5b6bbe629..cfa3ea9cd 100644 --- a/src/detect/ScanI2C.h +++ b/src/detect/ScanI2C.h @@ -49,6 +49,7 @@ class ScanI2C VEML7700, RCWL9620, NCP5623, + LP5562, TSL2591, OPT3001, MLX90632, @@ -121,6 +122,8 @@ class ScanI2C FoundDevice firstAccelerometer() const; + FoundDevice firstRGBLED() const; + virtual FoundDevice find(DeviceType) const; virtual bool exists(DeviceType) const; diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index 8b779277d..82fcda480 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -218,6 +218,9 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) #ifdef HAS_NCP5623 SCAN_SIMPLE_CASE(NCP5623_ADDR, NCP5623, "NCP5623", (uint8_t)addr.address); #endif +#ifdef HAS_LP5562 + SCAN_SIMPLE_CASE(LP5562_ADDR, LP5562, "LP5562", (uint8_t)addr.address); +#endif #ifdef HAS_PMU SCAN_SIMPLE_CASE(XPOWERS_AXP192_AXP2101_ADDRESS, PMU_AXP192_AXP2101, "AXP192/AXP2101", (uint8_t)addr.address) #endif diff --git a/src/graphics/NomadStarLED.h b/src/graphics/NomadStarLED.h new file mode 100644 index 000000000..0633a577e --- /dev/null +++ b/src/graphics/NomadStarLED.h @@ -0,0 +1,5 @@ +#ifdef HAS_LP5562 +#include +extern LP5562 rgbw; + +#endif \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 05eeef2ae..4b098b3f3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -602,9 +602,9 @@ void setup() * "found". */ -// Only one supported RGB LED currently -#ifdef HAS_NCP5623 - rgb_found = i2cScanner->find(ScanI2C::DeviceType::NCP5623); +// Two supported RGB LED currently +#ifdef HAS_RGB_LED + rgb_found = i2cScanner->firstRGBLED(); #endif #ifdef HAS_TPS65233 @@ -1270,7 +1270,7 @@ extern meshtastic_DeviceMetadata getDeviceMetadata() #ifndef ARCH_ESP32 deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_PAXCOUNTER_CONFIG; #endif -#if !defined(HAS_NCP5623) && !defined(RGBLED_RED) && !defined(HAS_NEOPIXEL) && !defined(UNPHONE) && !RAK_4631 +#if !defined(HAS_RGB_LED) && !RAK_4631 deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AMBIENTLIGHTING_CONFIG; #endif diff --git a/src/modules/ExternalNotificationModule.cpp b/src/modules/ExternalNotificationModule.cpp index bbb3f90e0..dc17460f6 100644 --- a/src/modules/ExternalNotificationModule.cpp +++ b/src/modules/ExternalNotificationModule.cpp @@ -28,6 +28,10 @@ #include #endif +#ifdef HAS_LP5562 +#include +#endif + #ifdef HAS_NEOPIXEL #include #endif @@ -37,10 +41,11 @@ extern unPhone unphone; #endif -#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) +#if defined(HAS_RGB_LED) uint8_t red = 0; uint8_t green = 0; uint8_t blue = 0; +uint8_t white = 0; uint8_t colorState = 1; uint8_t brightnessIndex = 0; uint8_t brightnessValues[] = {0, 10, 20, 30, 50, 90, 160, 170}; // blue gets multiplied by 1.5 @@ -128,15 +133,21 @@ int32_t ExternalNotificationModule::runOnce() millis()); setExternalState(2, !getExternal(2)); } -#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) +#if defined(HAS_RGB_LED) red = (colorState & 4) ? brightnessValues[brightnessIndex] : 0; // Red enabled on colorState = 4,5,6,7 green = (colorState & 2) ? brightnessValues[brightnessIndex] : 0; // Green enabled on colorState = 2,3,6,7 blue = (colorState & 1) ? (brightnessValues[brightnessIndex] * 1.5) : 0; // Blue enabled on colorState = 1,3,5,7 + white = (colorState & 12) ? brightnessValues[brightnessIndex] : 0; #ifdef HAS_NCP5623 if (rgb_found.type == ScanI2C::NCP5623) { rgb.setColor(red, green, blue); } #endif +#ifdef HAS_LP5562 + if (rgb_found.type == ScanI2C::LP5562) { + rgbw.setColor(red, green, blue, white); + } +#endif #ifdef RGBLED_CA analogWrite(RGBLED_RED, 255 - red); // CA type needs reverse logic analogWrite(RGBLED_GREEN, 255 - green); @@ -233,11 +244,12 @@ void ExternalNotificationModule::setExternalState(uint8_t index, bool on) break; } -#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE) +#if defined(HAS_RGB_LED) if (!on) { red = 0; green = 0; blue = 0; + white = 0; } #endif @@ -246,6 +258,11 @@ void ExternalNotificationModule::setExternalState(uint8_t index, bool on) rgb.setColor(red, green, blue); } #endif +#ifdef HAS_LP5562 + if (rgb_found.type == ScanI2C::LP5562) { + rgbw.setColor(red, green, blue, white); + } +#endif #ifdef RGBLED_CA analogWrite(RGBLED_RED, 255 - red); // CA type needs reverse logic analogWrite(RGBLED_GREEN, 255 - green); @@ -365,6 +382,12 @@ ExternalNotificationModule::ExternalNotificationModule() rgb.setCurrent(10); } #endif +#ifdef HAS_LP5562 + if (rgb_found.type == ScanI2C::LP5562) { + rgbw.begin(); + rgbw.setCurrent(20); + } +#endif #ifdef RGBLED_RED pinMode(RGBLED_RED, OUTPUT); // set up the RGB led pins pinMode(RGBLED_GREEN, OUTPUT); From 67fddcc2142bed7e6748d0a5485d4848f32856fc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 2 Apr 2025 05:41:36 -0500 Subject: [PATCH 022/100] Upgrade trunk (#6480) Co-authored-by: sachaw <11172820+sachaw@users.noreply.github.com> --- .trunk/trunk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 4c570c856..b89f1f835 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -12,7 +12,7 @@ lint: - trufflehog@3.88.20 - yamllint@1.37.0 - bandit@1.8.3 - - checkov@3.2.394 + - checkov@3.2.395 - terrascan@1.19.9 - trivy@0.61.0 - taplo@0.9.3 @@ -22,7 +22,7 @@ lint: - oxipng@9.1.4 - svgo@3.3.2 - actionlint@1.7.7 - - flake8@7.1.2 + - flake8@7.2.0 - hadolint@2.12.1-beta - shfmt@3.6.0 - shellcheck@0.10.0 From ef18a9b5b5a2a756ad15009ce9cd7e0b7717d077 Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 2 Apr 2025 07:55:14 -0400 Subject: [PATCH 023/100] meshtasticd: Set available.d dir in yaml (#6481) --- bin/config-dist.yaml | 3 ++- src/platform/portduino/PortduinoGlue.cpp | 4 +++- src/platform/portduino/PortduinoGlue.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/config-dist.yaml b/bin/config-dist.yaml index 722f80fae..9238d0e56 100644 --- a/bin/config-dist.yaml +++ b/bin/config-dist.yaml @@ -197,5 +197,6 @@ General: MaxNodes: 200 MaxMessageQueue: 100 ConfigDirectory: /etc/meshtasticd/config.d/ + AvailableDirectory: /etc/meshtasticd/available.d/ # MACAddress: AA:BB:CC:DD:EE:FF -# MACAddressSource: eth0 \ No newline at end of file +# MACAddressSource: eth0 diff --git a/src/platform/portduino/PortduinoGlue.cpp b/src/platform/portduino/PortduinoGlue.cpp index a4050e702..6d0972dc3 100644 --- a/src/platform/portduino/PortduinoGlue.cpp +++ b/src/platform/portduino/PortduinoGlue.cpp @@ -247,7 +247,7 @@ void portduinoSetup() std::cerr << "autoconf: Unable to find config for " << autoconf_product << std::endl; exit(EXIT_FAILURE); } - if (loadConfig(("/etc/meshtasticd/available.d/" + product_config).c_str())) { + if (loadConfig((settingsStrings[available_directory] + product_config).c_str())) { std::cout << "autoconf: Using " << product_config << " as config file for " << autoconf_product << std::endl; } else { std::cerr << "autoconf: Unable to use " << product_config << " as config file for " << autoconf_product @@ -602,6 +602,8 @@ bool loadConfig(const char *configPath) settingsMap[maxnodes] = (yamlConfig["General"]["MaxNodes"]).as(200); settingsMap[maxtophone] = (yamlConfig["General"]["MaxMessageQueue"]).as(100); settingsStrings[config_directory] = (yamlConfig["General"]["ConfigDirectory"]).as(""); + settingsStrings[available_directory] = + (yamlConfig["General"]["AvailableDirectory"]).as("/etc/meshtasticd/available.d/"); if ((yamlConfig["General"]["MACAddress"]).as("") != "" && (yamlConfig["General"]["MACAddressSource"]).as("") != "") { std::cout << "Cannot set both MACAddress and MACAddressSource!" << std::endl; diff --git a/src/platform/portduino/PortduinoGlue.h b/src/platform/portduino/PortduinoGlue.h index 4e074be71..f7239cb73 100644 --- a/src/platform/portduino/PortduinoGlue.h +++ b/src/platform/portduino/PortduinoGlue.h @@ -99,6 +99,7 @@ enum configNames { maxnodes, ascii_logs, config_directory, + available_directory, mac_address }; enum { no_screen, x11, st7789, st7735, st7735s, st7796, ili9341, ili9342, ili9486, ili9488, hx8357d }; From 594cb0cc1e94b478aac755025f0912b452aa2845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 3 Apr 2025 02:15:12 +0200 Subject: [PATCH 024/100] reinstate M1 Backlight (#6484) --- src/graphics/EInkDisplay2.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/graphics/EInkDisplay2.cpp b/src/graphics/EInkDisplay2.cpp index 27117641e..d2d373d24 100644 --- a/src/graphics/EInkDisplay2.cpp +++ b/src/graphics/EInkDisplay2.cpp @@ -128,8 +128,13 @@ bool EInkDisplay::connect() #ifdef PIN_EINK_EN // backlight power, HIGH is backlight on, LOW is off pinMode(PIN_EINK_EN, OUTPUT); +#ifdef ELECROW_ThinkNode_M1 + // ThinkNode M1 has a hardware dimmable backlight. Start enabled + digitalWrite(PIN_EINK_EN, HIGH); +#else digitalWrite(PIN_EINK_EN, LOW); #endif +#endif #if defined(TTGO_T_ECHO) || defined(ELECROW_ThinkNode_M1) { From 31130fd49e732bdd813492e8155e71605275595c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 06:52:39 -0500 Subject: [PATCH 025/100] Upgrade trunk to 1.22.12 (#6487) Co-authored-by: sachaw <11172820+sachaw@users.noreply.github.com> --- .trunk/trunk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index b89f1f835..aeb0a1b43 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -1,6 +1,6 @@ version: 0.1 cli: - version: 1.22.11 + version: 1.22.12 plugins: sources: - id: trunk @@ -12,7 +12,7 @@ lint: - trufflehog@3.88.20 - yamllint@1.37.0 - bandit@1.8.3 - - checkov@3.2.395 + - checkov@3.2.396 - terrascan@1.19.9 - trivy@0.61.0 - taplo@0.9.3 From 11bafae2872c244dd821ce0b6273e699f55cfae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 3 Apr 2025 16:02:46 +0200 Subject: [PATCH 026/100] update OLED library (#6489) --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 010aea90f..377635873 100644 --- a/platformio.ini +++ b/platformio.ini @@ -56,7 +56,7 @@ build_flags = -Wno-missing-field-initializers monitor_speed = 115200 monitor_filters = direct lib_deps = - https://github.com/meshtastic/esp8266-oled-ssd1306/archive/e16cee124fe26490cb14880c679321ad8ac89c95.zip + https://github.com/meshtastic/esp8266-oled-ssd1306/archive/0119501e9983bd894830b02f545c377ee08d66fe.zip mathertel/OneButton@2.6.1 https://github.com/meshtastic/arduino-fsm/archive/7db3702bf0cfe97b783d6c72595e3f38e0b19159.zip https://github.com/meshtastic/TinyGPSPlus/archive/71a82db35f3b973440044c476d4bcdc673b104f4.zip From 1017f6af355f6e531d76578118b59bb4c9bee41b Mon Sep 17 00:00:00 2001 From: rcarteraz Date: Thu, 3 Apr 2025 07:07:43 -0700 Subject: [PATCH 027/100] remove very long slow (#6486) --- src/DisplayFormatters.cpp | 3 --- src/mesh/RadioInterface.cpp | 5 ----- 2 files changed, 8 deletions(-) diff --git a/src/DisplayFormatters.cpp b/src/DisplayFormatters.cpp index 0718ffcbd..44bc0897b 100644 --- a/src/DisplayFormatters.cpp +++ b/src/DisplayFormatters.cpp @@ -27,9 +27,6 @@ const char *DisplayFormatters::getModemPresetDisplayName(meshtastic_Config_LoRaC case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE: return useShortName ? "LongM" : "LongMod"; break; - case meshtastic_Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW: - return useShortName ? "VeryL" : "VLongSlow"; - break; default: return useShortName ? "Custom" : "Invalid"; break; diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 2e50c0168..86903153b 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -488,11 +488,6 @@ void RadioInterface::applyModemConfig() cr = 8; sf = 12; break; - case meshtastic_Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW: - bw = (myRegion->wideLora) ? 203.125 : 62.5; - cr = 8; - sf = 12; - break; } } else { sf = loraConfig.spread_factor; From 06658028234b86dc9cb7055f6f57ce6fd5a417fd Mon Sep 17 00:00:00 2001 From: "Jason B. Cox" Date: Thu, 3 Apr 2025 12:17:36 -0700 Subject: [PATCH 028/100] Improve PKC unit test coverage (#6485) * Cleanup PKC unit test a bit * Add unit test coverage for encryptCurve25519 --------- Co-authored-by: Ben Meadors --- test/test_crypto/test_main.cpp | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/test/test_crypto/test_main.cpp b/test/test_crypto/test_main.cpp index ac507116c..36dc37b9d 100644 --- a/test/test_crypto/test_main.cpp +++ b/test/test_crypto/test_main.cpp @@ -110,7 +110,7 @@ void test_DH25519(void) TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 32); } -void test_PKC_Decrypt(void) +void test_PKC(void) { uint8_t private_key[32]; meshtastic_UserLite_public_key_t public_key; @@ -120,7 +120,8 @@ void test_PKC_Decrypt(void) uint8_t decrypted[128] __attribute__((__aligned__)); uint8_t expected_nonce[16]; - uint32_t fromNode; + uint32_t fromNode = 0x0929; + uint64_t packetNum = 0x13b2d662; HexToBytes(public_key.bytes, "db18fc50eea47f00251cb784819a3cf5fc361882597f589f0d7ff820e8064457"); public_key.size = 32; HexToBytes(private_key, "a00330633e63522f8a4d81ec6d9d1e6617f6c8ffd3a4c698229537d44e522277"); @@ -128,14 +129,26 @@ void test_PKC_Decrypt(void) HexToBytes(expected_decrypted, "08011204746573744800"); HexToBytes(radioBytes, "8c646d7a2909000062d6b2136b00000040df24abfcc30a17a3d9046726099e796a1c036a792b"); HexToBytes(expected_nonce, "62d6b213036a792b2909000000"); - fromNode = 0x0929; crypto->setDHPrivateKey(private_key); - // TEST_ASSERT(crypto->setDHPublicKey(public_key)); - // crypto->hash(crypto->shared_key, 32); - crypto->decryptCurve25519(fromNode, public_key, 0x13b2d662, 22, radioBytes + 16, decrypted); + + TEST_ASSERT(crypto->decryptCurve25519(fromNode, public_key, packetNum, 22, radioBytes + 16, decrypted)); TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 8); TEST_ASSERT_EQUAL_MEMORY(expected_nonce, crypto->nonce, 13); + TEST_ASSERT_EQUAL_MEMORY(expected_decrypted, decrypted, 10); + uint32_t toNode = 0; // Only impacts logging + uint8_t encrypted[128] __attribute__((__aligned__)); + TEST_ASSERT(crypto->encryptCurve25519(toNode, fromNode, public_key, packetNum, 10, decrypted, encrypted)); + TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 8); + // The extraNonce is random, so skip checking the nonce and encrypted output here + + // Copy the nonce to check it after encryption + memcpy(expected_nonce, crypto->nonce, 16); + + // Decrypt the re-encrypted bytes and check they are the same as what we expect + TEST_ASSERT(crypto->decryptCurve25519(fromNode, public_key, packetNum, 22, encrypted, decrypted)); + TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 8); + TEST_ASSERT_EQUAL_MEMORY(expected_nonce, crypto->nonce, 13); TEST_ASSERT_EQUAL_MEMORY(expected_decrypted, decrypted, 10); } @@ -178,7 +191,7 @@ void setup() RUN_TEST(test_ECB_AES256); RUN_TEST(test_DH25519); RUN_TEST(test_AES_CTR); - RUN_TEST(test_PKC_Decrypt); + RUN_TEST(test_PKC); exit(UNITY_END()); // stop unit testing } From 749410617007319e995f5014329bc5f2c31e8a9e Mon Sep 17 00:00:00 2001 From: Nasimovy Date: Thu, 3 Apr 2025 19:18:18 +0000 Subject: [PATCH 029/100] TCA8418 initial config + basic 3x4 keypad config (#6422) * TCA8418 with base config for 3x4 keypad * replaced k with uppercase K * change detection method * reflect changes #6381 --------- Co-authored-by: Ben Meadors --- src/configuration.h | 1 + src/detect/ScanI2C.cpp | 4 +- src/detect/ScanI2C.h | 3 +- src/detect/ScanI2CTwoWire.cpp | 20 +- src/input/TCA8418Keyboard.cpp | 561 ++++++++++++++++++++++++++++++++++ src/input/TCA8418Keyboard.h | 83 +++++ src/input/cardKbI2cImpl.cpp | 8 +- src/input/kbI2cBase.cpp | 68 +++++ src/input/kbI2cBase.h | 2 + src/main.cpp | 4 + 10 files changed, 742 insertions(+), 12 deletions(-) create mode 100644 src/input/TCA8418Keyboard.cpp create mode 100644 src/input/TCA8418Keyboard.h diff --git a/src/configuration.h b/src/configuration.h index ba6066896..d319ddb0a 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -152,6 +152,7 @@ along with this program. If not, see . #define MLX90614_ADDR_DEF 0x5A #define CGRADSENS_ADDR 0x66 #define LTR390UV_ADDR 0x53 +#define XPOWERS_AXP192_AXP2101_ADDRESS 0x34 // same adress as TCA8418 // ----------------------------------------------------------------------------- // ACCELEROMETER diff --git a/src/detect/ScanI2C.cpp b/src/detect/ScanI2C.cpp index b88843a78..5bd5c0d12 100644 --- a/src/detect/ScanI2C.cpp +++ b/src/detect/ScanI2C.cpp @@ -31,8 +31,8 @@ ScanI2C::FoundDevice ScanI2C::firstRTC() const ScanI2C::FoundDevice ScanI2C::firstKeyboard() const { - ScanI2C::DeviceType types[] = {CARDKB, TDECKKB, BBQ10KB, RAK14004, MPR121KB}; - return firstOfOrNONE(5, types); + ScanI2C::DeviceType types[] = {CARDKB, TDECKKB, BBQ10KB, RAK14004, MPR121KB, TCA8418KB}; + return firstOfOrNONE(6, types); } ScanI2C::FoundDevice ScanI2C::firstAccelerometer() const diff --git a/src/detect/ScanI2C.h b/src/detect/ScanI2C.h index cfa3ea9cd..c363db1b5 100644 --- a/src/detect/ScanI2C.h +++ b/src/detect/ScanI2C.h @@ -18,7 +18,7 @@ class ScanI2C TDECKKB, BBQ10KB, RAK14004, - PMU_AXP192_AXP2101, + PMU_AXP192_AXP2101, // has the same adress as the TCA8418KB BME_680, BME_280, BMP_280, @@ -70,6 +70,7 @@ class ScanI2C DFROBOT_RAIN, DPS310, LTR390UV, + TCA8418KB, } DeviceType; // typedef uint8_t DeviceAddress; diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index 82fcda480..230271b94 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -10,11 +10,6 @@ #include "meshUtils.h" // vformat #endif -// AXP192 and AXP2101 have the same device address, we just need to identify it in Power.cpp -#ifndef XPOWERS_AXP192_AXP2101_ADDRESS -#define XPOWERS_AXP192_AXP2101_ADDRESS 0x34 -#endif - bool in_array(uint8_t *array, int size, uint8_t lookfor) { int i; @@ -221,8 +216,19 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) #ifdef HAS_LP5562 SCAN_SIMPLE_CASE(LP5562_ADDR, LP5562, "LP5562", (uint8_t)addr.address); #endif -#ifdef HAS_PMU - SCAN_SIMPLE_CASE(XPOWERS_AXP192_AXP2101_ADDRESS, PMU_AXP192_AXP2101, "AXP192/AXP2101", (uint8_t)addr.address) + case XPOWERS_AXP192_AXP2101_ADDRESS: + // Do we have the axp2101/192 or the TCA8418 + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x90), 1); + if (registerValue == 0x0) { + logFoundDevice("TCA8418", (uint8_t)addr.address); + type = TCA8418KB; + } else { + logFoundDevice("AXP192/AXP2101", (uint8_t)addr.address); + type = PMU_AXP192_AXP2101; + } + break; +#ifdef HAS_LP5562 + SCAN_SIMPLE_CASE(LP5562_ADDR, LP5562, "LP5562", (uint8_t)addr.address); #endif case BME_ADDR: case BME_ADDR_ALTERNATE: diff --git a/src/input/TCA8418Keyboard.cpp b/src/input/TCA8418Keyboard.cpp new file mode 100644 index 000000000..21cd7b2d5 --- /dev/null +++ b/src/input/TCA8418Keyboard.cpp @@ -0,0 +1,561 @@ +// Based on the MPR121 Keyboard and Adafruit TCA8418 library + +#include "TCA8418Keyboard.h" +#include "configuration.h" + +#include + +// REGISTERS +// #define _TCA8418_REG_RESERVED 0x00 +#define _TCA8418_REG_CFG 0x01 // Configuration register +#define _TCA8418_REG_INT_STAT 0x02 // Interrupt status +#define _TCA8418_REG_KEY_LCK_EC 0x03 // Key lock and event counter +#define _TCA8418_REG_KEY_EVENT_A 0x04 // Key event register A +#define _TCA8418_REG_KEY_EVENT_B 0x05 // Key event register B +#define _TCA8418_REG_KEY_EVENT_C 0x06 // Key event register C +#define _TCA8418_REG_KEY_EVENT_D 0x07 // Key event register D +#define _TCA8418_REG_KEY_EVENT_E 0x08 // Key event register E +#define _TCA8418_REG_KEY_EVENT_F 0x09 // Key event register F +#define _TCA8418_REG_KEY_EVENT_G 0x0A // Key event register G +#define _TCA8418_REG_KEY_EVENT_H 0x0B // Key event register H +#define _TCA8418_REG_KEY_EVENT_I 0x0C // Key event register I +#define _TCA8418_REG_KEY_EVENT_J 0x0D // Key event register J +#define _TCA8418_REG_KP_LCK_TIMER 0x0E // Keypad lock1 to lock2 timer +#define _TCA8418_REG_UNLOCK_1 0x0F // Unlock register 1 +#define _TCA8418_REG_UNLOCK_2 0x10 // Unlock register 2 +#define _TCA8418_REG_GPIO_INT_STAT_1 0x11 // GPIO interrupt status 1 +#define _TCA8418_REG_GPIO_INT_STAT_2 0x12 // GPIO interrupt status 2 +#define _TCA8418_REG_GPIO_INT_STAT_3 0x13 // GPIO interrupt status 3 +#define _TCA8418_REG_GPIO_DAT_STAT_1 0x14 // GPIO data status 1 +#define _TCA8418_REG_GPIO_DAT_STAT_2 0x15 // GPIO data status 2 +#define _TCA8418_REG_GPIO_DAT_STAT_3 0x16 // GPIO data status 3 +#define _TCA8418_REG_GPIO_DAT_OUT_1 0x17 // GPIO data out 1 +#define _TCA8418_REG_GPIO_DAT_OUT_2 0x18 // GPIO data out 2 +#define _TCA8418_REG_GPIO_DAT_OUT_3 0x19 // GPIO data out 3 +#define _TCA8418_REG_GPIO_INT_EN_1 0x1A // GPIO interrupt enable 1 +#define _TCA8418_REG_GPIO_INT_EN_2 0x1B // GPIO interrupt enable 2 +#define _TCA8418_REG_GPIO_INT_EN_3 0x1C // GPIO interrupt enable 3 +#define _TCA8418_REG_KP_GPIO_1 0x1D // Keypad/GPIO select 1 +#define _TCA8418_REG_KP_GPIO_2 0x1E // Keypad/GPIO select 2 +#define _TCA8418_REG_KP_GPIO_3 0x1F // Keypad/GPIO select 3 +#define _TCA8418_REG_GPI_EM_1 0x20 // GPI event mode 1 +#define _TCA8418_REG_GPI_EM_2 0x21 // GPI event mode 2 +#define _TCA8418_REG_GPI_EM_3 0x22 // GPI event mode 3 +#define _TCA8418_REG_GPIO_DIR_1 0x23 // GPIO data direction 1 +#define _TCA8418_REG_GPIO_DIR_2 0x24 // GPIO data direction 2 +#define _TCA8418_REG_GPIO_DIR_3 0x25 // GPIO data direction 3 +#define _TCA8418_REG_GPIO_INT_LVL_1 0x26 // GPIO edge/level detect 1 +#define _TCA8418_REG_GPIO_INT_LVL_2 0x27 // GPIO edge/level detect 2 +#define _TCA8418_REG_GPIO_INT_LVL_3 0x28 // GPIO edge/level detect 3 +#define _TCA8418_REG_DEBOUNCE_DIS_1 0x29 // Debounce disable 1 +#define _TCA8418_REG_DEBOUNCE_DIS_2 0x2A // Debounce disable 2 +#define _TCA8418_REG_DEBOUNCE_DIS_3 0x2B // Debounce disable 3 +#define _TCA8418_REG_GPIO_PULL_1 0x2C // GPIO pull-up disable 1 +#define _TCA8418_REG_GPIO_PULL_2 0x2D // GPIO pull-up disable 2 +#define _TCA8418_REG_GPIO_PULL_3 0x2E // GPIO pull-up disable 3 +// #define _TCA8418_REG_RESERVED 0x2F + +// FIELDS CONFIG REGISTER 1 +#define _TCA8418_REG_CFG_AI 0x80 // Auto-increment for read/write +#define _TCA8418_REG_CFG_GPI_E_CGF 0x40 // Event mode config +#define _TCA8418_REG_CFG_OVR_FLOW_M 0x20 // Overflow mode enable +#define _TCA8418_REG_CFG_INT_CFG 0x10 // Interrupt config +#define _TCA8418_REG_CFG_OVR_FLOW_IEN 0x08 // Overflow interrupt enable +#define _TCA8418_REG_CFG_K_LCK_IEN 0x04 // Keypad lock interrupt enable +#define _TCA8418_REG_CFG_GPI_IEN 0x02 // GPI interrupt enable +#define _TCA8418_REG_CFG_KE_IEN 0x01 // Key events interrupt enable + +// FIELDS INT_STAT REGISTER 2 +#define _TCA8418_REG_STAT_CAD_INT 0x10 // Ctrl-alt-del seq status +#define _TCA8418_REG_STAT_OVR_FLOW_INT 0x08 // Overflow interrupt status +#define _TCA8418_REG_STAT_K_LCK_INT 0x04 // Key lock interrupt status +#define _TCA8418_REG_STAT_GPI_INT 0x02 // GPI interrupt status +#define _TCA8418_REG_STAT_K_INT 0x01 // Key events interrupt status + +// FIELDS KEY_LCK_EC REGISTER 3 +#define _TCA8418_REG_LCK_EC_K_LCK_EN 0x40 // Key lock enable +#define _TCA8418_REG_LCK_EC_LCK_2 0x20 // Keypad lock status 2 +#define _TCA8418_REG_LCK_EC_LCK_1 0x10 // Keypad lock status 1 +#define _TCA8418_REG_LCK_EC_KLEC_3 0x08 // Key event count bit 3 +#define _TCA8418_REG_LCK_EC_KLEC_2 0x04 // Key event count bit 2 +#define _TCA8418_REG_LCK_EC_KLEC_1 0x02 // Key event count bit 1 +#define _TCA8418_REG_LCK_EC_KLEC_0 0x01 // Key event count bit 0 + +// Pin IDs for matrix rows/columns +enum { + _TCA8418_ROW0, // Pin ID for row 0 + _TCA8418_ROW1, // Pin ID for row 1 + _TCA8418_ROW2, // Pin ID for row 2 + _TCA8418_ROW3, // Pin ID for row 3 + _TCA8418_ROW4, // Pin ID for row 4 + _TCA8418_ROW5, // Pin ID for row 5 + _TCA8418_ROW6, // Pin ID for row 6 + _TCA8418_ROW7, // Pin ID for row 7 + _TCA8418_COL0, // Pin ID for column 0 + _TCA8418_COL1, // Pin ID for column 1 + _TCA8418_COL2, // Pin ID for column 2 + _TCA8418_COL3, // Pin ID for column 3 + _TCA8418_COL4, // Pin ID for column 4 + _TCA8418_COL5, // Pin ID for column 5 + _TCA8418_COL6, // Pin ID for column 6 + _TCA8418_COL7, // Pin ID for column 7 + _TCA8418_COL8, // Pin ID for column 8 + _TCA8418_COL9 // Pin ID for column 9 +}; + +#define _TCA8418_COLS 3 +#define _TCA8418_ROWS 4 +#define _TCA8418_NUM_KEYS 12 + +uint8_t TCA8418TapMod[_TCA8418_NUM_KEYS] = {13, 7, 7, 7, 7, 7, + 9, 7, 9, 2, 2, 2}; // Num chars per key, Modulus for rotating through characters + +unsigned char TCA8418TapMap[_TCA8418_NUM_KEYS][13] = { + {'1', '.', ',', '?', '!', ':', ';', '-', '_', '\\', '/', '(', ')'}, // 1 + {'2', 'a', 'b', 'c', 'A', 'B', 'C'}, // 2 + {'3', 'd', 'e', 'f', 'D', 'E', 'F'}, // 3 + {'4', 'g', 'h', 'i', 'G', 'H', 'I'}, // 4 + {'5', 'j', 'k', 'l', 'J', 'K', 'L'}, // 5 + {'6', 'm', 'n', 'o', 'M', 'N', 'O'}, // 6 + {'7', 'p', 'q', 'r', 's', 'P', 'Q', 'R', 'S'}, // 7 + {'8', 't', 'u', 'v', 'T', 'U', 'V'}, // 8 + {'9', 'w', 'x', 'y', 'z', 'W', 'X', 'Y', 'Z'}, // 9 + {'*', '+'}, // * + {'0', ' '}, // 0 + {'#', '@'}, // # +}; + +unsigned char TCA8418LongPressMap[_TCA8418_NUM_KEYS] = { + _TCA8418_ESC, // 1 + _TCA8418_UP, // 2 + _TCA8418_NONE, // 3 + _TCA8418_LEFT, // 4 + _TCA8418_NONE, // 5 + _TCA8418_RIGHT, // 6 + _TCA8418_NONE, // 7 + _TCA8418_DOWN, // 8 + _TCA8418_NONE, // 9 + _TCA8418_BSP, // * + _TCA8418_NONE, // 0 + _TCA8418_NONE, // # +}; + +#define _TCA8418_LONG_PRESS_THRESHOLD 2000 +#define _TCA8418_MULTI_TAP_THRESHOLD 750 + +TCA8418Keyboard::TCA8418Keyboard() : m_wire(nullptr), m_addr(0), readCallback(nullptr), writeCallback(nullptr) +{ + state = Init; + last_key = -1; + next_key = -1; + should_backspace = false; + last_tap = 0L; + char_idx = 0; + tap_interval = 0; + backlight_on = true; + queue = ""; +} + +void TCA8418Keyboard::begin(uint8_t addr, TwoWire *wire) +{ + m_addr = addr; + m_wire = wire; + + m_wire->begin(); + + reset(); +} + +void TCA8418Keyboard::begin(i2c_com_fptr_t r, i2c_com_fptr_t w, uint8_t addr) +{ + m_addr = addr; + m_wire = nullptr; + writeCallback = w; + readCallback = r; + reset(); +} + +void TCA8418Keyboard::reset() +{ + LOG_DEBUG("TCA8418 Reset"); + // GPIO + // set default all GIO pins to INPUT + writeRegister(_TCA8418_REG_GPIO_DIR_1, 0x00); + writeRegister(_TCA8418_REG_GPIO_DIR_2, 0x00); + // Set COL9 as GPIO output + writeRegister(_TCA8418_REG_GPIO_DIR_3, 0x02); + // Switch off keyboard backlight (COL9 = LOW) + writeRegister(_TCA8418_REG_GPIO_DAT_OUT_3, 0x00); + + // add all pins to key events + writeRegister(_TCA8418_REG_GPI_EM_1, 0xFF); + writeRegister(_TCA8418_REG_GPI_EM_2, 0xFF); + writeRegister(_TCA8418_REG_GPI_EM_3, 0xFF); + + // set all pins to FALLING interrupts + writeRegister(_TCA8418_REG_GPIO_INT_LVL_1, 0x00); + writeRegister(_TCA8418_REG_GPIO_INT_LVL_2, 0x00); + writeRegister(_TCA8418_REG_GPIO_INT_LVL_3, 0x00); + + // add all pins to interrupts + writeRegister(_TCA8418_REG_GPIO_INT_EN_1, 0xFF); + writeRegister(_TCA8418_REG_GPIO_INT_EN_2, 0xFF); + writeRegister(_TCA8418_REG_GPIO_INT_EN_3, 0xFF); + + // Set keyboard matrix size + matrix(_TCA8418_ROWS, _TCA8418_COLS); + enableDebounce(); + flush(); + state = Idle; +} + +bool TCA8418Keyboard::matrix(uint8_t rows, uint8_t columns) +{ + if ((rows > 8) || (columns > 10)) + return false; + + // Skip zero size matrix + if ((rows != 0) && (columns != 0)) { + // Setup the keypad matrix. + uint8_t mask = 0x00; + for (int r = 0; r < rows; r++) { + mask <<= 1; + mask |= 1; + } + writeRegister(_TCA8418_REG_KP_GPIO_1, mask); + + mask = 0x00; + for (int c = 0; c < columns && c < 8; c++) { + mask <<= 1; + mask |= 1; + } + writeRegister(_TCA8418_REG_KP_GPIO_2, mask); + + if (columns > 8) { + if (columns == 9) + mask = 0x01; + else + mask = 0x03; + writeRegister(_TCA8418_REG_KP_GPIO_3, mask); + } + } + + return true; +} + +uint8_t TCA8418Keyboard::keyCount() const +{ + uint8_t eventCount = readRegister(_TCA8418_REG_KEY_LCK_EC); + eventCount &= 0x0F; // lower 4 bits only + return eventCount; +} + +bool TCA8418Keyboard::hasEvent() +{ + return queue.length() > 0; +} + +void TCA8418Keyboard::queueEvent(char next) +{ + if (next == _TCA8418_NONE) { + return; + } + queue.concat(next); +} + +char TCA8418Keyboard::dequeueEvent() +{ + if (queue.length() < 1) { + return _TCA8418_NONE; + } + char next = queue.charAt(0); + queue.remove(0, 1); + return next; +} + +void TCA8418Keyboard::trigger() +{ + if (keyCount() == 0) { + return; + } + if (state != Init) { + // Read the key register + uint8_t k = readRegister(_TCA8418_REG_KEY_EVENT_A); + uint8_t key = k & 0x7F; + if (k & 0x80) { + if (state == Idle) + pressed(key); + return; + } else { + if (state == Held) { + released(); + } + state = Idle; + return; + } + } else { + reset(); + } +} + +void TCA8418Keyboard::pressed(uint8_t key) +{ + if (state == Init || state == Busy) { + return; + } + uint8_t next_key = 0; + int row = (key - 1) / 10; + int col = (key - 1) % 10; + + if (row >= _TCA8418_ROWS || col >= _TCA8418_COLS) { + return; // Invalid key + } + + // Compute key index based on dynamic row/column + next_key = row * _TCA8418_COLS + col; + + // LOG_DEBUG("TCA8418: Key %u -> Next Key %u", key, next_key); + + state = Held; + uint32_t now = millis(); + tap_interval = now - last_tap; + if (tap_interval < 0) { + // Long running, millis has overflowed. + last_tap = 0; + state = Busy; + return; + } + + // Check if the key is the same as the last one or if the time interval has passed + if (next_key != last_key || tap_interval > _TCA8418_MULTI_TAP_THRESHOLD) { + char_idx = 0; // Reset char index if new key or long press + should_backspace = false; // dont backspace on new key + } else { + char_idx += 1; // Cycle through characters if same key pressed + should_backspace = true; // allow backspace on same key + } + + // Store the current key as the last key + last_key = next_key; + last_tap = now; +} + +void TCA8418Keyboard::released() +{ + if (state != Held) { + return; + } + + if (last_key < 0 || last_key > _TCA8418_NUM_KEYS) { // reset to idle if last_key out of bounds + last_key = -1; + state = Idle; + return; + } + uint32_t now = millis(); + int32_t held_interval = now - last_tap; + last_tap = now; + if (tap_interval < _TCA8418_MULTI_TAP_THRESHOLD && should_backspace) { + queueEvent(_TCA8418_BSP); + } + if (held_interval > _TCA8418_LONG_PRESS_THRESHOLD) { + queueEvent(TCA8418LongPressMap[last_key]); + // LOG_DEBUG("Long Press Key: %i Map: %i", last_key, TCA8418LongPressMap[last_key]); + } else { + queueEvent(TCA8418TapMap[last_key][(char_idx % TCA8418TapMod[last_key])]); + // LOG_DEBUG("Key Press: %i Index:%i if %i Map: %c", last_key, char_idx, TCA8418TapMod[last_key], + // TCA8418TapMap[last_key][(char_idx % TCA8418TapMod[last_key])]); + } +} + +uint8_t TCA8418Keyboard::flush() +{ + // Flush key events + uint8_t count = 0; + while (readRegister(_TCA8418_REG_KEY_EVENT_A) != 0) + count++; + // Flush gpio events + readRegister(_TCA8418_REG_GPIO_INT_STAT_1); + readRegister(_TCA8418_REG_GPIO_INT_STAT_2); + readRegister(_TCA8418_REG_GPIO_INT_STAT_3); + // Clear INT_STAT register + writeRegister(_TCA8418_REG_INT_STAT, 3); + return count; +} + +uint8_t TCA8418Keyboard::digitalRead(uint8_t pinnum) const +{ + if (pinnum > _TCA8418_COL9) + return 0xFF; + + uint8_t reg = _TCA8418_REG_GPIO_DAT_STAT_1 + pinnum / 8; + uint8_t mask = (1 << (pinnum % 8)); + + // Level 0 = low other = high + uint8_t value = readRegister(reg); + if (value & mask) + return HIGH; + return LOW; +} + +bool TCA8418Keyboard::digitalWrite(uint8_t pinnum, uint8_t level) +{ + if (pinnum > _TCA8418_COL9) + return false; + + uint8_t reg = _TCA8418_REG_GPIO_DAT_OUT_1 + pinnum / 8; + uint8_t mask = (1 << (pinnum % 8)); + + // Level 0 = low other = high + uint8_t value = readRegister(reg); + if (level == LOW) + value &= ~mask; + else + value |= mask; + writeRegister(reg, value); + return true; +} + +bool TCA8418Keyboard::pinMode(uint8_t pinnum, uint8_t mode) +{ + if (pinnum > _TCA8418_COL9) + return false; + + uint8_t idx = pinnum / 8; + uint8_t reg = _TCA8418_REG_GPIO_DIR_1 + idx; + uint8_t mask = (1 << (pinnum % 8)); + + // Mode 0 = input 1 = output + uint8_t value = readRegister(reg); + if (mode == OUTPUT) + value |= mask; + else + value &= ~mask; + writeRegister(reg, value); + + // Pullup 0 = enabled 1 = disabled + reg = _TCA8418_REG_GPIO_PULL_1 + idx; + value = readRegister(reg); + if (mode == INPUT_PULLUP) + value &= ~mask; + else + value |= mask; + writeRegister(reg, value); + + return true; +} + +bool TCA8418Keyboard::pinIRQMode(uint8_t pinnum, uint8_t mode) +{ + if (pinnum > _TCA8418_COL9) + return false; + if ((mode != RISING) && (mode != FALLING)) + return false; + + // Mode 0 = falling 1 = rising + uint8_t idx = pinnum / 8; + uint8_t reg = _TCA8418_REG_GPIO_INT_LVL_1 + idx; + uint8_t mask = (1 << (pinnum % 8)); + + uint8_t value = readRegister(reg); + if (mode == RISING) + value |= mask; + else + value &= ~mask; + writeRegister(reg, value); + + // Enable interrupt + reg = _TCA8418_REG_GPIO_INT_EN_1 + idx; + value = readRegister(reg); + value |= mask; + writeRegister(reg, value); + + return true; +} + +void TCA8418Keyboard::enableInterrupts() +{ + uint8_t value = readRegister(_TCA8418_REG_CFG); + value |= (_TCA8418_REG_CFG_GPI_IEN | _TCA8418_REG_CFG_KE_IEN); + writeRegister(_TCA8418_REG_CFG, value); +}; + +void TCA8418Keyboard::disableInterrupts() +{ + uint8_t value = readRegister(_TCA8418_REG_CFG); + value &= ~(_TCA8418_REG_CFG_GPI_IEN | _TCA8418_REG_CFG_KE_IEN); + writeRegister(_TCA8418_REG_CFG, value); +}; + +void TCA8418Keyboard::enableMatrixOverflow() +{ + uint8_t value = readRegister(_TCA8418_REG_CFG); + value |= _TCA8418_REG_CFG_OVR_FLOW_M; + writeRegister(_TCA8418_REG_CFG, value); +}; + +void TCA8418Keyboard::disableMatrixOverflow() +{ + uint8_t value = readRegister(_TCA8418_REG_CFG); + value &= ~_TCA8418_REG_CFG_OVR_FLOW_M; + writeRegister(_TCA8418_REG_CFG, value); +}; + +void TCA8418Keyboard::enableDebounce() +{ + writeRegister(_TCA8418_REG_DEBOUNCE_DIS_1, 0x00); + writeRegister(_TCA8418_REG_DEBOUNCE_DIS_2, 0x00); + writeRegister(_TCA8418_REG_DEBOUNCE_DIS_3, 0x00); +} + +void TCA8418Keyboard::disableDebounce() +{ + writeRegister(_TCA8418_REG_DEBOUNCE_DIS_1, 0xFF); + writeRegister(_TCA8418_REG_DEBOUNCE_DIS_2, 0xFF); + writeRegister(_TCA8418_REG_DEBOUNCE_DIS_3, 0xFF); +} + +void TCA8418Keyboard::setBacklight(bool on) +{ + if (on) { + digitalWrite(_TCA8418_COL9, HIGH); + } else { + digitalWrite(_TCA8418_COL9, LOW); + } +} + +uint8_t TCA8418Keyboard::readRegister(uint8_t reg) const +{ + if (m_wire) { + m_wire->beginTransmission(m_addr); + m_wire->write(reg); + m_wire->endTransmission(); + + m_wire->requestFrom(m_addr, (uint8_t)1); + if (m_wire->available() < 1) + return 0; + + return m_wire->read(); + } + if (readCallback) { + uint8_t data; + readCallback(m_addr, reg, &data, 1); + return data; + } + return 0; +} + +void TCA8418Keyboard::writeRegister(uint8_t reg, uint8_t value) +{ + uint8_t data[2]; + data[0] = reg; + data[1] = value; + + if (m_wire) { + m_wire->beginTransmission(m_addr); + m_wire->write(data, sizeof(uint8_t) * 2); + m_wire->endTransmission(); + } + if (writeCallback) { + writeCallback(m_addr, data[0], &(data[1]), 1); + } +} \ No newline at end of file diff --git a/src/input/TCA8418Keyboard.h b/src/input/TCA8418Keyboard.h new file mode 100644 index 000000000..c7f3c1f28 --- /dev/null +++ b/src/input/TCA8418Keyboard.h @@ -0,0 +1,83 @@ +// Based on the MPR121 Keyboard and Adafruit TCA8418 library +#include "configuration.h" +#include + +#define _TCA8418_NONE 0x00 +#define _TCA8418_REBOOT 0x90 +#define _TCA8418_LEFT 0xb4 +#define _TCA8418_UP 0xb5 +#define _TCA8418_DOWN 0xb6 +#define _TCA8418_RIGHT 0xb7 +#define _TCA8418_ESC 0x1b +#define _TCA8418_BSP 0x08 +#define _TCA8418_SELECT 0x0d + +class TCA8418Keyboard +{ + public: + typedef uint8_t (*i2c_com_fptr_t)(uint8_t dev_addr, uint8_t reg_addr, uint8_t *data, uint8_t len); + + enum KeyState { Init = 0, Idle, Held, Busy }; + + KeyState state; + int8_t last_key; + int8_t next_key; + bool should_backspace; + uint32_t last_tap; + uint8_t char_idx; + int32_t tap_interval; + bool backlight_on; + + String queue; + + TCA8418Keyboard(); + + void begin(uint8_t addr = XPOWERS_AXP192_AXP2101_ADDRESS, TwoWire *wire = &Wire); + void begin(i2c_com_fptr_t r, i2c_com_fptr_t w, uint8_t addr = XPOWERS_AXP192_AXP2101_ADDRESS); + + void reset(void); + // Configure the size of the keypad. + // All other rows and columns are set as inputs. + bool matrix(uint8_t rows, uint8_t columns); + + // Flush all events in the FIFO buffer + GPIO events. + uint8_t flush(void); + + // Key events available in the internal FIFO buffer. + uint8_t keyCount(void) const; + + void trigger(void); + void pressed(uint8_t key); + void released(void); + bool hasEvent(void); + char dequeueEvent(void); + void queueEvent(char); + + uint8_t digitalRead(uint8_t pinnum) const; + bool digitalWrite(uint8_t pinnum, uint8_t level); + bool pinMode(uint8_t pinnum, uint8_t mode); + bool pinIRQMode(uint8_t pinnum, uint8_t mode); // MODE FALLING or RISING + + // enable / disable interrupts for matrix and GPI pins + void enableInterrupts(); + void disableInterrupts(); + + // ignore key events when FIFO buffer is full or not. + void enableMatrixOverflow(); + void disableMatrixOverflow(); + + // debounce keys. + void enableDebounce(); + void disableDebounce(); + + void setBacklight(bool on); + + uint8_t readRegister(uint8_t reg) const; + void writeRegister(uint8_t reg, uint8_t value); + + private: + TwoWire *m_wire; + uint8_t m_addr; + i2c_com_fptr_t readCallback; + i2c_com_fptr_t writeCallback; +}; diff --git a/src/input/cardKbI2cImpl.cpp b/src/input/cardKbI2cImpl.cpp index eb9b07d6e..21ecf381a 100644 --- a/src/input/cardKbI2cImpl.cpp +++ b/src/input/cardKbI2cImpl.cpp @@ -12,8 +12,8 @@ void CardKbI2cImpl::init() #if !MESHTASTIC_EXCLUDE_I2C && !defined(ARCH_PORTDUINO) && !defined(I2C_NO_RESCAN) if (cardkb_found.address == 0x00) { LOG_DEBUG("Rescan for I2C keyboard"); - uint8_t i2caddr_scan[] = {CARDKB_ADDR, TDECK_KB_ADDR, BBQ10_KB_ADDR, MPR121_KB_ADDR}; - uint8_t i2caddr_asize = 4; + uint8_t i2caddr_scan[] = {CARDKB_ADDR, TDECK_KB_ADDR, BBQ10_KB_ADDR, MPR121_KB_ADDR, XPOWERS_AXP192_AXP2101_ADDRESS}; + uint8_t i2caddr_asize = 5; auto i2cScanner = std::unique_ptr(new ScanI2CTwoWire()); #if WIRE_INTERFACES_COUNT == 2 @@ -43,6 +43,10 @@ void CardKbI2cImpl::init() // assign an arbitrary value to distinguish from other models kb_model = 0x37; break; + case ScanI2C::DeviceType::TCA8418KB: + // assign an arbitrary value to distinguish from other models + kb_model = 0x84; + break; default: // use this as default since it's also just zero LOG_WARN("kb_info.type is unknown(0x%02x), setting kb_model=0x00", kb_info.type); diff --git a/src/input/kbI2cBase.cpp b/src/input/kbI2cBase.cpp index 9b1a27745..70e9e4365 100644 --- a/src/input/kbI2cBase.cpp +++ b/src/input/kbI2cBase.cpp @@ -43,6 +43,9 @@ int32_t KbI2cBase::runOnce() if (cardkb_found.address == MPR121_KB_ADDR) { MPRkeyboard.begin(MPR121_KB_ADDR, &Wire1); } + if (cardkb_found.address == XPOWERS_AXP192_AXP2101_ADDRESS) { + TCAKeyboard.begin(XPOWERS_AXP192_AXP2101_ADDRESS, &Wire1); + } break; #endif case ScanI2C::WIRE: @@ -55,6 +58,9 @@ int32_t KbI2cBase::runOnce() if (cardkb_found.address == MPR121_KB_ADDR) { MPRkeyboard.begin(MPR121_KB_ADDR, &Wire); } + if (cardkb_found.address == XPOWERS_AXP192_AXP2101_ADDRESS) { + TCAKeyboard.begin(XPOWERS_AXP192_AXP2101_ADDRESS, &Wire); + } break; case ScanI2C::NO_I2C: default: @@ -226,6 +232,68 @@ int32_t KbI2cBase::runOnce() } break; } + case 0x84: { // Adafruit TCA8418 + TCAKeyboard.trigger(); + InputEvent e; + while (TCAKeyboard.hasEvent()) { + char nextEvent = TCAKeyboard.dequeueEvent(); + e.inputEvent = ANYKEY; + e.kbchar = 0x00; + e.source = this->_originName; + switch (nextEvent) { + case _TCA8418_NONE: + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE; + e.kbchar = 0x00; + break; + case _TCA8418_REBOOT: + e.inputEvent = ANYKEY; + e.kbchar = INPUT_BROKER_MSG_REBOOT; + break; + case _TCA8418_LEFT: + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT; + e.kbchar = 0x00; + break; + case _TCA8418_UP: + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP; + e.kbchar = 0x00; + break; + case _TCA8418_DOWN: + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN; + e.kbchar = 0x00; + break; + case _TCA8418_RIGHT: + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT; + e.kbchar = 0x00; + break; + case _TCA8418_BSP: + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK; + e.kbchar = 0x08; + break; + case _TCA8418_SELECT: + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT; + e.kbchar = 0x0d; + break; + case _TCA8418_ESC: + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL; + e.kbchar = 0x1b; + break; + default: + if (nextEvent > 127) { + e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE; + e.kbchar = 0x00; + break; + } + e.inputEvent = ANYKEY; + e.kbchar = nextEvent; + break; + } + if (e.inputEvent != meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE) { + LOG_DEBUG("TCA8418 Notifying: %i Char: %c", e.inputEvent, e.kbchar); + this->notifyObservers(&e); + } + } + break; + } case 0x02: { // RAK14004 uint8_t rDataBuf[8] = {0}; diff --git a/src/input/kbI2cBase.h b/src/input/kbI2cBase.h index dc2414fc0..8193433fe 100644 --- a/src/input/kbI2cBase.h +++ b/src/input/kbI2cBase.h @@ -3,6 +3,7 @@ #include "BBQ10Keyboard.h" #include "InputBroker.h" #include "MPR121Keyboard.h" +#include "TCA8418Keyboard.h" #include "Wire.h" #include "concurrency/OSThread.h" @@ -21,5 +22,6 @@ class KbI2cBase : public Observable, public concurrency::OST BBQ10Keyboard Q10keyboard; MPR121Keyboard MPRkeyboard; + TCA8418Keyboard TCAKeyboard; bool is_sym = false; }; \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 4b098b3f3..fd65830ef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -587,6 +587,10 @@ void setup() // assign an arbitrary value to distinguish from other models kb_model = 0x37; break; + case ScanI2C::DeviceType::TCA8418KB: + // assign an arbitrary value to distinguish from other models + kb_model = 0x84; + break; default: // use this as default since it's also just zero LOG_WARN("kb_info.type is unknown(0x%02x), setting kb_model=0x00", kb_info.type); From 4dfba503044d7d77bdd40f151aa95e6df80cb8bb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 20:23:44 -0500 Subject: [PATCH 030/100] [create-pull-request] automated change (#6490) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 484d002a5..13a3e5dce 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 484d002a52bc20fa9f91ebf1b216d585c5f93a1b +Subproject commit 13a3e5dcee25a2d2d4f1fbaba4c091c66d698ca5 diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index defaaad28..191f9e121 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -237,6 +237,8 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_T_ETH_ELITE = 91, /* Heltec HRI-3621 industrial probe */ meshtastic_HardwareModel_HELTEC_SENSOR_HUB = 92, + /* Reserved Fried Chicken ID for future use */ + meshtastic_HardwareModel_RESERVED_FRIED_CHICKEN = 93, /* ------------------------------------------------------------------------------------------------------------------------------------------ Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. ------------------------------------------------------------------------------------------------------------------------------------------ */ From 01102754945ac2bc8d52062fcb2b4a446ea35b35 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 4 Apr 2025 04:59:31 -0500 Subject: [PATCH 031/100] Revert "Try-fix ESP32 wifi disconnects (#6363)" (#6493) This reverts commit a902776e578bc2574c95eff8c13402e8cb5f5fbd. --- src/mesh/wifi/WiFiAPClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/wifi/WiFiAPClient.cpp b/src/mesh/wifi/WiFiAPClient.cpp index e050c2057..4d0b74f7c 100644 --- a/src/mesh/wifi/WiFiAPClient.cpp +++ b/src/mesh/wifi/WiFiAPClient.cpp @@ -163,7 +163,7 @@ static int32_t reconnectWiFi() delay(5000); if (!WiFi.isConnected()) { -#ifdef ARCH_ESP32 +#ifdef CONFIG_IDF_TARGET_ESP32C3 WiFi.mode(WIFI_MODE_NULL); WiFi.useStaticBuffers(true); WiFi.mode(WIFI_STA); From 25237a15ff68d482c16369b4b802a2931b733ab2 Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Fri, 4 Apr 2025 23:53:54 +1300 Subject: [PATCH 032/100] feat: menu entry to send adhoc-ping (#6492) --- .../InkHUD/Applets/System/Menu/MenuAction.h | 3 +-- .../InkHUD/Applets/System/Menu/MenuApplet.cpp | 21 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h index 4f8205647..f162aa385 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h +++ b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h @@ -18,8 +18,7 @@ namespace NicheGraphics::InkHUD enum MenuAction { NO_ACTION, - SEND_NODEINFO, - SEND_POSITION, + SEND_PING, SHUTDOWN, NEXT_TILE, TOGGLE_BACKLIGHT, diff --git a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp index f59579230..5ca9692c8 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp +++ b/src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp @@ -4,6 +4,7 @@ #include "RTC.h" +#include "MeshService.h" #include "airtime.h" #include "main.h" #include "power.h" @@ -144,6 +145,14 @@ void InkHUD::MenuApplet::execute(MenuItem item) inkhud->nextTile(); break; + case SEND_PING: + service->refreshLocalMeshNode(); + service->trySendPosition(NODENUM_BROADCAST, true); + + // Force the next refresh to use FULL, to protect the display, as some users will probably spam this button + inkhud->forceUpdate(Drivers::EInk::UpdateTypes::FULL); + break; + case ROTATE: inkhud->rotate(); break; @@ -242,7 +251,7 @@ void InkHUD::MenuApplet::showPage(MenuPage page) if (settings->optionalMenuItems.nextTile && settings->userTiles.count > 1) items.push_back(MenuItem("Next Tile", MenuAction::NEXT_TILE, MenuPage::ROOT)); // Only if multiple applets shown - // items.push_back(MenuItem("Send", MenuPage::SEND)); // TODO + items.push_back(MenuItem("Send", MenuPage::SEND)); items.push_back(MenuItem("Options", MenuPage::OPTIONS)); // items.push_back(MenuItem("Display Off", MenuPage::EXIT)); // TODO items.push_back(MenuItem("Save & Shut Down", MenuAction::SHUTDOWN)); @@ -250,9 +259,8 @@ void InkHUD::MenuApplet::showPage(MenuPage page) break; case SEND: - items.push_back(MenuItem("Send Message", MenuPage::EXIT)); - items.push_back(MenuItem("Send NodeInfo", MenuAction::SEND_NODEINFO)); - items.push_back(MenuItem("Send Position", MenuAction::SEND_POSITION)); + items.push_back(MenuItem("Ping", MenuAction::SEND_PING, MenuPage::EXIT)); + // Todo: canned messages items.push_back(MenuItem("Exit", MenuPage::EXIT)); break; @@ -389,11 +397,14 @@ void InkHUD::MenuApplet::onRender() // Center-line for the text int16_t center = itemT + (itemH / 2); + // Box, if currently selected if (cursorShown && i == cursor) drawRect(itemL, itemT, itemW, itemH, BLACK); + + // Item's text printAt(itemL + X(padding), center, item.label, LEFT, MIDDLE); - // Testing only: circle instead of check box + // Checkbox, if relevant if (item.checkState) { const uint16_t cbWH = fontSmall.lineHeight(); // Checkbox: width / height const int16_t cbL = itemR - X(padding) - cbWH; // Checkbox: left From 1b33189fe62d57b067b98facd84656531903457b Mon Sep 17 00:00:00 2001 From: Nasimovy Date: Fri, 4 Apr 2025 13:35:15 +0000 Subject: [PATCH 033/100] remove duplicate HAS_LP5562 introduced by #6422 (#6494) --- src/detect/ScanI2CTwoWire.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index 230271b94..9781cbf56 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -227,9 +227,6 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) type = PMU_AXP192_AXP2101; } break; -#ifdef HAS_LP5562 - SCAN_SIMPLE_CASE(LP5562_ADDR, LP5562, "LP5562", (uint8_t)addr.address); -#endif case BME_ADDR: case BME_ADDR_ALTERNATE: registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xD0), 1); // GET_ID From 56eb0c08b288b5b549399a5f441f07c51bc8d459 Mon Sep 17 00:00:00 2001 From: Chris LaFlash Date: Sat, 5 Apr 2025 20:49:01 -0700 Subject: [PATCH 034/100] Add support for Quectel-L96, a MT3333 module (#6498) --- src/gps/GPS.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 41a2ff980..a2e7ebbc7 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -1206,7 +1206,8 @@ GnssModel_t GPS::probe(int serialSpeed) delay(20); std::vector mtk = {{"L76B", "Quectel-L76B", GNSS_MODEL_MTK_L76B}, {"PA1616S", "1616S", GNSS_MODEL_MTK_PA1616S}, - {"LS20031", "MC-1513", GNSS_MODEL_MTK_L76B}}; + {"LS20031", "MC-1513", GNSS_MODEL_MTK_L76B}, + {"L96", "Quectel-L96", GNSS_MODEL_MTK_L76B}}; PROBE_FAMILY("MTK Family", "$PMTK605*31", mtk, 500); uint8_t cfg_rate[] = {0xB5, 0x62, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00}; From 2125c039745aa06248b2e76819303a9c99c4de63 Mon Sep 17 00:00:00 2001 From: Nasimovy Date: Mon, 7 Apr 2025 01:27:46 +0000 Subject: [PATCH 035/100] Fix for PSRAM detection on ESP32-S3R8 and t-beam (#6504) * remove duplicate HAS_LP5562 introduced by #6422 * T190 PSRAM fix * all the boards with a ESP32-S3R8 * T-beam V1.1 PSRAM --- boards/heltec_vision_master_e213.json | 4 +++- boards/heltec_vision_master_e290.json | 4 +++- boards/heltec_vision_master_t190.json | 4 +++- boards/seeed-sensecap-indicator.json | 1 + boards/seeed-xiao-s3.json | 1 + boards/t-watch-s3.json | 1 + variants/tbeam/platformio.ini | 2 ++ 7 files changed, 14 insertions(+), 3 deletions(-) diff --git a/boards/heltec_vision_master_e213.json b/boards/heltec_vision_master_e213.json index bf5fe15ad..152515cf3 100644 --- a/boards/heltec_vision_master_e213.json +++ b/boards/heltec_vision_master_e213.json @@ -2,7 +2,8 @@ "build": { "arduino": { "ldscript": "esp32s3_out.ld", - "partitions": "default_8MB.csv" + "partitions": "default_8MB.csv", + "memory_type": "qio_opi" }, "core": "esp32", "extra_flags": [ @@ -15,6 +16,7 @@ "f_cpu": "240000000L", "f_flash": "80000000L", "flash_mode": "qio", + "psram_type": "opi", "hwids": [ ["0x303A", "0x1001"], ["0x303A", "0x0002"] diff --git a/boards/heltec_vision_master_e290.json b/boards/heltec_vision_master_e290.json index 70f7d5f02..b7cbac878 100644 --- a/boards/heltec_vision_master_e290.json +++ b/boards/heltec_vision_master_e290.json @@ -2,7 +2,8 @@ "build": { "arduino": { "ldscript": "esp32s3_out.ld", - "partitions": "default_8MB.csv" + "partitions": "default_8MB.csv", + "memory_type": "qio_opi" }, "core": "esp32", "extra_flags": [ @@ -15,6 +16,7 @@ "f_cpu": "240000000L", "f_flash": "80000000L", "flash_mode": "qio", + "psram_type": "opi", "hwids": [ ["0x303A", "0x1001"], ["0x303A", "0x0002"] diff --git a/boards/heltec_vision_master_t190.json b/boards/heltec_vision_master_t190.json index 341e70218..440f76ad0 100644 --- a/boards/heltec_vision_master_t190.json +++ b/boards/heltec_vision_master_t190.json @@ -2,7 +2,8 @@ "build": { "arduino": { "ldscript": "esp32s3_out.ld", - "partitions": "default_8MB.csv" + "partitions": "default_8MB.csv", + "memory_type": "qio_opi" }, "core": "esp32", "extra_flags": [ @@ -15,6 +16,7 @@ "f_cpu": "240000000L", "f_flash": "80000000L", "flash_mode": "qio", + "psram_type": "opi", "hwids": [ ["0x303A", "0x1001"], ["0x303A", "0x0002"] diff --git a/boards/seeed-sensecap-indicator.json b/boards/seeed-sensecap-indicator.json index 0a02fc882..03bff35b5 100644 --- a/boards/seeed-sensecap-indicator.json +++ b/boards/seeed-sensecap-indicator.json @@ -18,6 +18,7 @@ "f_boot": "120000000L", "boot": "qio", "flash_mode": "qio", + "psram_type": "opi", "hwids": [["0x1A86", "0x7523"]], "mcu": "esp32s3", "variant": "esp32s3" diff --git a/boards/seeed-xiao-s3.json b/boards/seeed-xiao-s3.json index 0b7b432a0..6981085dd 100644 --- a/boards/seeed-xiao-s3.json +++ b/boards/seeed-xiao-s3.json @@ -15,6 +15,7 @@ "f_cpu": "240000000L", "f_flash": "80000000L", "flash_mode": "qio", + "psram_type": "opi", "hwids": [["0x2886", "0x0059"]], "mcu": "esp32s3", "variant": "seeed-xiao-s3" diff --git a/boards/t-watch-s3.json b/boards/t-watch-s3.json index 5d4afd322..51bb7cf4b 100644 --- a/boards/t-watch-s3.json +++ b/boards/t-watch-s3.json @@ -16,6 +16,7 @@ "f_cpu": "240000000L", "f_flash": "80000000L", "flash_mode": "qio", + "psram_type": "opi", "hwids": [ ["0x303A", "0x1001"], ["0x303A", "0x0002"] diff --git a/variants/tbeam/platformio.ini b/variants/tbeam/platformio.ini index 85e66c2dd..9049836a3 100644 --- a/variants/tbeam/platformio.ini +++ b/variants/tbeam/platformio.ini @@ -8,4 +8,6 @@ lib_deps = build_flags = ${esp32_base.build_flags} -D TBEAM_V10 -I variants/tbeam -DGPS_POWER_TOGGLE ; comment this line to disable double press function on the user button to turn off gps entirely. + -DBOARD_HAS_PSRAM + -mfix-esp32-psram-cache-issue upload_speed = 921600 \ No newline at end of file From 5a9d70b445930dec9e7175831e79c66d2f203f84 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:39:45 +0200 Subject: [PATCH 036/100] Upgrade trunk (#6509) Co-authored-by: sachaw <11172820+sachaw@users.noreply.github.com> --- .trunk/trunk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index aeb0a1b43..608045e45 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -9,14 +9,14 @@ plugins: lint: enabled: - prettier@3.5.3 - - trufflehog@3.88.20 + - trufflehog@3.88.22 - yamllint@1.37.0 - bandit@1.8.3 - checkov@3.2.396 - terrascan@1.19.9 - trivy@0.61.0 - taplo@0.9.3 - - ruff@0.11.2 + - ruff@0.11.3 - isort@6.0.1 - markdownlint@0.44.0 - oxipng@9.1.4 From 860e8eca5aab7a4586891b3218420624f7b30c31 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 11:51:05 +0200 Subject: [PATCH 037/100] [create-pull-request] automated change (#6511) Co-authored-by: caveman99 <25002+caveman99@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/config.pb.h | 14 ++++++++------ src/mesh/generated/meshtastic/telemetry.pb.h | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/protobufs b/protobufs index 13a3e5dce..5a5ab103d 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 13a3e5dcee25a2d2d4f1fbaba4c091c66d698ca5 +Subproject commit 5a5ab103d2f6aa071fca29417475681a2cec5dcf diff --git a/src/mesh/generated/meshtastic/config.pb.h b/src/mesh/generated/meshtastic/config.pb.h index 848f8df86..edcd7b41c 100644 --- a/src/mesh/generated/meshtastic/config.pb.h +++ b/src/mesh/generated/meshtastic/config.pb.h @@ -180,14 +180,16 @@ typedef enum _meshtastic_Config_DisplayConfig_DisplayUnits { /* Override OLED outo detect with this if it fails. */ typedef enum _meshtastic_Config_DisplayConfig_OledType { - /* Default / Auto */ + /* Default / Autodetect */ meshtastic_Config_DisplayConfig_OledType_OLED_AUTO = 0, - /* Default / Auto */ + /* Default / Autodetect */ meshtastic_Config_DisplayConfig_OledType_OLED_SSD1306 = 1, - /* Default / Auto */ + /* Default / Autodetect */ meshtastic_Config_DisplayConfig_OledType_OLED_SH1106 = 2, /* Can not be auto detected but set by proto. Used for 128x128 screens */ - meshtastic_Config_DisplayConfig_OledType_OLED_SH1107 = 3 + meshtastic_Config_DisplayConfig_OledType_OLED_SH1107 = 3, + /* Can not be auto detected but set by proto. Used for 128x64 screens */ + meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_64 = 4 } meshtastic_Config_DisplayConfig_OledType; typedef enum _meshtastic_Config_DisplayConfig_DisplayMode { @@ -639,8 +641,8 @@ extern "C" { #define _meshtastic_Config_DisplayConfig_DisplayUnits_ARRAYSIZE ((meshtastic_Config_DisplayConfig_DisplayUnits)(meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL+1)) #define _meshtastic_Config_DisplayConfig_OledType_MIN meshtastic_Config_DisplayConfig_OledType_OLED_AUTO -#define _meshtastic_Config_DisplayConfig_OledType_MAX meshtastic_Config_DisplayConfig_OledType_OLED_SH1107 -#define _meshtastic_Config_DisplayConfig_OledType_ARRAYSIZE ((meshtastic_Config_DisplayConfig_OledType)(meshtastic_Config_DisplayConfig_OledType_OLED_SH1107+1)) +#define _meshtastic_Config_DisplayConfig_OledType_MAX meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_64 +#define _meshtastic_Config_DisplayConfig_OledType_ARRAYSIZE ((meshtastic_Config_DisplayConfig_OledType)(meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_64+1)) #define _meshtastic_Config_DisplayConfig_DisplayMode_MIN meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT #define _meshtastic_Config_DisplayConfig_DisplayMode_MAX meshtastic_Config_DisplayConfig_DisplayMode_COLOR diff --git a/src/mesh/generated/meshtastic/telemetry.pb.h b/src/mesh/generated/meshtastic/telemetry.pb.h index 69cdd33fe..dcc511ea6 100644 --- a/src/mesh/generated/meshtastic/telemetry.pb.h +++ b/src/mesh/generated/meshtastic/telemetry.pb.h @@ -242,7 +242,7 @@ typedef struct _meshtastic_AirQualityMetrics { /* 10.0um Particle Count */ bool has_particles_100um; uint32_t particles_100um; - /* 10.0um Particle Count */ + /* CO2 concentration in ppm */ bool has_co2; uint32_t co2; } meshtastic_AirQualityMetrics; From 606abfc1165711f57b12ee0a022660082ec18f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 7 Apr 2025 12:46:22 +0200 Subject: [PATCH 038/100] Fix several features of M1 and M2 (i know what the 7 is now ...) (#6507) * Fix several features of M1 and M2 (i know what the 7 is now ...) * 'THe' should be 'The'. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * remove floating definition --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ben Meadors --- src/ButtonThread.cpp | 138 ++++++++++++------------ src/ButtonThread.h | 13 +-- src/Power.cpp | 29 +++-- src/gps/GPS.cpp | 46 ++++++++ src/graphics/Screen.cpp | 3 + src/main.cpp | 70 ++++++++++-- src/mesh/NodeDB.cpp | 9 ++ src/platform/esp32/main-esp32.cpp | 5 +- src/platform/nrf52/main-nrf52.cpp | 6 +- src/power.h | 5 - variants/ELECROW-ThinkNode-M1/variant.h | 10 +- variants/ELECROW-ThinkNode-M2/variant.h | 11 +- 12 files changed, 221 insertions(+), 124 deletions(-) diff --git a/src/ButtonThread.cpp b/src/ButtonThread.cpp index 2363f804c..375029c99 100644 --- a/src/ButtonThread.cpp +++ b/src/ButtonThread.cpp @@ -116,46 +116,55 @@ ButtonThread::ButtonThread() : OSThread("Button") #endif } +void ButtonThread::switchPage() +{ +#ifdef BUTTON_PIN +#if !defined(USERPREFS_BUTTON_PIN) + if (((config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN) != + moduleConfig.canned_message.inputbroker_pin_press) || + !(moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.rotary1_enabled) || + !moduleConfig.canned_message.enabled) { + powerFSM.trigger(EVENT_PRESS); + } +#endif +#if defined(USERPREFS_BUTTON_PIN) + if (((config.device.button_gpio ? config.device.button_gpio : USERPREFS_BUTTON_PIN) != + moduleConfig.canned_message.inputbroker_pin_press) || + !(moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.rotary1_enabled) || + !moduleConfig.canned_message.enabled) { + powerFSM.trigger(EVENT_PRESS); + } +#endif + +#endif +#if defined(ARCH_PORTDUINO) + if ((settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) && + (settingsMap[user] != moduleConfig.canned_message.inputbroker_pin_press) || + !moduleConfig.canned_message.enabled) { + powerFSM.trigger(EVENT_PRESS); + } +#endif +} + +void ButtonThread::sendAdHocPosition() +{ + service->refreshLocalMeshNode(); + auto sentPosition = service->trySendPosition(NODENUM_BROADCAST, true); + if (screen) { + if (sentPosition) + screen->print("Sent ad-hoc position\n"); + else + screen->print("Sent ad-hoc nodeinfo\n"); + screen->forceDisplay(true); // Force a new UI frame, then force an EInk update + } +} + int32_t ButtonThread::runOnce() { // If the button is pressed we suppress CPU sleep until release canSleep = true; // Assume we should not keep the board awake #if defined(BUTTON_PIN) || defined(USERPREFS_BUTTON_PIN) - // #if defined(ELECROW_ThinkNode_M1) || defined(ELECROW_ThinkNode_M2) - // buzzer_updata(); - // if (buttonPressed) { - // buttonPressed = false; // 清除标志 - // LOG_INFO("PIN_BUTTON2 pressed!"); // 串口打印信息 - // // off_currentTime = millis(); - // while (digitalRead(PIN_BUTTON2) == HIGH) { - // if (cont < 40) { - // // unsigned long currentTime = millis(); // 获取当前时间 - // // if (currentTime - off_currentTime >= 1000) { - // cont++; - // // off_currentTime = currentTime; - // // } - // delay(100); - // } else { - - // currentState = OFF; - // isBuzzing = false; - // cont = 0; - // BEEP_STATE = false; - // analogWrite(M2_buzzer, 0); - // pinMode(M2_buzzer, INPUT); - // screen->setOn(false); - // cont = 0; - // LOG_INFO("GGGGGGGGGGGGGGGGGGGGGGGGG"); - // pinMode(1, OUTPUT); - // digitalWrite(1, LOW); - // pinMode(6, OUTPUT); - // digitalWrite(6, LOW); - // } - // } - // } - - // #endif userButton.tick(); canSleep &= userButton.isIdle(); #elif defined(ARCH_PORTDUINO) @@ -180,32 +189,27 @@ int32_t ButtonThread::runOnce() // If a nag notification is running, stop it and prevent other actions if (moduleConfig.external_notification.enabled && (externalNotificationModule->nagCycleCutoff != UINT32_MAX)) { externalNotificationModule->stopNow(); - return 50; - } -#ifdef BUTTON_PIN -#if !defined(USERPREFS_BUTTON_PIN) - if (((config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN) != -#endif -#if defined(USERPREFS_BUTTON_PIN) - if (((config.device.button_gpio ? config.device.button_gpio : USERPREFS_BUTTON_PIN) != -#endif - moduleConfig.canned_message.inputbroker_pin_press) || - !(moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.rotary1_enabled) || - !moduleConfig.canned_message.enabled) { - powerFSM.trigger(EVENT_PRESS); - } -#endif -#if defined(ARCH_PORTDUINO) - if ((settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) && - (settingsMap[user] != moduleConfig.canned_message.inputbroker_pin_press) || - !moduleConfig.canned_message.enabled) { - powerFSM.trigger(EVENT_PRESS); + break; } +#ifdef ELECROW_ThinkNode_M1 + sendAdHocPosition(); + break; #endif + switchPage(); break; } case BUTTON_EVENT_PRESSED_SCREEN: { + LOG_BUTTON("AltPress!"); +#ifdef ELECROW_ThinkNode_M1 + // If a nag notification is running, stop it and prevent other actions + if (moduleConfig.external_notification.enabled && (externalNotificationModule->nagCycleCutoff != UINT32_MAX)) { + externalNotificationModule->stopNow(); + break; + } + switchPage(); + break; +#endif // turn screen on or off screen_flag = !screen_flag; if (screen) @@ -215,22 +219,18 @@ int32_t ButtonThread::runOnce() case BUTTON_EVENT_DOUBLE_PRESSED: { LOG_BUTTON("Double press!"); - service->refreshLocalMeshNode(); - auto sentPosition = service->trySendPosition(NODENUM_BROADCAST, true); - if (screen) { - if (sentPosition) - screen->print("Sent ad-hoc position\n"); - else - screen->print("Sent ad-hoc nodeinfo\n"); - screen->forceDisplay(true); // Force a new UI frame, then force an EInk update - } +#ifdef ELECROW_ThinkNode_M1 + digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW); + break; +#endif + sendAdHocPosition(); break; } case BUTTON_EVENT_MULTI_PRESSED: { LOG_BUTTON("Mulitipress! %hux", multipressClickCount); switch (multipressClickCount) { -#if HAS_GPS +#if HAS_GPS && !defined(ELECROW_ThinkNode_M1) // 3 clicks: toggle GPS case 3: if (!config.device.disable_triple_click && (gps != nullptr)) { @@ -239,17 +239,17 @@ int32_t ButtonThread::runOnce() screen->forceDisplay(true); // Force a new UI frame, then force an EInk update } break; -#elif defined(ELECROW_ThinkNode_M2) +#elif defined(ELECROW_ThinkNode_M1) || defined(ELECROW_ThinkNode_M2) case 3: LOG_INFO("3 clicks: toggle buzzer"); buzzer_flag = !buzzer_flag; - if (buzzer_flag) { - playBeep(); - } + if (!buzzer_flag) + noTone(PIN_BUZZER); break; + #endif -#if defined(USE_EINK) && defined(PIN_EINK_EN) // i.e. T-Echo +#if defined(USE_EINK) && defined(PIN_EINK_EN) && !defined(ELECROW_ThinkNode_M1) // i.e. T-Echo // 4 clicks: toggle backlight case 4: digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW); diff --git a/src/ButtonThread.h b/src/ButtonThread.h index a8f1f77c3..3af700dd0 100644 --- a/src/ButtonThread.h +++ b/src/ButtonThread.h @@ -37,6 +37,9 @@ class ButtonThread : public concurrency::OSThread void attachButtonInterrupts(); void detachButtonInterrupts(); void storeClickCount(); + bool isBuzzing() { return buzzer_flag; } + void setScreenFlag(bool flag) { screen_flag = flag; } + bool getScreenFlag() { return screen_flag; } // Disconnect and reconnect interrupts for light sleep #ifdef ARCH_ESP32 @@ -72,14 +75,12 @@ class ButtonThread : public concurrency::OSThread static void wakeOnIrq(int irq, int mode); + static void sendAdHocPosition(); + static void switchPage(); + // IRQ callbacks static void userButtonPressed() { btnEvent = BUTTON_EVENT_PRESSED; } - static void userButtonPressedScreen() - { - if (millis() > c_holdOffTime) { - btnEvent = BUTTON_EVENT_PRESSED_SCREEN; - } - } + static void userButtonPressedScreen() { btnEvent = BUTTON_EVENT_PRESSED_SCREEN; } static void userButtonDoublePressed() { btnEvent = BUTTON_EVENT_DOUBLE_PRESSED; } static void userButtonMultiPressed(void *callerThread); // Retrieve click count from non-static Onebutton while still valid static void userButtonPressedLongStart(); diff --git a/src/Power.cpp b/src/Power.cpp index 0dec0fc21..f11f8eac3 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -380,6 +380,20 @@ class AnalogBatteryLevel : public HasBatteryLevel // if we have a integrated device with a battery, we can assume that the battery is always connected #ifdef BATTERY_IMMUTABLE virtual bool isBatteryConnect() override { return true; } +#elif defined(ADC_V) + virtual bool isBatteryConnect() override + { + int lastReading = digitalRead(ADC_V); + // 判断值是否变化 + for (int i = 2; i < 500; i++) { + int reading = digitalRead(ADC_V); + if (reading != lastReading) { + return false; // 有变化,USB供电, 没接电池 + } + } + + return true; + } #else virtual bool isBatteryConnect() override { return getBatteryPercent() != -1; } #endif @@ -533,9 +547,6 @@ Power::Power() : OSThread("Power") { statusHandler = {}; low_voltage_counter = 0; -#if defined(ELECROW_ThinkNode_M1) || defined(POWER_CFG) - low_voltage_counter_led3 = 0; -#endif #ifdef DEBUG_HEAP lastheap = memGet.getFreeHeap(); #endif @@ -716,9 +727,6 @@ void Power::readPowerStatus() const PowerStatus powerStatus2 = PowerStatus(hasBattery, usbPowered, isChargingNow, batteryVoltageMv, batteryChargePercent); LOG_DEBUG("Battery: usbPower=%d, isCharging=%d, batMv=%d, batPct=%d", powerStatus2.getHasUSB(), powerStatus2.getIsCharging(), powerStatus2.getBatteryVoltageMv(), powerStatus2.getBatteryChargePercent()); -#if defined(ELECROW_ThinkNode_M1) || defined(POWER_CFG) - power_num = powerStatus2.getBatteryVoltageMv(); -#endif newStatus.notifyObservers(&powerStatus2); #ifdef DEBUG_HEAP if (lastheap != memGet.getFreeHeap()) { @@ -766,9 +774,6 @@ void Power::readPowerStatus() if (batteryLevel && powerStatus2.getHasBattery() && !powerStatus2.getHasUSB()) { if (batteryLevel->getBattVoltage() < OCV[NUM_OCV_POINTS - 1]) { low_voltage_counter++; -#if defined(ELECROW_ThinkNode_M1) - low_voltage_counter_led3 = low_voltage_counter; -#endif LOG_DEBUG("Low voltage counter: %d/10", low_voltage_counter); if (low_voltage_counter > 10) { #ifdef ARCH_NRF52 @@ -781,13 +786,7 @@ void Power::readPowerStatus() } } else { low_voltage_counter = 0; -#if defined(ELECROW_ThinkNode_M1) - low_voltage_counter_led3 = low_voltage_counter; -#endif } -#ifdef POWER_CFG - low_voltage_counter_led3 = low_voltage_counter; -#endif } } diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index a2e7ebbc7..689f5e204 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -12,6 +12,7 @@ #include "RTC.h" #include "Throttle.h" #include "buzz.h" +#include "concurrency/Periodic.h" #include "meshUtils.h" #include "main.h" // pmu_found @@ -89,6 +90,45 @@ static const char *getGPSPowerStateString(GPSPowerState state) } } +#ifdef PIN_GPS_SWITCH +// If we have a hardware switch, define a periodic watcher outside of the GPS runOnce thread, since this can be sleeping +// idefinitely + +int lastState = LOW; +bool firstrun = true; + +static int32_t gpsSwitch() +{ + if (gps) { + int currentState = digitalRead(PIN_GPS_SWITCH); + + // if the switch is set to zero, disable the GPS Thread + if (firstrun) + if (currentState == LOW) + lastState = HIGH; + + if (currentState != lastState) { + if (currentState == LOW) { + config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_DISABLED; + if (!firstrun) + playGPSDisableBeep(); + gps->disable(); + } else { + config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED; + if (!firstrun) + playGPSEnableBeep(); + gps->enable(); + } + lastState = currentState; + } + firstrun = false; + } + return 1000; +} + +static concurrency::Periodic *gpsPeriodic; +#endif + static void UBXChecksum(uint8_t *message, size_t length) { uint8_t CK_A = 0, CK_B = 0; @@ -1390,6 +1430,12 @@ GPS *GPS::createGps() pinMode(PIN_GPS_PPS, INPUT); #endif +#ifdef PIN_GPS_SWITCH + // toggle GPS via external GPIO switch + pinMode(PIN_GPS_SWITCH, INPUT); + gpsPeriodic = new concurrency::Periodic("GPSSwitch", gpsSwitch); +#endif + // Currently disabled per issue #525 (TinyGPS++ crash bug) // when fixed upstream, can be un-disabled to enable 3D FixType and PDOP #ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index e27495f54..8075dd468 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -30,6 +30,7 @@ along with this program. If not, see . #if !MESHTASTIC_EXCLUDE_GPS #include "GPS.h" #endif +#include "ButtonThread.h" #include "MeshService.h" #include "NodeDB.h" #include "error.h" @@ -1606,6 +1607,7 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver) if (on != screenOn) { if (on) { LOG_INFO("Turn on screen"); + buttonThread->setScreenFlag(true); powerMon->setState(meshtastic_PowerMon_State_Screen_On); #ifdef T_WATCH_S3 PMU->enablePowerOutput(XPOWERS_ALDO2); @@ -1641,6 +1643,7 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver) setScreensaverFrames(einkScreensaver); #endif LOG_INFO("Turn off screen"); + buttonThread->setScreenFlag(false); #ifdef ELECROW_ThinkNode_M1 if (digitalRead(PIN_EINK_EN) == HIGH) { digitalWrite(PIN_EINK_EN, LOW); diff --git a/src/main.cpp b/src/main.cpp index fd65830ef..a528da8af 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -212,6 +212,60 @@ const char *getDeviceName() return name; } +#if defined(ELECROW_ThinkNode_M1) || defined(ELECROW_ThinkNode_M2) +static int32_t ledBlinkCount = 0; + +static int32_t elecrowLedBlinker() +{ + // are we in alert buzzer mode? + if (buttonThread->isBuzzing()) { + + // blink LED three times for 3 seconds, then 3 times for a second, with one second pause + if (ledBlinkCount % 2) { // odd means LED OFF + ledBlink.set(false); + ledBlinkCount++; + if (ledBlinkCount >= 12) + ledBlinkCount = 0; + noTone(PIN_BUZZER); + return 1000; + } else { + if (ledBlinkCount < 6) { + ledBlink.set(true); + tone(PIN_BUZZER, 4000, 3000); + ledBlinkCount++; + return 3000; + } else { + ledBlink.set(true); + tone(PIN_BUZZER, 4000, 1000); + ledBlinkCount++; + return 1000; + } + } + } else { + ledBlinkCount = 0; + if (config.device.led_heartbeat_disabled) + return 1000; + + static bool ledOn; + // when fully charged, remain on! + if (powerStatus->getIsCharging() && powerStatus->getBatteryChargePercent() >= 100) { + ledOn = true; + } else { + ledOn ^= 1; + } + ledBlink.set(ledOn); + // when charging, blink 0.5Hz square wave rate to indicate that + if (powerStatus->getIsCharging()) { + return 500; + } + // When almost empty, blink rapidly + if (!powerStatus->getIsCharging() && powerStatus->getBatteryChargePercent() < 10) { + return 250; + } + } + return 1000; +} +#else static int32_t ledBlinker() { // Still set up the blinking (heartbeat) interval but skip code path below, so LED will blink if @@ -227,6 +281,7 @@ static int32_t ledBlinker() // have a very sparse duty cycle of LED being on, unless charging, then blink 0.5Hz square wave rate to indicate that return powerStatus->getIsCharging() ? 1000 : (ledOn ? 1 : 1000); } +#endif uint32_t timeLastPowered = 0; @@ -263,11 +318,6 @@ void printInfo() void setup() { -#ifdef POWER_CHRG - pinMode(POWER_CHRG, OUTPUT); - digitalWrite(POWER_CHRG, HIGH); -#endif - #if defined(PIN_POWER_EN) pinMode(PIN_POWER_EN, OUTPUT); digitalWrite(PIN_POWER_EN, HIGH); @@ -278,11 +328,6 @@ void setup() digitalWrite(LED_POWER, HIGH); #endif -#ifdef POWER_LED - pinMode(POWER_LED, OUTPUT); - digitalWrite(POWER_LED, HIGH); -#endif - #ifdef USER_LED pinMode(USER_LED, OUTPUT); digitalWrite(USER_LED, LOW); @@ -414,7 +459,12 @@ void setup() OSThread::setup(); +#if defined(ELECROW_ThinkNode_M1) || defined(ELECROW_ThinkNode_M2) + // The ThinkNodes have their own blink logic + ledPeriodic = new Periodic("Blink", elecrowLedBlinker); +#else ledPeriodic = new Periodic("Blink", ledBlinker); +#endif fsInit(); diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 9bb63652a..c89abbe74 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -743,6 +743,15 @@ void NodeDB::installDefaultModuleConfig() moduleConfig.external_notification.output_ms = 100; moduleConfig.external_notification.active = true; #endif +#ifdef ELECROW_ThinkNode_M1 + // Default to Elecrow USER_LED (blue) + moduleConfig.external_notification.enabled = true; + moduleConfig.external_notification.output = USER_LED; + moduleConfig.external_notification.active = true; + moduleConfig.external_notification.alert_message = true; + moduleConfig.external_notification.output_ms = 1000; + moduleConfig.external_notification.nag_timeout = 60; +#endif #ifdef BUTTON_SECONDARY_CANNEDMESSAGES // Use a board's second built-in button as input source for canned messages moduleConfig.canned_message.enabled = true; diff --git a/src/platform/esp32/main-esp32.cpp b/src/platform/esp32/main-esp32.cpp index ab1e5c922..3c4faac3e 100644 --- a/src/platform/esp32/main-esp32.cpp +++ b/src/platform/esp32/main-esp32.cpp @@ -109,9 +109,8 @@ void esp32Setup() randomSeed(seed); */ -#ifdef POWER_FULL - pinMode(POWER_FULL, INPUT); - pinMode(7, INPUT); +#ifdef ADC_V + pinMode(ADC_V, INPUT); #endif LOG_DEBUG("Total heap: %d", ESP.getHeapSize()); diff --git a/src/platform/nrf52/main-nrf52.cpp b/src/platform/nrf52/main-nrf52.cpp index 53971e95a..9accd2a02 100644 --- a/src/platform/nrf52/main-nrf52.cpp +++ b/src/platform/nrf52/main-nrf52.cpp @@ -235,10 +235,6 @@ void nrf52InitSemiHosting() void nrf52Setup() { -#ifdef USB_CHECK - pinMode(USB_CHECK, INPUT); -#endif - #ifdef ADC_V pinMode(ADC_V, INPUT); #endif @@ -288,7 +284,7 @@ void cpuDeepSleep(uint32_t msecToWake) #endif // This may cause crashes as debug messages continue to flow. Serial.end(); -#ifdef PIN_SERIAL_RX1 +#ifdef PIN_SERIAL1_RX Serial1.end(); #endif setBluetoothEnable(false); diff --git a/src/power.h b/src/power.h index 97944fef7..e9c0deb7c 100644 --- a/src/power.h +++ b/src/power.h @@ -84,11 +84,6 @@ class Power : private concurrency::OSThread void setStatusHandler(meshtastic::PowerStatus *handler) { statusHandler = handler; } const uint16_t OCV[11] = {OCV_ARRAY}; -#if defined(ELECROW_ThinkNode_M1) || defined(POWER_CFG) - uint8_t low_voltage_counter_led3; - int power_num = 0; -#endif - protected: meshtastic::PowerStatus *statusHandler; diff --git a/variants/ELECROW-ThinkNode-M1/variant.h b/variants/ELECROW-ThinkNode-M1/variant.h index fc2fddbdf..2e91e378d 100644 --- a/variants/ELECROW-ThinkNode-M1/variant.h +++ b/variants/ELECROW-ThinkNode-M1/variant.h @@ -41,16 +41,15 @@ extern "C" { #define NUM_ANALOG_INPUTS (1) #define NUM_ANALOG_OUTPUTS (0) -#define PIN_LED1 -1 #define PIN_LED2 -1 #define PIN_LED3 -1 // LED -#define POWER_LED (32 + 6) // red +#define PIN_LED1 (32 + 6) // red #define LED_POWER (32 + 4) #define USER_LED (0 + 13) // green // USB_CHECK -#define USB_CHECK (32 + 3) +#define EXT_PWR_DETECT (32 + 3) #define ADC_V (0 + 8) #define LED_RED PIN_LED3 @@ -59,7 +58,7 @@ extern "C" { #define LED_BUILTIN LED_BLUE #define LED_CONN PIN_GREEN #define LED_STATE_ON 0 // State when LED is lit // LED灯亮时的状态 -#define M1_buzzer (0 + 6) +#define PIN_BUZZER (0 + 6) /* * Buttons */ @@ -82,6 +81,7 @@ extern "C" { static const uint8_t A0 = PIN_A0; #define ADC_RESOLUTION 14 +#define BATTERY_SENSE_SAMPLES 30 #define PIN_NFC1 (9) #define PIN_NFC2 (10) @@ -159,7 +159,7 @@ External serial flash WP25R1635FZUIL0 #define GPS_THREAD_INTERVAL 50 -#define PIN_GPS_PPS (32 + 1) // GPS开关判断 +#define PIN_GPS_SWITCH (32 + 1) // GPS开关判断 #define PIN_SERIAL1_RX GPS_TX_PIN #define PIN_SERIAL1_TX GPS_RX_PIN diff --git a/variants/ELECROW-ThinkNode-M2/variant.h b/variants/ELECROW-ThinkNode-M2/variant.h index 801d5606f..55f35e498 100644 --- a/variants/ELECROW-ThinkNode-M2/variant.h +++ b/variants/ELECROW-ThinkNode-M2/variant.h @@ -1,14 +1,13 @@ // Status -#define LED_PIN_POWER 1 -#define BIAS_T_ENABLE LED_PIN_POWER -#define BIAS_T_VALUE HIGH +#define LED_PIN 1 #define PIN_BUTTON1 47 // 功能键 #define PIN_BUTTON2 4 // 电源键 -#define POWER_CFG -#define POWER_CHRG 6 -#define POWER_FULL 42 +#define LED_PIN_POWER 6 +#define ADC_V 42 +// USB_CHECK +#define EXT_PWR_DETECT 7 #define PIN_BUZZER 5 From e2933bcb5b92f92569f9b78e75d5e4a001e33088 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Mon, 7 Apr 2025 14:04:31 +0200 Subject: [PATCH 039/100] Update platformio.ini (#6512) --- variants/crowpanel-esp32s3-5-epaper/platformio.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/variants/crowpanel-esp32s3-5-epaper/platformio.ini b/variants/crowpanel-esp32s3-5-epaper/platformio.ini index f1257a979..ebf013f64 100644 --- a/variants/crowpanel-esp32s3-5-epaper/platformio.ini +++ b/variants/crowpanel-esp32s3-5-epaper/platformio.ini @@ -11,7 +11,7 @@ board = esp32-s3-devkitc-1 board_level = extra upload_protocol = esptool build_flags = - ${esp32_base.build_flags} -D CROWPANEL_ESP32S3_5_EPAPER -I variants/crowpanel-esp32s3-5-epaper + ${esp32s3_base.build_flags} -D CROWPANEL_ESP32S3_5_EPAPER -I variants/crowpanel-esp32s3-5-epaper -D PRIVATE_HW -DBOARD_HAS_PSRAM -DGPS_POWER_TOGGLE @@ -39,7 +39,7 @@ board = esp32-s3-devkitc-1 board_level = extra upload_protocol = esptool build_flags = - ${esp32_base.build_flags} -D CROWPANEL_ESP32S3_4_EPAPER -I variants/crowpanel-esp32s3-5-epaper + ${esp32s3_base.build_flags} -D CROWPANEL_ESP32S3_4_EPAPER -I variants/crowpanel-esp32s3-5-epaper -D PRIVATE_HW -DBOARD_HAS_PSRAM -DGPS_POWER_TOGGLE @@ -67,7 +67,7 @@ board = esp32-s3-devkitc-1 board_level = extra upload_protocol = esptool build_flags = - ${esp32_base.build_flags} -D CROWPANEL_ESP32S3_2_EPAPER -I variants/crowpanel-esp32s3-5-epaper + ${esp32s3_base.build_flags} -D CROWPANEL_ESP32S3_2_EPAPER -I variants/crowpanel-esp32s3-5-epaper -D PRIVATE_HW -DBOARD_HAS_PSRAM -DGPS_POWER_TOGGLE From a084073cc15b4cb0a05c5f9ca52d6fffd94d4530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 7 Apr 2025 15:35:51 +0200 Subject: [PATCH 040/100] inkhud doesn't have a button thread (#6513) --- src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index a528da8af..bf4b0c2f2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -218,8 +218,8 @@ static int32_t ledBlinkCount = 0; static int32_t elecrowLedBlinker() { // are we in alert buzzer mode? +#if HAS_BUTTON if (buttonThread->isBuzzing()) { - // blink LED three times for 3 seconds, then 3 times for a second, with one second pause if (ledBlinkCount % 2) { // odd means LED OFF ledBlink.set(false); @@ -242,6 +242,7 @@ static int32_t elecrowLedBlinker() } } } else { +#endif ledBlinkCount = 0; if (config.device.led_heartbeat_disabled) return 1000; @@ -262,7 +263,9 @@ static int32_t elecrowLedBlinker() if (!powerStatus->getIsCharging() && powerStatus->getBatteryChargePercent() < 10) { return 250; } +#if HAS_BUTTON } +#endif return 1000; } #else From 12d13056188956a1002db2187605c178693c1f03 Mon Sep 17 00:00:00 2001 From: Eric Wolak Date: Mon, 7 Apr 2025 17:34:16 -0700 Subject: [PATCH 041/100] Fix device-specific logic in install script (#6508) * Fix device-specific logic in install script These new for loops to check for variants in a list should be checking for the string to _be empty_, not _non-empty_, if a match is found causing the replacement to fire. * simplify logic per review feedback --------- Co-authored-by: Ben Meadors --- bin/device-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/device-install.sh b/bin/device-install.sh index bacf48f69..796626a9d 100755 --- a/bin/device-install.sh +++ b/bin/device-install.sh @@ -138,7 +138,7 @@ if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then # littlefs* offset for BigDB 8mb and OTA OFFSET. for variant in "${BIGDB_8MB[@]}"; do - if [ -n "${FILENAME##*"$variant"*}" ]; then + if [ -z "${FILENAME##*"$variant"*}" ]; then OFFSET=0x670000 OTA_OFFSET=0x340000 fi @@ -146,7 +146,7 @@ if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then # littlefs* offset for BigDB 16mb and OTA OFFSET. for variant in "${BIGDB_16MB[@]}"; do - if [ -n "${FILENAME##*"$variant"*}" ]; then + if [ -z "${FILENAME##*"$variant"*}" ]; then OFFSET=0xc90000 OTA_OFFSET=0x650000 fi @@ -155,7 +155,7 @@ if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then # Account for S3 board's different OTA partition # FIXME: Use PlatformIO info to determine MCU type, this is unmaintainable for variant in "${S3_VARIANTS[@]}"; do - if [ -n "${FILENAME##*"$variant"*}" ]; then + if [ -z "${FILENAME##*"$variant"*}" ]; then MCU="esp32s3" fi done From c0dab4a672c3ea92f3879df2107a4a9f95a34fba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 08:27:58 -0500 Subject: [PATCH 042/100] Upgrade trunk (#6519) Co-authored-by: sachaw <11172820+sachaw@users.noreply.github.com> --- .trunk/trunk.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 608045e45..3aa9628fc 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -9,14 +9,14 @@ plugins: lint: enabled: - prettier@3.5.3 - - trufflehog@3.88.22 + - trufflehog@3.88.23 - yamllint@1.37.0 - bandit@1.8.3 - - checkov@3.2.396 + - checkov@3.2.398 - terrascan@1.19.9 - trivy@0.61.0 - taplo@0.9.3 - - ruff@0.11.3 + - ruff@0.11.4 - isort@6.0.1 - markdownlint@0.44.0 - oxipng@9.1.4 From cfc2a96a459318e7fe8a41f9ed9c997ef08b19a7 Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 8 Apr 2025 10:09:23 -0400 Subject: [PATCH 043/100] Update web, use centrally defined version (#6500) --- .github/actions/build-variant/action.yml | 9 ++++++++- bin/rpkg.macros | 4 ++++ bin/web.version | 1 + debian/ci_pack_sdeb.sh | 5 +++-- meshtasticd.spec.rpkg | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 bin/web.version diff --git a/.github/actions/build-variant/action.yml b/.github/actions/build-variant/action.yml index 2f0883fad..67d002eea 100644 --- a/.github/actions/build-variant/action.yml +++ b/.github/actions/build-variant/action.yml @@ -43,6 +43,13 @@ runs: id: base uses: ./.github/actions/setup-base + - name: Get web ui version + if: inputs.include-web-ui == 'true' + id: webver + shell: bash + run: | + echo "ver=$(cat bin/web.version)" >> $GITHUB_OUTPUT + - name: Pull web ui if: inputs.include-web-ui == 'true' uses: dsaltares/fetch-gh-release-asset@master @@ -51,7 +58,7 @@ runs: file: build.tar target: build.tar token: ${{ inputs.github_token }} - version: tags/v2.5.3 + version: tags/v${{ steps.webver.outputs.ver }} - name: Unpack web ui if: inputs.include-web-ui == 'true' diff --git a/bin/rpkg.macros b/bin/rpkg.macros index 2bbb203de..aa036fc33 100644 --- a/bin/rpkg.macros +++ b/bin/rpkg.macros @@ -2,6 +2,10 @@ function meshtastic_version { meshtastic_version=$(python3 bin/buildinfo.py short) echo -n "$meshtastic_version" } +function web_version { + web_version=$(cat bin/web.version) + echo -n "$web_version" +} function git_commits_num { total_commits=$(git rev-list --all --count) echo -n "$total_commits" diff --git a/bin/web.version b/bin/web.version new file mode 100644 index 000000000..914ec9671 --- /dev/null +++ b/bin/web.version @@ -0,0 +1 @@ +2.6.0 \ No newline at end of file diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index a8b2252ae..c0cea0010 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -10,8 +10,9 @@ platformio pkg install -e native -t platformio/tool-scons@4.40502.0 # Compress `pio` directory to prevent dh_clean from sanitizing it tar -cf pio.tar pio/ rm -rf pio -# Download the latest meshtastic/web release build.tar to `web.tar` -curl -L https://github.com/meshtastic/web/releases/latest/download/build.tar -o web.tar +# Download the meshtastic/web release build.tar to `web.tar` +web_ver=$(cat bin/web.version) +curl -L "https://github.com/meshtastic/web/releases/download/v$web_ver/build.tar" -o web.tar package=$(dpkg-parsechangelog --show-field Source) diff --git a/meshtasticd.spec.rpkg b/meshtasticd.spec.rpkg index a09261056..4d6c9d6f5 100644 --- a/meshtasticd.spec.rpkg +++ b/meshtasticd.spec.rpkg @@ -21,7 +21,7 @@ Summary: Meshtastic daemon for communicating with Meshtastic devices License: GPL-3.0 URL: https://github.com/meshtastic/firmware Source0: {{{ git_dir_pack }}} -Source1: https://github.com/meshtastic/web/releases/latest/download/build.tar +Source1: https://github.com/meshtastic/web/releases/download/v{{{ web_version }}}/build.tar BuildRequires: systemd-rpm-macros BuildRequires: python3-devel From c94dd1e33110e10c5afbd642212c545664ed5927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Tue, 8 Apr 2025 17:46:39 +0200 Subject: [PATCH 044/100] Minor adjustment of blink codes and 'unstick' the M2 button. (#6521) --- src/ButtonThread.cpp | 4 ++++ src/main.cpp | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ButtonThread.cpp b/src/ButtonThread.cpp index 375029c99..04200a7df 100644 --- a/src/ButtonThread.cpp +++ b/src/ButtonThread.cpp @@ -349,8 +349,12 @@ void ButtonThread::attachButtonInterrupts() #endif #ifdef BUTTON_PIN_ALT +#ifdef ELECROW_ThinkNode_M2 + wakeOnIrq(BUTTON_PIN_ALT, RISING); +#else wakeOnIrq(BUTTON_PIN_ALT, FALLING); #endif +#endif #ifdef BUTTON_PIN_TOUCH wakeOnIrq(BUTTON_PIN_TOUCH, FALLING); diff --git a/src/main.cpp b/src/main.cpp index bf4b0c2f2..bfbd73a43 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -248,8 +248,9 @@ static int32_t elecrowLedBlinker() return 1000; static bool ledOn; - // when fully charged, remain on! - if (powerStatus->getIsCharging() && powerStatus->getBatteryChargePercent() >= 100) { + // remain on when fully charged or discharging above 10% + if ((powerStatus->getIsCharging() && powerStatus->getBatteryChargePercent() >= 100) || + (!powerStatus->getIsCharging() && powerStatus->getBatteryChargePercent() >= 10)) { ledOn = true; } else { ledOn ^= 1; @@ -259,8 +260,8 @@ static int32_t elecrowLedBlinker() if (powerStatus->getIsCharging()) { return 500; } - // When almost empty, blink rapidly - if (!powerStatus->getIsCharging() && powerStatus->getBatteryChargePercent() < 10) { + // Blink rapidly when almost empty or if battery is not connected + if ((!powerStatus->getIsCharging() && powerStatus->getBatteryChargePercent() < 10) || !powerStatus->getHasBattery()) { return 250; } #if HAS_BUTTON From fb2010552faea355f8fbf1491d1c1cc9eaa316d2 Mon Sep 17 00:00:00 2001 From: Manuel <71137295+mverch67@users.noreply.github.com> Date: Tue, 8 Apr 2025 20:50:58 +0200 Subject: [PATCH 045/100] MUI: update commit reference (#6526) new feature: map locations filtering bugfix: boot logo / bt logo --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 377635873..749aa94c7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -94,7 +94,7 @@ lib_deps = [device-ui_base] lib_deps = - https://github.com/meshtastic/device-ui/archive/99171e87a70452395b56cce713a951c1c2964370.zip + https://github.com/meshtastic/device-ui/archive/56ef8db7eb4dda44dc0c1ec5828044debbbc6d33.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From 1b1d4625aa83c8a76855422db1dfc19846fdb125 Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Wed, 9 Apr 2025 04:04:33 +0900 Subject: [PATCH 046/100] chore: update ubx.h (#6522) usefull -> useful --- src/gps/ubx.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gps/ubx.h b/src/gps/ubx.h index d674bed51..0fe2f01fb 100644 --- a/src/gps/ubx.h +++ b/src/gps/ubx.h @@ -224,7 +224,7 @@ static const uint8_t _message_GSA[] = { 0x00, // Rate for DDC 0x00, // Rate for UART1 0x00, // Rate for UART2 - 0x00, // Rate for USB usefull for native linux + 0x00, // Rate for USB useful for native linux 0x00, // Rate for SPI 0x00 // Reserved }; @@ -258,7 +258,7 @@ static const uint8_t _message_RMC[] = { 0x00, // Rate for DDC 0x01, // Rate for UART1 0x00, // Rate for UART2 - 0x01, // Rate for USB usefull for native linux + 0x01, // Rate for USB useful for native linux 0x00, // Rate for SPI 0x00 // Reserved }; @@ -269,7 +269,7 @@ static const uint8_t _message_GGA[] = { 0x00, // Rate for DDC 0x01, // Rate for UART1 0x00, // Rate for UART2 - 0x01, // Rate for USB, usefull for native linux + 0x01, // Rate for USB, useful for native linux 0x00, // Rate for SPI 0x00 // Reserved }; From 0d800b7a22be675717f3d5cbff29e66234d88ffb Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 8 Apr 2025 17:14:39 -0400 Subject: [PATCH 047/100] meshtasticd docker: Support webui (#6482) --- Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 733a46325..55580c579 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ ENV TZ=Etc/UTC # Install Dependencies ENV PIP_ROOT_USER_ACTION=ignore RUN apt-get update && apt-get install --no-install-recommends -y \ - wget g++ zip git ca-certificates \ + curl wget g++ zip git ca-certificates \ libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \ libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev pkg-config \ && apt-get clean && rm -rf /var/lib/apt/lists/* \ @@ -27,6 +27,12 @@ COPY . /tmp/firmware RUN bash ./bin/build-native.sh && \ cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd" +# Fetch web assets +RUN curl -L "https://github.com/meshtastic/web/releases/download/v$(cat /tmp/firmware/bin/web.version)/build.tar" -o /tmp/web.tar \ + && mkdir -p /tmp/web \ + && tar -xf /tmp/web.tar -C /tmp/web/ \ + && gzip -dr /tmp/web \ + && rm /tmp/web.tar ##### PRODUCTION BUILD ############# @@ -46,6 +52,7 @@ RUN apt-get update && apt-get --no-install-recommends -y install \ # Fetch compiled binary from the builder COPY --from=builder /tmp/firmware/release/meshtasticd /usr/sbin/ +COPY --from=builder /tmp/web /usr/share/meshtasticd/ # Copy config templates COPY ./bin/config.d /etc/meshtasticd/available.d @@ -54,7 +61,9 @@ VOLUME /var/lib/meshtasticd # Expose Meshtastic TCP API port from the host EXPOSE 4403 +# Expose Meshtastic Web UI port from the host +EXPOSE 443 CMD [ "sh", "-cx", "meshtasticd -d /var/lib/meshtasticd" ] -HEALTHCHECK NONE \ No newline at end of file +HEALTHCHECK NONE From ec298199ee1cdceaad25b743dcbf31e3ddb021ff Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Wed, 9 Apr 2025 18:40:12 +0800 Subject: [PATCH 048/100] remove checkov from trunk config (#6532) We don't have terraform, cloudformation, helm templates ... and this check pushes out new versions very frequently which is annoying with out automation :) --- .trunk/trunk.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 3aa9628fc..903b4c298 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -12,7 +12,6 @@ lint: - trufflehog@3.88.23 - yamllint@1.37.0 - bandit@1.8.3 - - checkov@3.2.398 - terrascan@1.19.9 - trivy@0.61.0 - taplo@0.9.3 From 69f938ea98dca5c103f0898489877afd2c7b2e25 Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Wed, 9 Apr 2025 13:13:49 +0200 Subject: [PATCH 049/100] Send UDP packet even if it's encrypted (#6524) Co-authored-by: Ben Meadors --- src/mesh/Router.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesh/Router.cpp b/src/mesh/Router.cpp index b8b7ee610..2cc3007a2 100644 --- a/src/mesh/Router.cpp +++ b/src/mesh/Router.cpp @@ -283,11 +283,6 @@ ErrorCode Router::send(meshtastic_MeshPacket *p) abortSendAndNak(encodeResult, p); return encodeResult; // FIXME - this isn't a valid ErrorCode } -#if HAS_UDP_MULTICAST - if (udpThread && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) { - udpThread->onSend(const_cast(p)); - } -#endif #if !MESHTASTIC_EXCLUDE_MQTT // Only publish to MQTT if we're the original transmitter of the packet if (moduleConfig.mqtt.enabled && isFromUs(p) && mqtt) { @@ -297,6 +292,12 @@ ErrorCode Router::send(meshtastic_MeshPacket *p) packetPool.release(p_decoded); } +#if HAS_UDP_MULTICAST + if (udpThread && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) { + udpThread->onSend(const_cast(p)); + } +#endif + assert(iface); // This should have been detected already in sendLocal (or we just received a packet from outside) return iface->send(p); } From fc3d9f2a15e201bbedc3a98049abdc8b3bd648da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 9 Apr 2025 14:55:23 +0200 Subject: [PATCH 050/100] fix power pin definition --- variants/ELECROW-ThinkNode-M2/variant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/ELECROW-ThinkNode-M2/variant.h b/variants/ELECROW-ThinkNode-M2/variant.h index 55f35e498..a6bb40f1a 100644 --- a/variants/ELECROW-ThinkNode-M2/variant.h +++ b/variants/ELECROW-ThinkNode-M2/variant.h @@ -4,7 +4,7 @@ #define PIN_BUTTON1 47 // 功能键 #define PIN_BUTTON2 4 // 电源键 -#define LED_PIN_POWER 6 +#define LED_POWER 6 #define ADC_V 42 // USB_CHECK #define EXT_PWR_DETECT 7 From 5256ae90dc4e96a4978cd3fde4a89c56699fb351 Mon Sep 17 00:00:00 2001 From: Andrik45719 Date: Wed, 9 Apr 2025 18:40:38 +0300 Subject: [PATCH 051/100] DIY v1/v1_1 add TCXO_OPTIONAL make it so that the firmware can try both TCXO and XTAL (#6534) * EBYTE_E22 TCXO_OPTIONAL * EBYTE_E22 --------- Co-authored-by: Ben Meadors --- variants/diy/v1/variant.h | 1 + variants/diy/v1_1/variant.h | 1 + 2 files changed, 2 insertions(+) diff --git a/variants/diy/v1/variant.h b/variants/diy/v1/variant.h index 4802dbe89..8a2df3f2b 100644 --- a/variants/diy/v1/variant.h +++ b/variants/diy/v1/variant.h @@ -53,4 +53,5 @@ // Internally the TTGO module hooks the SX126x-DIO2 in to control the TX/RX switch // (which is the default for the sx1262interface code) #define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL #endif diff --git a/variants/diy/v1_1/variant.h b/variants/diy/v1_1/variant.h index 8a006d0d2..1c8110301 100644 --- a/variants/diy/v1_1/variant.h +++ b/variants/diy/v1_1/variant.h @@ -54,4 +54,5 @@ // Internally the TTGO module hooks the SX126x-DIO2 in to control the TX/RX switch // (which is the default for the sx1262interface code) #define SX126X_DIO3_TCXO_VOLTAGE 1.8 +#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL #endif From 536b6d87c63888e8ee480a3f06d004e4360b4459 Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Thu, 10 Apr 2025 03:41:51 +1200 Subject: [PATCH 052/100] InkHUD support for LilyGo T3S3 E-Paper (#6503) * Purge an incomplete E-Ink driver * Use the deep-sleep mode of SSD16XX E-Ink displays * TwoButton doesn't need to store pin mode * Fix false positive button presses after light sleep * E-Ink driver for DEPG0213BNS800 * InkHUD support for LilyGo T3S3 E-paper --------- Co-authored-by: Ben Meadors --- .../niche/Drivers/EInk/DEPG0154BNS800.cpp | 1 - .../niche/Drivers/EInk/DEPG0154BNS800.h | 34 ----- .../niche/Drivers/EInk/DEPG0213BNS800.cpp | 132 ++++++++++++++++++ .../niche/Drivers/EInk/DEPG0213BNS800.h | 44 ++++++ .../niche/Drivers/EInk/DEPG0290BNS800.cpp | 5 + src/graphics/niche/Drivers/EInk/SSD16XX.cpp | 13 ++ src/graphics/niche/Drivers/EInk/SSD16XX.h | 1 + src/graphics/niche/Inputs/TwoButton.cpp | 7 +- src/graphics/niche/Inputs/TwoButton.h | 3 +- variants/t-echo/nicheGraphics.h | 2 +- variants/tlora_t3s3_epaper/nicheGraphics.h | 102 ++++++++++++++ variants/tlora_t3s3_epaper/platformio.ini | 19 +++ variants/tlora_t3s3_epaper/variant.h | 1 - 13 files changed, 322 insertions(+), 42 deletions(-) delete mode 100644 src/graphics/niche/Drivers/EInk/DEPG0154BNS800.cpp delete mode 100644 src/graphics/niche/Drivers/EInk/DEPG0154BNS800.h create mode 100644 src/graphics/niche/Drivers/EInk/DEPG0213BNS800.cpp create mode 100644 src/graphics/niche/Drivers/EInk/DEPG0213BNS800.h create mode 100644 variants/tlora_t3s3_epaper/nicheGraphics.h diff --git a/src/graphics/niche/Drivers/EInk/DEPG0154BNS800.cpp b/src/graphics/niche/Drivers/EInk/DEPG0154BNS800.cpp deleted file mode 100644 index b8715ed1d..000000000 --- a/src/graphics/niche/Drivers/EInk/DEPG0154BNS800.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "./DEPG0154BNS800.h" \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/DEPG0154BNS800.h b/src/graphics/niche/Drivers/EInk/DEPG0154BNS800.h deleted file mode 100644 index 62d42ef57..000000000 --- a/src/graphics/niche/Drivers/EInk/DEPG0154BNS800.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - -E-Ink display driver - - DEPG0154BNS800 - - Manufacturer: DKE - - Size: 1.54 inch - - Resolution: 152px x 152px - - Flex connector marking: FPC7525 - -*/ - -#pragma once - -#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS -#include "configuration.h" - -#include "./SSD16XX.h" - -namespace NicheGraphics::Drivers -{ -class DEPG0154BNS800 : public SSD16XX -{ - // Display properties - private: - static constexpr uint32_t width = 152; - static constexpr uint32_t height = 152; - static constexpr UpdateTypes supported = (UpdateTypes)(FULL); - - public: - DEPG0154BNS800() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte -}; - -} // namespace NicheGraphics::Drivers -#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/DEPG0213BNS800.cpp b/src/graphics/niche/Drivers/EInk/DEPG0213BNS800.cpp new file mode 100644 index 000000000..2c8df96ed --- /dev/null +++ b/src/graphics/niche/Drivers/EInk/DEPG0213BNS800.cpp @@ -0,0 +1,132 @@ +#include "./DEPG0213BNS800.h" + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +using namespace NicheGraphics::Drivers; + +// Describes the operation performed when a "fast refresh" is performed +// Source: Modified from GxEPD2 (GxEPD2_213_BN) +static const uint8_t LUT_FAST[] = { + // 1 2 3 + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // B2B (Existing black pixels) + 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // B2W (New white pixels) + 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // W2B (New black pixels) + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // W2W (Existing white pixels) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // VCOM + + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // 1. Any pixels changing W2B or B2W. Two medium taps. + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2. All pixels. One short tap. + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 3. Cooldown + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, // +}; + +// How strongly the pixels are pulled and pushed +void DEPG0213BNS800::configVoltages() +{ + switch (updateType) { + case FAST: + // Reference: display datasheet, GxEPD1 + sendCommand(0x03); // Gate voltage + sendData(0x17); // VGH: 20V + + // Reference: display datasheet, GxEPD1 + sendCommand(0x04); // Source voltage + sendData(0x41); // VSH1: 15V + sendData(0x00); // VSH2: NA + sendData(0x32); // VSL: -15V + + // GxEPD1 sets this at -1.2V, but that seems to be drive the pixels very hard + sendCommand(0x2C); // VCOM voltage + sendData(0x08); // VCOM: -0.2V + break; + + case FULL: + default: + // From OTP memory + break; + } +} + +// Load settings about how the pixels are moved from old state to new state during a refresh +// - manually specified, +// - or with stored values from displays OTP memory +void DEPG0213BNS800::configWaveform() +{ + switch (updateType) { + case FAST: + sendCommand(0x3C); // Border waveform: + sendData(0x80); // VSS + + sendCommand(0x32); // Write LUT register from MCU: + sendData(LUT_FAST, sizeof(LUT_FAST)); // (describes operation for a FAST refresh) + break; + + case FULL: + default: + // From OTP memory + break; + } +} + +// Describes the sequence of events performed by the displays controller IC during a refresh +// Includes "power up", "load settings from memory", "update the pixels", etc +void DEPG0213BNS800::configUpdateSequence() +{ + switch (updateType) { + case FAST: + sendCommand(0x22); // Set "update sequence" + sendData(0xCF); // Differential, use manually loaded waveform + break; + + case FULL: + default: + sendCommand(0x22); // Set "update sequence" + sendData(0xF7); // Non-differential, load waveform from OTP + break; + } +} + +// Once the refresh operation has been started, +// begin periodically polling the display to check for completion, using the normal Meshtastic threading code +// Only used when refresh is "async" +void DEPG0213BNS800::detachFromUpdate() +{ + switch (updateType) { + case FAST: + return beginPolling(50, 500); // At least 500ms, then poll every 50ms + case FULL: + default: + return beginPolling(100, 3500); // At least 3500ms, then poll every 100ms + } +} + +// For this display, we do not need to re-write the new image. +// We're overriding SSD16XX::finalizeUpdate to make this small optimization. +// The display does also work just fine with the generic SSD16XX method, though. +void DEPG0213BNS800::finalizeUpdate() +{ + // Put a copy of the image into the "old memory". + // Used with differential refreshes (e.g. FAST update), to determine which px need to move, and which can remain in place + // We need to keep the "old memory" up to date, because don't know whether next refresh will be FULL or FAST etc. + if (updateType != FULL) { + // writeNewImage(); // Not required for this display + writeOldImage(); + sendCommand(0x7F); // Terminate image write without update + wait(); + } + + // Enter deep-sleep to save a few µA + // Waking from this requires that display's reset pin is broken out + if (pin_rst != 0xFF) + deepSleep(); +} +#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/DEPG0213BNS800.h b/src/graphics/niche/Drivers/EInk/DEPG0213BNS800.h new file mode 100644 index 000000000..e1bb96450 --- /dev/null +++ b/src/graphics/niche/Drivers/EInk/DEPG0213BNS800.h @@ -0,0 +1,44 @@ +/* + +E-Ink display driver + - DEPG0213BNS800 + - Manufacturer: DKE + - Size: 2.13 inch + - Resolution: 122px x 250px + - Flex connector marking: FPC-7528B + + Note: this is from an older generation of DKE panels, which still used Solomon Systech controller ICs. + DKE's website suggests that the latest DEPG0213BN displays may use Fitipower controllers instead. +*/ + +#pragma once + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +#include "configuration.h" + +#include "./SSD16XX.h" + +namespace NicheGraphics::Drivers +{ +class DEPG0213BNS800 : public SSD16XX +{ + // Display properties + private: + static constexpr uint32_t width = 122; + static constexpr uint32_t height = 250; + static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST); + + public: + DEPG0213BNS800() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte + + protected: + void configVoltages() override; + void configWaveform() override; + void configUpdateSequence() override; + void detachFromUpdate() override; + void finalizeUpdate() override; // Only overriden for a slight optimization +}; + +} // namespace NicheGraphics::Drivers +#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/DEPG0290BNS800.cpp b/src/graphics/niche/Drivers/EInk/DEPG0290BNS800.cpp index 5f3a05670..15134d5ad 100644 --- a/src/graphics/niche/Drivers/EInk/DEPG0290BNS800.cpp +++ b/src/graphics/niche/Drivers/EInk/DEPG0290BNS800.cpp @@ -116,5 +116,10 @@ void DEPG0290BNS800::finalizeUpdate() sendCommand(0x7F); // Terminate image write without update wait(); } + + // Enter deep-sleep to save a few µA + // Waking from this requires that display's reset pin is broken out + if (pin_rst != 0xFF) + deepSleep(); } #endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/SSD16XX.cpp b/src/graphics/niche/Drivers/EInk/SSD16XX.cpp index 5a5397dbd..a2357a80b 100644 --- a/src/graphics/niche/Drivers/EInk/SSD16XX.cpp +++ b/src/graphics/niche/Drivers/EInk/SSD16XX.cpp @@ -242,5 +242,18 @@ void SSD16XX::finalizeUpdate() sendCommand(0x7F); // Terminate image write without update wait(); } + + // Enter deep-sleep to save a few µA + // Waking from this requires that display's reset pin is broken out + if (pin_rst != 0xFF) + deepSleep(); +} + +// Enter a lower-power state +// May only save a few µA.. +void SSD16XX::deepSleep() +{ + sendCommand(0x10); // Enter deep sleep + sendData(0x01); // Mode 1: preserve image RAM } #endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/SSD16XX.h b/src/graphics/niche/Drivers/EInk/SSD16XX.h index 799a378c0..3f92818ce 100644 --- a/src/graphics/niche/Drivers/EInk/SSD16XX.h +++ b/src/graphics/niche/Drivers/EInk/SSD16XX.h @@ -44,6 +44,7 @@ class SSD16XX : public EInk virtual void detachFromUpdate(); virtual bool isUpdateDone() override; virtual void finalizeUpdate() override; + virtual void deepSleep(); protected: uint8_t bufferOffsetX = 0; // In bytes. Panel x=0 does not always align with controller x=0. Quirky internal wiring? diff --git a/src/graphics/niche/Inputs/TwoButton.cpp b/src/graphics/niche/Inputs/TwoButton.cpp index b270d56cf..1e91d9080 100644 --- a/src/graphics/niche/Inputs/TwoButton.cpp +++ b/src/graphics/niche/Inputs/TwoButton.cpp @@ -98,9 +98,8 @@ void TwoButton::setWiring(uint8_t whichButton, uint8_t pin, bool internalPullup) assert(whichButton < 2); buttons[whichButton].pin = pin; buttons[whichButton].activeLogic = LOW; // Unimplemented - buttons[whichButton].mode = internalPullup ? INPUT_PULLUP : INPUT; - pinMode(buttons[whichButton].pin, buttons[whichButton].mode); + pinMode(buttons[whichButton].pin, internalPullup ? INPUT_PULLUP : INPUT); } void TwoButton::setTiming(uint8_t whichButton, uint32_t debounceMs, uint32_t longpressMs) @@ -299,7 +298,9 @@ int TwoButton::afterLightSleep(esp_sleep_wakeup_cause_t cause) // Manually trigger the button-down ISR // - during light sleep, our ISR is disabled // - if light sleep ends by button press, pretend our own ISR caught it - if (cause == ESP_SLEEP_WAKEUP_GPIO) + // - need to manually confirm by reading pin ourselves, to avoid occasional false positives + // (false positive only when using internal pullup resistors?) + if (cause == ESP_SLEEP_WAKEUP_GPIO && digitalRead(buttons[0].pin) == buttons[0].activeLogic) isrPrimary(); return 0; // Indicates success diff --git a/src/graphics/niche/Inputs/TwoButton.h b/src/graphics/niche/Inputs/TwoButton.h index f1e18dd89..ae66adf96 100644 --- a/src/graphics/niche/Inputs/TwoButton.h +++ b/src/graphics/niche/Inputs/TwoButton.h @@ -35,7 +35,7 @@ class TwoButton : protected concurrency::OSThread static TwoButton *getInstance(); // Create or get the singleton instance void start(); // Start handling button input void stop(); // Stop handling button input (disconnect ISRs for sleep) - void setWiring(uint8_t whichButton, uint8_t pin, bool internalPulldown = false); + void setWiring(uint8_t whichButton, uint8_t pin, bool internalPullup = false); void setTiming(uint8_t whichButton, uint32_t debounceMs, uint32_t longpressMs); void setHandlerDown(uint8_t whichButton, Callback onDown); void setHandlerUp(uint8_t whichButton, Callback onUp); @@ -65,7 +65,6 @@ class TwoButton : protected concurrency::OSThread // Per-button config uint8_t pin = 0xFF; // 0xFF: unset bool activeLogic = LOW; // Active LOW by default. Currently unimplemented. - uint8_t mode = INPUT; // Whether to use internal pull up / pull down resistors uint32_t debounceLength = 50; // Minimum length for shortpress, in ms uint32_t longpressLength = 500; // How long after button down to fire longpress, in ms volatile State state = State::REST; // Internal state diff --git a/variants/t-echo/nicheGraphics.h b/variants/t-echo/nicheGraphics.h index f5dde6b19..5862dcdfb 100644 --- a/variants/t-echo/nicheGraphics.h +++ b/variants/t-echo/nicheGraphics.h @@ -112,7 +112,7 @@ void setupNicheGraphics() // Setup the capacitive touch button // - short: momentary backlight // - long: latch backlight on - buttons->setWiring(TOUCH_BUTTON, PIN_BUTTON_TOUCH, LOW); + buttons->setWiring(TOUCH_BUTTON, PIN_BUTTON_TOUCH); buttons->setTiming(TOUCH_BUTTON, 50, 5000); // 5 seconds before latch - limited by T-Echo's capacitive touch IC buttons->setHandlerDown(TOUCH_BUTTON, [backlight]() { backlight->peek(); diff --git a/variants/tlora_t3s3_epaper/nicheGraphics.h b/variants/tlora_t3s3_epaper/nicheGraphics.h new file mode 100644 index 000000000..55bb9a203 --- /dev/null +++ b/variants/tlora_t3s3_epaper/nicheGraphics.h @@ -0,0 +1,102 @@ +#pragma once + +#include "configuration.h" + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +// InkHUD-specific components +// --------------------------- +#include "graphics/niche/InkHUD/InkHUD.h" + +// Applets +#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h" +#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h" +#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h" +#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h" + +// #include "graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.h" +// #include "graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.h" + +// Shared NicheGraphics components +// -------------------------------- +#include "graphics/niche/Drivers/EInk/DEPG0213BNS800.h" +#include "graphics/niche/Inputs/TwoButton.h" + +#include "graphics/niche/Fonts/FreeSans6pt7b.h" +#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h" +#include + +void setupNicheGraphics() +{ + using namespace NicheGraphics; + + // SPI + // ----------------------------- + + // Display is connected to HSPI + SPIClass *hspi = new SPIClass(HSPI); + hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); + + // E-Ink Driver + // ----------------------------- + + // Use E-Ink driver + Drivers::EInk *driver = new Drivers::DEPG0213BNS800; + driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES); + + // InkHUD + // ---------------------------- + + InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance(); + + // Set the driver + inkhud->setDriver(driver); + + // Set how many FAST updates per FULL update + // Set how unhealthy additional FAST updates beyond this number are + inkhud->setDisplayResilience(15, 1.5); + + // Prepare fonts + InkHUD::Applet::fontLarge = InkHUD::AppletFont(FreeSans9pt7b); + InkHUD::Applet::fontSmall = InkHUD::AppletFont(FreeSans6pt7b); + /* + // Font localization demo: Cyrillic + InkHUD::Applet::fontSmall = InkHUD::AppletFont(FreeSans6pt8bCyrillic); + InkHUD::Applet::fontSmall.addSubstitutionsWin1251(); + */ + + // Customize default settings + inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle? + inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise + inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users + + // Pick applets + inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown + inkhud->addApplet("DMs", new InkHUD::DMApplet); // Inactive + inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // Inactive + inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // Inactive + inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated + inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // Inactive + inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0 + // inkhud->addApplet("Basic", new InkHUD::BasicExampleApplet); + // inkhud->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet); + + // Start running InkHUD + inkhud->begin(); + + // Buttons + // -------------------------- + + Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component + + // Setup the main user button + buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin(), true); + buttons->setHandlerShortPress(0, []() { InkHUD::InkHUD::getInstance()->shortpress(); }); + buttons->setHandlerLongPress(0, []() { InkHUD::InkHUD::getInstance()->longpress(); }); + + buttons->start(); +} + +#endif \ No newline at end of file diff --git a/variants/tlora_t3s3_epaper/platformio.ini b/variants/tlora_t3s3_epaper/platformio.ini index 87351e586..957c37b95 100644 --- a/variants/tlora_t3s3_epaper/platformio.ini +++ b/variants/tlora_t3s3_epaper/platformio.ini @@ -7,6 +7,7 @@ upload_protocol = esptool build_flags = ${esp32_base.build_flags} -D TLORA_T3S3_EPAPER -I variants/tlora_t3s3_epaper -DGPS_POWER_TOGGLE + -DUSE_EINK -DEINK_DISPLAY_MODEL=GxEPD2_213_BN -DEINK_WIDTH=250 -DEINK_HEIGHT=122 @@ -16,3 +17,21 @@ build_flags = lib_deps = ${esp32s3_base.lib_deps} https://github.com/meshtastic/GxEPD2/archive/b202ebfec6a4821e098cf7a625ba0f6f2400292d.zip + +[env:tlora-t3s3-epaper-inkhud] +extends = esp32s3_base, inkhud +board = tlora-t3s3-v1 +board_check = true +upload_protocol = esptool +build_src_filter = + ${esp32_base.build_src_filter} + ${inkhud.build_src_filter} +build_flags = + ${esp32s3_base.build_flags} + ${inkhud.build_flags} + -I variants/tlora_t3s3_epaper + -D TLORA_T3S3_EPAPER + -D MAX_THREADS=40 ; Required if used with WiFi +lib_deps = + ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX + ${esp32s3_base.lib_deps} \ No newline at end of file diff --git a/variants/tlora_t3s3_epaper/variant.h b/variants/tlora_t3s3_epaper/variant.h index 732869b20..1ed505420 100644 --- a/variants/tlora_t3s3_epaper/variant.h +++ b/variants/tlora_t3s3_epaper/variant.h @@ -2,7 +2,6 @@ #define SDCARD_USE_SPI1 // Display (E-Ink) -#define USE_EINK #define PIN_EINK_CS 15 #define PIN_EINK_BUSY 48 #define PIN_EINK_DC 16 From 78fa4c5c7057232b9b1f70e4e072310b76cb1ff8 Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 9 Apr 2025 13:31:40 -0400 Subject: [PATCH 053/100] Setup RenovateBot (#6535) --- .github/dependabot.yml | 29 --------------- .trunk/trunk.yaml | 1 + arch/esp32/esp32.ini | 10 +++++- arch/esp32/esp32c6.ini | 7 +++- arch/esp32/esp32s2.ini | 2 +- arch/esp32/esp32s3.ini | 1 - arch/nrf52/nrf52.ini | 8 +++-- arch/nrf52/nrf52840.ini | 1 + arch/portduino/portduino.ini | 7 +++- arch/rp2xx0/rp2040.ini | 12 +++++-- arch/rp2xx0/rp2350.ini | 14 +++++--- arch/stm32/stm32.ini | 9 +++-- platformio.ini | 49 +++++++++++++++++++++++++ renovate.json | 70 ++++++++++++++++++++++++++++++++++++ 14 files changed, 175 insertions(+), 45 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index b14290be2..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,29 +0,0 @@ -#trunk-ignore-all(yamllint/quoted-strings): required by dependabot syntax check -version: 2 -updates: - - package-ecosystem: docker - directory: /.devcontainer - schedule: - interval: daily - time: "05:00" - timezone: US/Pacific - - package-ecosystem: docker - directory: / - schedule: - interval: daily - time: "05:00" - timezone: US/Pacific - - package-ecosystem: gitsubmodule - directory: / - schedule: - interval: daily - time: "05:00" - timezone: US/Pacific - ignore: - - dependency-name: protobufs - - package-ecosystem: github-actions - directory: /.github/workflows - schedule: - interval: daily - time: "05:00" - timezone: US/Pacific diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 903b4c298..e74c1a362 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -8,6 +8,7 @@ plugins: uri: https://github.com/trunk-io/plugins lint: enabled: + - renovate@39.235.2 - prettier@3.5.3 - trufflehog@3.88.23 - yamllint@1.37.0 diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index df3778002..3dfefbdb6 100644 --- a/arch/esp32/esp32.ini +++ b/arch/esp32/esp32.ini @@ -2,7 +2,9 @@ [esp32_base] extends = arduino_base custom_esp32_kind = esp32 -platform = platformio/espressif32@6.10.0 +platform = + # renovate: datasource=custom.pio depName=platformio/espressif32 packageName=platformio/platform/espressif32 + platformio/espressif32@6.10.0 build_src_filter = ${arduino_base.build_src_filter} - - - - - @@ -45,11 +47,17 @@ lib_deps = ${networking_base.lib_deps} ${environmental_base.lib_deps} ${radiolib_base.lib_deps} + # renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master https://github.com/meshtastic/esp32_https_server/archive/23665b3adc080a311dcbb586ed5941b5f94d6ea2.zip + # renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino h2zero/NimBLE-Arduino@^1.4.3 + # renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip + # renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib lewisxhe/XPowersLib@^0.2.7 + # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip + # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto rweather/Crypto@^0.4.0 lib_ignore = diff --git a/arch/esp32/esp32c6.ini b/arch/esp32/esp32c6.ini index dba3bac08..e1cf955e8 100644 --- a/arch/esp32/esp32c6.ini +++ b/arch/esp32/esp32c6.ini @@ -1,6 +1,8 @@ [esp32c6_base] extends = esp32_base -platform = https://github.com/Jason2866/platform-espressif32/archive/22faa566df8c789000f8136cd8d0aca49617af55.zip +platform = + # renovate: datasource=git-refs depName=ESP32c6 platform-espressif32 packageName=https://github.com/Jason2866/platform-espressif32 gitBranch=Arduino/IDF5 + https://github.com/Jason2866/platform-espressif32/archive/22faa566df8c789000f8136cd8d0aca49617af55.zip build_flags = ${arduino_base.build_flags} -Wall @@ -24,8 +26,11 @@ lib_deps = ${networking_base.lib_deps} ${environmental_base.lib_deps} ${radiolib_base.lib_deps} + # renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib lewisxhe/XPowersLib@^0.2.7 + # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip + # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto rweather/Crypto@^0.4.0 build_src_filter = diff --git a/arch/esp32/esp32s2.ini b/arch/esp32/esp32s2.ini index 40fdc461a..0f97408b8 100644 --- a/arch/esp32/esp32s2.ini +++ b/arch/esp32/esp32s2.ini @@ -16,4 +16,4 @@ build_flags = lib_ignore = ${esp32_base.lib_ignore} NimBLE-Arduino - libpax \ No newline at end of file + libpax diff --git a/arch/esp32/esp32s3.ini b/arch/esp32/esp32s3.ini index 1cd0e2033..8d8b6899e 100644 --- a/arch/esp32/esp32s3.ini +++ b/arch/esp32/esp32s3.ini @@ -3,4 +3,3 @@ extends = esp32_base custom_esp32_kind = esp32s3 monitor_speed = 115200 - diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini index ca12be6b1..127f46183 100644 --- a/arch/nrf52/nrf52.ini +++ b/arch/nrf52/nrf52.ini @@ -1,10 +1,14 @@ [nrf52_base] ; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files -platform = platformio/nordicnrf52@^10.8.0 +platform = + # renovate: datasource=custom.pio depName=platformio/nordicnrf52 packageName=platformio/platform/nordicnrf52 + platformio/nordicnrf52@^10.8.0 extends = arduino_base platform_packages = ; our custom Git version until they merge our PR + # TODO renovate platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#e13f5820002a4fb2a5e6754b42ace185277e5adf + # renovate: datasource=custom.pio depName=platformio/toolchain-gccarmnoneeabi packageName=platformio/tool/toolchain-gccarmnoneeabi platformio/toolchain-gccarmnoneeabi@~1.90301.0 build_type = debug @@ -28,4 +32,4 @@ lib_deps= lib_ignore = BluetoothOTA - lvgl \ No newline at end of file + lvgl diff --git a/arch/nrf52/nrf52840.ini b/arch/nrf52/nrf52840.ini index 0dab5d9ba..fb5ba9960 100644 --- a/arch/nrf52/nrf52840.ini +++ b/arch/nrf52/nrf52840.ini @@ -6,6 +6,7 @@ build_flags = ${nrf52_base.build_flags} lib_deps = ${nrf52_base.lib_deps} ${environmental_base.lib_deps} + # renovate: datasource=git-refs depName=Kongduino-Adafruit_nRFCrypto packageName=https://github.com/Kongduino/Adafruit_nRFCrypto gitBranch=master https://github.com/Kongduino/Adafruit_nRFCrypto/archive/e31a8825ea3300b163a0a3c1ddd5de34e10e1371.zip ; Common NRF52 debugging settings follow. See the Meshtastic developer docs for how to connect SWD debugging probes to your board. diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index e0488aeff..07e7db95c 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -1,6 +1,8 @@ ; The Portduino based 'native' environment. Currently supported on Linux targets with real LoRa hardware (or simulated). [portduino_base] -platform = https://github.com/meshtastic/platform-native/archive/c5bd469ab9b5a6966321e09557b27d906961da63.zip +platform = + # renovate: datasource=git-refs depName=platform-native packageName=https://github.com/meshtastic/platform-native gitBranch=develop + https://github.com/meshtastic/platform-native/archive/c5bd469ab9b5a6966321e09557b27d906961da63.zip framework = arduino build_src_filter = @@ -24,8 +26,11 @@ lib_deps = ${env.lib_deps} ${networking_base.lib_deps} ${radiolib_base.lib_deps} + # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto rweather/Crypto@^0.4.0 + # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX lovyan03/LovyanGFX@^1.2.0 + # renovate: datasource=git-refs depName=libch341-spi-userspace packageName=https://github.com/pine64/libch341-spi-userspace gitBranch=main https://github.com/pine64/libch341-spi-userspace/archive/a9b17e3452f7fb747000d9b4ad4409155b39f6ef.zip build_flags = diff --git a/arch/rp2xx0/rp2040.ini b/arch/rp2xx0/rp2040.ini index 33fcfb211..cd7e684b4 100644 --- a/arch/rp2xx0/rp2040.ini +++ b/arch/rp2xx0/rp2040.ini @@ -1,8 +1,13 @@ ; Common settings for rp2040 Processor based targets [rp2040_base] -platform = https://github.com/maxgerhardt/platform-raspberrypi#76ecf3c7e9dd4503af0331154c4ca1cddc4b03e5 ; For arduino-pico >= 4.4.3 +platform = + # TODO renovate + https://github.com/maxgerhardt/platform-raspberrypi#76ecf3c7e9dd4503af0331154c4ca1cddc4b03e5 + ; For arduino-pico >= 4.4.3 extends = arduino_base -platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico#4.4.3 +platform_packages = + # TODO renovate + framework-arduinopico@https://github.com/earlephilhower/arduino-pico#4.4.3 board_build.core = earlephilhower board_build.filesystem_size = 0.5m @@ -24,4 +29,5 @@ lib_deps = ${arduino_base.lib_deps} ${environmental_base.lib_deps} ${radiolib_base.lib_deps} - rweather/Crypto \ No newline at end of file + # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto + rweather/Crypto@0.4.0 diff --git a/arch/rp2xx0/rp2350.ini b/arch/rp2xx0/rp2350.ini index 841035c80..1c7af8be4 100644 --- a/arch/rp2xx0/rp2350.ini +++ b/arch/rp2xx0/rp2350.ini @@ -1,8 +1,13 @@ -; Common settings for rp2040 Processor based targets +; Common settings for rp2350 Processor based targets [rp2350_base] -platform = https://github.com/maxgerhardt/platform-raspberrypi#76ecf3c7e9dd4503af0331154c4ca1cddc4b03e5 ; For arduino-pico >= 4.4.3 +platform = + # TODO renovate + https://github.com/maxgerhardt/platform-raspberrypi#76ecf3c7e9dd4503af0331154c4ca1cddc4b03e5 + ; For arduino-pico >= 4.4.3 extends = arduino_base -platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico#4.4.3 +platform_packages = + # TODO renovate + framework-arduinopico@https://github.com/earlephilhower/arduino-pico#4.4.3 board_build.core = earlephilhower board_build.filesystem_size = 0.5m @@ -21,4 +26,5 @@ lib_deps = ${arduino_base.lib_deps} ${environmental_base.lib_deps} ${radiolib_base.lib_deps} - rweather/Crypto \ No newline at end of file + # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto + rweather/Crypto@0.4.0 diff --git a/arch/stm32/stm32.ini b/arch/stm32/stm32.ini index c1b58bb82..dd190c9d4 100644 --- a/arch/stm32/stm32.ini +++ b/arch/stm32/stm32.ini @@ -1,7 +1,11 @@ [stm32_base] extends = arduino_base -platform = ststm32 -platform_packages = platformio/framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/2.10.1.zip +platform = + # renovate: datasource=custom.pio depName=platformio/ststm32 packageName=platformio/platform/ststm32 + platformio/ststm32@19.1.0 +platform_packages = + # TODO renovate + platformio/framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/2.10.1.zip extra_scripts = ${env.extra_scripts} post:extra_scripts/extra_stm32.py @@ -35,6 +39,7 @@ debug_tool = stlink lib_deps = ${env.lib_deps} ${radiolib_base.lib_deps} + # renovate: datasource=git-refs depName=caveman99-stm32-Crypto packageName=https://github.com/caveman99/Crypto gitBranch=main https://github.com/caveman99/Crypto/archive/eae9c768054118a9399690f8af202853d1ae8516.zip lib_ignore = diff --git a/platformio.ini b/platformio.ini index 749aa94c7..844ba261d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -56,12 +56,19 @@ build_flags = -Wno-missing-field-initializers monitor_speed = 115200 monitor_filters = direct lib_deps = + # renovate: datasource=git-refs depName=meshtastic-esp8266-oled-ssd1306 packageName=https://github.com/meshtastic/esp8266-oled-ssd1306 gitBranch=master https://github.com/meshtastic/esp8266-oled-ssd1306/archive/0119501e9983bd894830b02f545c377ee08d66fe.zip + # renovate: datasource=custom.pio depName=OneButton packageName=mathertel/library/OneButton mathertel/OneButton@2.6.1 + # renovate: datasource=git-refs depName=meshtastic-arduino-fsm packageName=https://github.com/meshtastic/arduino-fsm gitBranch=master https://github.com/meshtastic/arduino-fsm/archive/7db3702bf0cfe97b783d6c72595e3f38e0b19159.zip + # renovate: datasource=git-refs depName=meshtastic-TinyGPSPlus packageName=https://github.com/meshtastic/TinyGPSPlus gitBranch=master https://github.com/meshtastic/TinyGPSPlus/archive/71a82db35f3b973440044c476d4bcdc673b104f4.zip + # renovate: datasource=git-refs depName=meshtastic-ArduinoThread packageName=https://github.com/meshtastic/ArduinoThread gitBranch=master https://github.com/meshtastic/ArduinoThread/archive/7c3ee9e1951551b949763b1f5280f8db1fa4068d.zip + # renovate: datasource=custom.pio depName=Nanopb packageName=nanopb/library/Nanopb nanopb/Nanopb@0.4.91 + # renovate: datasource=custom.pio depName=ErriezCRC32 packageName=erriez/library/ErriezCRC32 erriez/ErriezCRC32@1.0.1 ; Used for the code analysis in PIO Home / Inspect @@ -77,6 +84,7 @@ check_flags = framework = arduino lib_deps = ${env.lib_deps} + # renovate: datasource=custom.pio depName=NonBlockingRTTTL packageName=end2endzone/library/NonBlockingRTTTL end2endzone/NonBlockingRTTTL@1.3.0 build_flags = ${env.build_flags} -Os build_src_filter = ${env.build_src_filter} - - @@ -84,57 +92,98 @@ build_src_filter = ${env.build_src_filter} - -.+)$"], + "datasourceTemplate": "github-releases", + "depNameTemplate": "meshtastic/web", + "versioningTemplate": "semver-coerced" + }, + { + "customType": "regex", + "description": "Match normal PIO dependencies", + "fileMatch": [".*\\.ini$"], + "matchStrings": [ + "# renovate: datasource=(?.*?)(?: depName=(?.+?))? packageName=(?.+?)(?: versioning=(?[a-z-]+?))?\\s+?.+?@(?.+?)\\s" + ], + "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}" + }, + { + "customType": "regex", + "description": "Match PIO zipped dependencies with github tag ref", + "fileMatch": [".*\\.ini$"], + "matchStrings": [ + "# renovate: datasource=github-tags(?: depName=(?.+?))? packageName=(?.+?)(?: versioning=(?[a-z-]+?))?\\s+?https:\/\/.+?archive\/(?.+?).zip\\s" + ], + "datasourceTemplate": "github-tags", + "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}" + }, + { + "customType": "regex", + "description": "Match PIO zipped dependencies with git commit ref", + "fileMatch": [".*\\.ini$"], + "matchStrings": [ + "# renovate: datasource=git-refs(?: depName=(?.+?))? packageName=(?.+?)(?: versioning=(?[a-z-]+?))?\\sgitBranch=(?.+?)\\s+?https:\/\/.+?archive\/(?.+?).zip\\s" + ], + "datasourceTemplate": "git-refs", + "currentValueTemplate": "{{{gitBranch}}}", + "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}git{{/if}}" + } + ], + "packageRules": [] +} From 0d8e39cc2ad748b5a45407c8c309d1913034989a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 12:46:58 -0500 Subject: [PATCH 054/100] chore(deps): update ntpclient to v3.2.1 (#6545) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 844ba261d..5f3cbe7cd 100644 --- a/platformio.ini +++ b/platformio.ini @@ -95,7 +95,7 @@ lib_deps = # renovate: datasource=custom.pio depName=PubSubClient packageName=knolleary/library/PubSubClient knolleary/PubSubClient@2.8 # renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient - arduino-libraries/NTPClient@3.1.0 + arduino-libraries/NTPClient@3.2.1 # renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog arcao/Syslog@2.0.0 From 8e40d88e2436e00a7a5f7f23312f90a07cff1430 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 12:56:36 -0500 Subject: [PATCH 055/100] chore(deps): update platform-native digest to 46f509b (#6540) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- arch/portduino/portduino.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 07e7db95c..7d2569c32 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -2,7 +2,7 @@ [portduino_base] platform = # renovate: datasource=git-refs depName=platform-native packageName=https://github.com/meshtastic/platform-native gitBranch=develop - https://github.com/meshtastic/platform-native/archive/c5bd469ab9b5a6966321e09557b27d906961da63.zip + https://github.com/meshtastic/platform-native/archive/46f509b96ddce22d1bf38efc93319dfb3e4f5acf.zip framework = arduino build_src_filter = From 1888342a5701cfbab620d889f1893fbc93181930 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 12:57:21 -0500 Subject: [PATCH 056/100] chore(deps): update platformio/toolchain-gccarmnoneeabi to v1.140201.0 (#6546) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- arch/nrf52/nrf52.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini index 127f46183..e311089ae 100644 --- a/arch/nrf52/nrf52.ini +++ b/arch/nrf52/nrf52.ini @@ -9,7 +9,7 @@ platform_packages = # TODO renovate platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#e13f5820002a4fb2a5e6754b42ace185277e5adf # renovate: datasource=custom.pio depName=platformio/toolchain-gccarmnoneeabi packageName=platformio/tool/toolchain-gccarmnoneeabi - platformio/toolchain-gccarmnoneeabi@~1.90301.0 + platformio/toolchain-gccarmnoneeabi@1.140201.0 build_type = debug build_flags = From 456f94511f45844dae9db709ec79486046c755d8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 12:57:43 -0500 Subject: [PATCH 057/100] chore(deps): update libch341-spi-userspace digest to af9bc27 (#6539) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- arch/portduino/portduino.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 7d2569c32..6df3854f4 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -31,7 +31,7 @@ lib_deps = # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=git-refs depName=libch341-spi-userspace packageName=https://github.com/pine64/libch341-spi-userspace gitBranch=main - https://github.com/pine64/libch341-spi-userspace/archive/a9b17e3452f7fb747000d9b4ad4409155b39f6ef.zip + https://github.com/pine64/libch341-spi-userspace/archive/af9bc27c9c30fa90772279925b7c5913dff789b4.zip build_flags = ${arduino_base.build_flags} From daa03aba306375324c8a59d4464149bb9697633a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 13:02:42 -0500 Subject: [PATCH 058/100] chore(deps): update meshtastic-esp32_https_server digest to 896f177 (#6542) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- arch/esp32/esp32.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index 3dfefbdb6..5e15cb451 100644 --- a/arch/esp32/esp32.ini +++ b/arch/esp32/esp32.ini @@ -48,7 +48,7 @@ lib_deps = ${environmental_base.lib_deps} ${radiolib_base.lib_deps} # renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master - https://github.com/meshtastic/esp32_https_server/archive/23665b3adc080a311dcbb586ed5941b5f94d6ea2.zip + https://github.com/meshtastic/esp32_https_server/archive/896f1771ceb5979987a0b41028bf1b4e7aad419b.zip # renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino h2zero/NimBLE-Arduino@^1.4.3 # renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master From e98da27446a9878984f7197d06a3191c67e72a5c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 13:38:21 -0500 Subject: [PATCH 059/100] chore(deps): update ubuntu to v24 (#6541) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/sec_sast_semgrep_cron.yml | 2 +- .github/workflows/sec_sast_semgrep_pull.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sec_sast_semgrep_cron.yml b/.github/workflows/sec_sast_semgrep_cron.yml index db308c9f5..d7eef29b4 100644 --- a/.github/workflows/sec_sast_semgrep_cron.yml +++ b/.github/workflows/sec_sast_semgrep_cron.yml @@ -13,7 +13,7 @@ permissions: jobs: semgrep-full: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 container: image: semgrep/semgrep diff --git a/.github/workflows/sec_sast_semgrep_pull.yml b/.github/workflows/sec_sast_semgrep_pull.yml index 527a5c076..3707c91b8 100644 --- a/.github/workflows/sec_sast_semgrep_pull.yml +++ b/.github/workflows/sec_sast_semgrep_pull.yml @@ -6,7 +6,7 @@ permissions: read-all jobs: semgrep-diff: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 container: image: semgrep/semgrep From 1008a08c9911a849952158c9276ada5275de4dfa Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 9 Apr 2025 16:36:53 -0400 Subject: [PATCH 060/100] =?UTF-8?q?Revert=20"chore(deps):=20update=20platf?= =?UTF-8?q?ormio/toolchain-gccarmnoneeabi=20to=20v1.140201.=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 1888342a5701cfbab620d889f1893fbc93181930. --- arch/nrf52/nrf52.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini index e311089ae..127f46183 100644 --- a/arch/nrf52/nrf52.ini +++ b/arch/nrf52/nrf52.ini @@ -9,7 +9,7 @@ platform_packages = # TODO renovate platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#e13f5820002a4fb2a5e6754b42ace185277e5adf # renovate: datasource=custom.pio depName=platformio/toolchain-gccarmnoneeabi packageName=platformio/tool/toolchain-gccarmnoneeabi - platformio/toolchain-gccarmnoneeabi@1.140201.0 + platformio/toolchain-gccarmnoneeabi@~1.90301.0 build_type = debug build_flags = From 5c13f3451cf710a2f0e65b4f7872532c13520f71 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 16:10:01 -0500 Subject: [PATCH 061/100] chore(deps): update meshtastic-device-ui digest to 9345b03 (#6552) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 5f3cbe7cd..3c052e6ad 100644 --- a/platformio.ini +++ b/platformio.ini @@ -107,7 +107,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic-device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/56ef8db7eb4dda44dc0c1ec5828044debbbc6d33.zip + https://github.com/meshtastic/device-ui/archive/9345b03d47d3e2be91125325842b8bced0daaf86.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From 3694805938777e2be05385cf33f8b901fb840724 Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 9 Apr 2025 18:40:14 -0400 Subject: [PATCH 062/100] renovate: Link PIO deps to PlatformIO page (#6548) --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 417e17d9b..bf6ffdd4b 100644 --- a/renovate.json +++ b/renovate.json @@ -21,7 +21,7 @@ "defaultRegistryUrlTemplate": "https://api.registry.platformio.org/v3/packages/{{packageName}}", "format": "json", "transformTemplates": [ - "{\"releases\": [$map($.versions, function($v) { { \"version\": $v.name, \"releaseTimestamp\": $v.released_at } })] }" + "{\"releases\": [$map($.versions, function($v) { { \"version\": $v.name, \"releaseTimestamp\": $v.released_at } })], \"homepage\": $encodeUrl($join([\"https://registry.platformio.org/\",$.type,\"/\",$.owner.username,\"/\",$.name])) }" ] } }, From 06ce6f3e8a31e062f6ad5af8d1de165a62128cd4 Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Thu, 10 Apr 2025 11:48:40 +1200 Subject: [PATCH 063/100] fix: remove redundant GPS code targeting Heltec T114 (#6497) --- src/gps/GPS.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 689f5e204..55f62d8ad 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -810,13 +810,6 @@ void GPS::setPowerState(GPSPowerState newState, uint32_t sleepTime) powerState = newState; LOG_INFO("GPS power state move from %s to %s", getGPSPowerStateString(oldState), getGPSPowerStateString(newState)); -#ifdef HELTEC_MESH_NODE_T114 - if ((oldState == GPS_OFF || oldState == GPS_HARDSLEEP) && (newState != GPS_OFF && newState != GPS_HARDSLEEP)) { - _serial_gps->begin(serialSpeeds[speedSelect]); - } else if ((newState == GPS_OFF || newState == GPS_HARDSLEEP) && (oldState != GPS_OFF && oldState != GPS_HARDSLEEP)) { - _serial_gps->end(); - } -#endif switch (newState) { case GPS_ACTIVE: case GPS_IDLE: From 91f38797a8c770b693a30ee52f5be6d81bcf14c9 Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 9 Apr 2025 20:23:15 -0400 Subject: [PATCH 064/100] Don't renovate toolchain-gccarmnoneeabi (#6554) --- arch/nrf52/nrf52.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini index 127f46183..d49d8920c 100644 --- a/arch/nrf52/nrf52.ini +++ b/arch/nrf52/nrf52.ini @@ -8,7 +8,7 @@ platform_packages = ; our custom Git version until they merge our PR # TODO renovate platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#e13f5820002a4fb2a5e6754b42ace185277e5adf - # renovate: datasource=custom.pio depName=platformio/toolchain-gccarmnoneeabi packageName=platformio/tool/toolchain-gccarmnoneeabi + ; Don't renovate toolchain-gccarmnoneeabi platformio/toolchain-gccarmnoneeabi@~1.90301.0 build_type = debug From 854d74f8db468e0be0db9e8c60bdbf43e22a4a5b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Apr 2025 22:18:42 +0200 Subject: [PATCH 065/100] chore(deps): update meshtastic-device-ui digest to acf343b (#6559) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 3c052e6ad..647114537 100644 --- a/platformio.ini +++ b/platformio.ini @@ -107,7 +107,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic-device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/9345b03d47d3e2be91125325842b8bced0daaf86.zip + https://github.com/meshtastic/device-ui/archive/acf343b73cedbdcd5838ba1407c054974a0b6914.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From 4ef9eae69571517b6954d4292691603682c5938c Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 11 Apr 2025 07:02:55 -0400 Subject: [PATCH 066/100] Portduino: Set C standard to 17 (#6561) --- arch/portduino/portduino.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 6df3854f4..1d731f6b7 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -47,4 +47,5 @@ build_flags = -lyaml-cpp -li2c -luv + -std=gnu17 -std=c++17 From baa05aacf53b910b206b39fb4b55395d2103ab69 Mon Sep 17 00:00:00 2001 From: Ken Piper Date: Fri, 11 Apr 2025 06:04:37 -0500 Subject: [PATCH 067/100] fix: Correct underlying cause of T-Watch not functioning when set to a 16MB filesystem (#6563) * Fix maximum flash size in T-Watch S3 board definition * Revert "Fix: T-Watch-S3 has 8MB Flash (#6407)" This reverts commit 769f0623be6a7d7503c56bc1b6e468114dacdff0. --- bin/device-install.bat | 4 ++-- bin/device-install.sh | 2 +- boards/t-watch-s3.json | 6 +++--- variants/t-watch-s3/platformio.ini | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/device-install.bat b/bin/device-install.bat index 594d973f5..3ffca0b63 100755 --- a/bin/device-install.bat +++ b/bin/device-install.bat @@ -17,8 +17,8 @@ SET "LOGCOUNTER=0" SET "S3=s3 v3 t-deck wireless-paper wireless-tracker station-g2 unphone" SET "C3=esp32c3" @REM FIXME: Determine flash size from PlatformIO variant, this is unmaintainable. -SET "BIGDB_8MB=picomputer-s3 unphone seeed-sensecap-indicator crowpanel-esp32s3 heltec_capsule_sensor_v3 heltec-v3 heltec-vision-master-e213 heltec-vision-master-e290 heltec-vision-master-t190 heltec-wireless-paper heltec-wireless-tracker heltec-wsl-v3 icarus seeed-xiao-s3 tbeam-s3-core t-watch-s3 tracksenger" -SET "BIGDB_16MB=t-deck mesh-tab t-energy-s3 dreamcatcher ESP32-S3-Pico m5stack-cores3 station-g2 t-eth-elite" +SET "BIGDB_8MB=picomputer-s3 unphone seeed-sensecap-indicator crowpanel-esp32s3 heltec_capsule_sensor_v3 heltec-v3 heltec-vision-master-e213 heltec-vision-master-e290 heltec-vision-master-t190 heltec-wireless-paper heltec-wireless-tracker heltec-wsl-v3 icarus seeed-xiao-s3 tbeam-s3-core tracksenger" +SET "BIGDB_16MB=t-deck mesh-tab t-energy-s3 dreamcatcher ESP32-S3-Pico m5stack-cores3 station-g2 t-eth-elite t-watch-s3" GOTO getopts :help diff --git a/bin/device-install.sh b/bin/device-install.sh index 796626a9d..a43ccbdb4 100755 --- a/bin/device-install.sh +++ b/bin/device-install.sh @@ -22,7 +22,6 @@ BIGDB_8MB=( "icarus" "seeed-xiao-s3" "tbeam-s3-core" - "t-watch-s3" "tracksenger" ) BIGDB_16MB=( @@ -34,6 +33,7 @@ BIGDB_16MB=( "m5stack-cores3" "station-g2" "t-eth-elite" + "t-watch-s3" ) S3_VARIANTS=( "s3" diff --git a/boards/t-watch-s3.json b/boards/t-watch-s3.json index 51bb7cf4b..bae4f47b0 100644 --- a/boards/t-watch-s3.json +++ b/boards/t-watch-s3.json @@ -24,16 +24,16 @@ "mcu": "esp32s3", "variant": "t-watch-s3" }, - "connectivity": ["wifi", "bluetooth"], + "connectivity": ["wifi", "bluetooth", "lora"], "debug": { "openocd_target": "esp32s3.cfg" }, "frameworks": ["arduino"], "name": "LilyGo T-Watch 2020 V3", "upload": { - "flash_size": "8MB", + "flash_size": "16MB", "maximum_ram_size": 327680, - "maximum_size": 8388608, + "maximum_size": 16777216, "require_upload_port": true, "use_1200bps_touch": true, "wait_for_upload_port": true, diff --git a/variants/t-watch-s3/platformio.ini b/variants/t-watch-s3/platformio.ini index d650b1f11..f98237943 100644 --- a/variants/t-watch-s3/platformio.ini +++ b/variants/t-watch-s3/platformio.ini @@ -3,7 +3,7 @@ extends = esp32s3_base board = t-watch-s3 board_check = true -board_build.partitions = default_8MB.csv +board_build.partitions = default_16MB.csv upload_protocol = esptool build_flags = ${esp32_base.build_flags} From 7079f538edc1d90560453e5246218a95db5eba25 Mon Sep 17 00:00:00 2001 From: Kevin Jahaziel Leon Morales Date: Fri, 11 Apr 2025 04:26:30 -0700 Subject: [PATCH 068/100] feat: Add Electronic Cats variant for Catsniffer (#6483) * feat: Add Electronic Cats variant for catsniffer * fix: Trunk fmt * fix: Variant error --- variants/ec_catsniffer/platformio.ini | 15 ++++++++++ variants/ec_catsniffer/variant.cpp | 39 +++++++++++++++++++++++++ variants/ec_catsniffer/variant.h | 41 +++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 variants/ec_catsniffer/platformio.ini create mode 100644 variants/ec_catsniffer/variant.cpp create mode 100644 variants/ec_catsniffer/variant.h diff --git a/variants/ec_catsniffer/platformio.ini b/variants/ec_catsniffer/platformio.ini new file mode 100644 index 000000000..9afb44236 --- /dev/null +++ b/variants/ec_catsniffer/platformio.ini @@ -0,0 +1,15 @@ +[env:catsniffer] +extends = rp2040_base +board = rpipico +upload_protocol = picotool + +build_flags = ${rp2040_base.build_flags} + -DRPI_PICO + -Ivariants/ec_catsniffer + -DDEBUG_RP2040_PORT=Serial + # -DHW_SPI1_DEVICE + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus" +lib_deps = + ${rp2040_base.lib_deps} +debug_build_flags = ${rp2040_base.build_flags}, -g +debug_tool = cmsis-dap \ No newline at end of file diff --git a/variants/ec_catsniffer/variant.cpp b/variants/ec_catsniffer/variant.cpp new file mode 100644 index 000000000..db5226541 --- /dev/null +++ b/variants/ec_catsniffer/variant.cpp @@ -0,0 +1,39 @@ +/* + Copyright (c) 2014-2015 Arduino LLC. All right reserved. + Copyright (c) 2016 Sandeep Mistry All right reserved. + Copyright (c) 2018, Adafruit Industries (adafruit.com) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "variant.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +#define CTF1 8 +#define CTF2 9 +#define CTF3 10 + +void initVariant() +{ + // Config the LoRa Switch + pinMode(CTF1, OUTPUT); + pinMode(CTF2, OUTPUT); + pinMode(CTF3, OUTPUT); + + digitalWrite(CTF1, HIGH); + digitalWrite(CTF2, LOW); + digitalWrite(CTF3, LOW); +} \ No newline at end of file diff --git a/variants/ec_catsniffer/variant.h b/variants/ec_catsniffer/variant.h new file mode 100644 index 000000000..400074e59 --- /dev/null +++ b/variants/ec_catsniffer/variant.h @@ -0,0 +1,41 @@ +// #define RADIOLIB_CUSTOM_ARDUINO 1 +// #define RADIOLIB_TONE_UNSUPPORTED 1 +// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1 + +#define ARDUINO_ARCH_AVR + +#define HAS_SCREEN 0 +#define HAS_GPS 0 +#undef GPS_RX_PIN +#undef GPS_TX_PIN + +#define LED_PIN 27 + +#define USE_SX1262 + +#undef LORA_SCK +#undef LORA_MISO +#undef LORA_MOSI +#undef LORA_CS + +#define LORA_SCK 18 +#define LORA_MISO 16 +#define LORA_MOSI 19 +#define LORA_CS 17 // NSS + +#define LORA_DIO0 5 +#define LORA_RESET 24 +#define LORA_DIO1 4 +#define LORA_DIO2 23 +#define LORA_DIO3 25 +#define SX126X_RXEN 21 +#define SX126X_TXEN 20 + +#ifdef USE_SX1262 +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO0 +#define SX126X_BUSY LORA_DIO1 +#define SX126X_RESET LORA_RESET +// #define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 0 +#endif From e9570090193cca7d428dcd951220a280116b54e4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 07:48:13 -0500 Subject: [PATCH 069/100] Upgrade trunk (#6564) Co-authored-by: sachaw <11172820+sachaw@users.noreply.github.com> --- .trunk/trunk.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index e74c1a362..ba0dd97cc 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -8,7 +8,7 @@ plugins: uri: https://github.com/trunk-io/plugins lint: enabled: - - renovate@39.235.2 + - renovate@39.238.1 - prettier@3.5.3 - trufflehog@3.88.23 - yamllint@1.37.0 From e7ce910c3b6613ca50ce8133e3998758c3f07eaa Mon Sep 17 00:00:00 2001 From: Tavis Date: Fri, 11 Apr 2025 07:38:44 -1000 Subject: [PATCH 070/100] Add generic thread module (#5484) * compiling, untested * use INCLUDE not EXLUDE for option to include module * protobuf update * working genericthread module Update protobufs * use EXCLUDE style instead of INCLUDE * Update Modules.cpp --------- Co-authored-by: Ben Meadors --- platformio.ini | 1 + src/modules/GenericThreadModule.cpp | 28 ++++++++++++++++++++++++++++ src/modules/GenericThreadModule.h | 21 +++++++++++++++++++++ src/modules/Modules.cpp | 9 ++++++++- 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 src/modules/GenericThreadModule.cpp create mode 100644 src/modules/GenericThreadModule.h diff --git a/platformio.ini b/platformio.ini index 647114537..e1eabf952 100644 --- a/platformio.ini +++ b/platformio.ini @@ -50,6 +50,7 @@ build_flags = -Wno-missing-field-initializers -DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1 -DMESHTASTIC_EXCLUDE_HEALTH_TELEMETRY=1 -DMESHTASTIC_EXCLUDE_POWERSTRESS=1 ; exclude power stress test module from main firmware + -DMESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE=1 #-DBUILD_EPOCH=$UNIX_TIME #-D OLED_PL=1 diff --git a/src/modules/GenericThreadModule.cpp b/src/modules/GenericThreadModule.cpp new file mode 100644 index 000000000..eb92566bd --- /dev/null +++ b/src/modules/GenericThreadModule.cpp @@ -0,0 +1,28 @@ +#include "GenericThreadModule.h" +#include "MeshService.h" +#include "configuration.h" +#include + +/* +Generic Thread Module allows for the execution of custom code at a set interval. +*/ +GenericThreadModule *genericThreadModule; + +GenericThreadModule::GenericThreadModule() : concurrency::OSThread("GenericThreadModule") {} + +int32_t GenericThreadModule::runOnce() +{ + + bool enabled = true; + if (!enabled) + return disable(); + + if (firstTime) { + // do something the first time we run + firstTime = 0; + LOG_INFO("first time GenericThread running"); + } + + LOG_INFO("GenericThread executing"); + return (my_interval); +} diff --git a/src/modules/GenericThreadModule.h b/src/modules/GenericThreadModule.h new file mode 100644 index 000000000..05f7946bb --- /dev/null +++ b/src/modules/GenericThreadModule.h @@ -0,0 +1,21 @@ +#pragma once + +#include "MeshModule.h" +#include "concurrency/OSThread.h" +#include "configuration.h" +#include +#include + +class GenericThreadModule : private concurrency::OSThread +{ + bool firstTime = 1; + + public: + GenericThreadModule(); + + protected: + unsigned int my_interval = 10000; // interval in millisconds + virtual int32_t runOnce() override; +}; + +extern GenericThreadModule *genericThreadModule; diff --git a/src/modules/Modules.cpp b/src/modules/Modules.cpp index e2a4a970c..1f2b50057 100644 --- a/src/modules/Modules.cpp +++ b/src/modules/Modules.cpp @@ -65,6 +65,10 @@ #if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_POWER_TELEMETRY #include "modules/Telemetry/PowerTelemetry.h" #endif +#if !MESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE +#include "modules/GenericThreadModule.h" +#endif + #ifdef ARCH_ESP32 #if defined(USE_SX1280) && !MESHTASTIC_EXCLUDE_AUDIO #include "modules/esp32/AudioModule.h" @@ -131,6 +135,9 @@ void setupModules() #if !MESHTASTIC_EXCLUDE_DROPZONE dropzoneModule = new DropzoneModule(); +#endif +#if !MESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE + new GenericThreadModule(); #endif // Note: if the rest of meshtastic doesn't need to explicitly use your module, you do not need to assign the instance // to a global variable. @@ -249,4 +256,4 @@ void setupModules() // NOTE! This module must be added LAST because it likes to check for replies from other modules and avoid sending extra // acks routingModule = new RoutingModule(); -} \ No newline at end of file +} From e7d0837d014271c9d3e8a2b1d61b75102cf4184c Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 11 Apr 2025 16:54:53 -0400 Subject: [PATCH 071/100] Add Meshtastic Linux desktop metadata (#6568) --- bin/org.meshtastic.meshtasticd.desktop | 8 ++ bin/org.meshtastic.meshtasticd.metainfo.xml | 94 +++++++++++++++++++++ bin/org.meshtastic.meshtasticd.svg | 16 ++++ 3 files changed, 118 insertions(+) create mode 100644 bin/org.meshtastic.meshtasticd.desktop create mode 100644 bin/org.meshtastic.meshtasticd.metainfo.xml create mode 100644 bin/org.meshtastic.meshtasticd.svg diff --git a/bin/org.meshtastic.meshtasticd.desktop b/bin/org.meshtastic.meshtasticd.desktop new file mode 100644 index 000000000..215c7ee05 --- /dev/null +++ b/bin/org.meshtastic.meshtasticd.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Meshtastic +Comment=Meshtastic App +Exec=meshtasticd +Icon=org.meshtastic.meshtasticd +Terminal=true +Type=Application +Categories=Network;Chat;HamRadio; \ No newline at end of file diff --git a/bin/org.meshtastic.meshtasticd.metainfo.xml b/bin/org.meshtastic.meshtasticd.metainfo.xml new file mode 100644 index 000000000..a9e6cbdf5 --- /dev/null +++ b/bin/org.meshtastic.meshtasticd.metainfo.xml @@ -0,0 +1,94 @@ + + + org.meshtastic.meshtasticd + + Meshtastic +

Decentralized mesh communication + + CC-BY-4.0 + GPL-3.0-or-later + + + Meshtastic + + + +

+ Meshtastic is an open source project for creating off-grid, affordable, and resilient communication with LoRa mesh networks. +

+
+ + org.meshtastic.meshtasticd.desktop + + + Network + Chat + HamRadio + + + mesh + LoRa + + + + keyboard + pointing + touch + + + 360 + + + + #97be89 + #206538 + + + + intense + intense + + + https://github.com/meshtastic/firmware/issues + https://meshtastic.org/ + https://opencollective.com/meshtastic + https://meshtastic.org/docs/software/linux/usage/ + https://github.com/meshtastic/firmware/ + + + + https://meshtastic.org/img/software/meshtastic-ui/mui_home_dashboard_dark.webp + Home Dashboard + + + https://meshtastic.org/img/software/meshtastic-ui/mui_initial_boot.webp + Setup + + + https://meshtastic.org/img/software/meshtastic-ui/mui_node_list_dark.webp + Nodes List + + + https://meshtastic.org/img/software/meshtastic-ui/mui_chat_list_dark.webp + Chats List + + + https://meshtastic.org/img/software/meshtastic-ui/mui_chat_message_dark.webp + Messages + + + https://meshtastic.org/img/software/meshtastic-ui/mui_map_dark.webp + Map + + + https://meshtastic.org/img/software/meshtastic-ui/mui_settings_dark.webp + Settings + + + + + + https://github.com/meshtastic/firmware/releases/tag/v2.6.4.b89355f + + + \ No newline at end of file diff --git a/bin/org.meshtastic.meshtasticd.svg b/bin/org.meshtastic.meshtasticd.svg new file mode 100644 index 000000000..e6863f6a6 --- /dev/null +++ b/bin/org.meshtastic.meshtasticd.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 4.6.0 + + + + + + + + + + + + \ No newline at end of file From e4c2730f71f7002a374bcf17cd30f3dbc47b8036 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 12 Apr 2025 19:47:36 +0200 Subject: [PATCH 072/100] chore(deps): update meshtastic-device-ui digest to 13f69c5 (#6567) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index e1eabf952..b0d9d6237 100644 --- a/platformio.ini +++ b/platformio.ini @@ -108,7 +108,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic-device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/acf343b73cedbdcd5838ba1407c054974a0b6914.zip + https://github.com/meshtastic/device-ui/archive/13f69c5f8d992b9e028d036bfc9b6485183e742f.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From 3eb845eaae6421de8a642a7d7c85cef6ec7657e4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 12 Apr 2025 19:28:37 -0500 Subject: [PATCH 073/100] chore(deps): update meshtastic-device-ui digest to 3cdb8a6 (#6572) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index b0d9d6237..bba4dfe18 100644 --- a/platformio.ini +++ b/platformio.ini @@ -108,7 +108,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic-device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/13f69c5f8d992b9e028d036bfc9b6485183e742f.zip + https://github.com/meshtastic/device-ui/archive/3cdb8a63039aa2cf426104ab02656996730f79fa.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From 28e62e53e5dd83888ecf1bf5bd288c3684fcde62 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 07:50:09 -0500 Subject: [PATCH 074/100] Upgrade trunk (#6581) Co-authored-by: sachaw <11172820+sachaw@users.noreply.github.com> --- .trunk/trunk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index ba0dd97cc..01e8f8d1b 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -4,7 +4,7 @@ cli: plugins: sources: - id: trunk - ref: v1.6.7 + ref: v1.6.8 uri: https://github.com/trunk-io/plugins lint: enabled: @@ -16,7 +16,7 @@ lint: - terrascan@1.19.9 - trivy@0.61.0 - taplo@0.9.3 - - ruff@0.11.4 + - ruff@0.11.5 - isort@6.0.1 - markdownlint@0.44.0 - oxipng@9.1.4 From c4dc3472ac3d8f987bb905a570b2c2a5dbd785c2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 01:09:32 +0200 Subject: [PATCH 075/100] chore(deps): update meshtastic-device-ui digest to 3fde170 (#6586) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index bba4dfe18..f22d92b2e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -108,7 +108,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic-device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/3cdb8a63039aa2cf426104ab02656996730f79fa.zip + https://github.com/meshtastic/device-ui/archive/3fde170dca16863218cec133e05c5f2fc8d6e59a.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From b46aad85ccd765edf75a45b8434833a85d2910d2 Mon Sep 17 00:00:00 2001 From: "Aaron.Lee" <32860565+Heltec-Aaron-Lee@users.noreply.github.com> Date: Tue, 15 Apr 2025 11:34:30 +0800 Subject: [PATCH 076/100] Add new hardware: Heltec MeshPocket (#6533) * Add Heltec MeshPocket. * MeshPocket source code update * Optimiz code for refresh border during full update. * Update Heltec MeshPocket json file info. --- boards/heltec_mesh_pocket.json | 54 +++++++ src/graphics/EInkDisplay2.cpp | 16 ++- src/graphics/EInkDisplay2.h | 4 + .../niche/Drivers/EInk/LCMEN2R13ECC1.cpp | 68 +++++++++ .../niche/Drivers/EInk/LCMEN2R13ECC1.h | 41 ++++++ src/platform/nrf52/architecture.h | 2 + src/power.h | 4 + variants/heltec_mesh_pocket/nicheGraphics.h | 107 ++++++++++++++ variants/heltec_mesh_pocket/platformio.ini | 92 ++++++++++++ variants/heltec_mesh_pocket/variant.cpp | 13 ++ variants/heltec_mesh_pocket/variant.h | 135 ++++++++++++++++++ 11 files changed, 535 insertions(+), 1 deletion(-) create mode 100644 boards/heltec_mesh_pocket.json create mode 100644 src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.cpp create mode 100644 src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h create mode 100644 variants/heltec_mesh_pocket/nicheGraphics.h create mode 100644 variants/heltec_mesh_pocket/platformio.ini create mode 100644 variants/heltec_mesh_pocket/variant.cpp create mode 100644 variants/heltec_mesh_pocket/variant.h diff --git a/boards/heltec_mesh_pocket.json b/boards/heltec_mesh_pocket.json new file mode 100644 index 000000000..a35387857 --- /dev/null +++ b/boards/heltec_mesh_pocket.json @@ -0,0 +1,54 @@ +{ + "build": { + "arduino": { + "ldscript": "nrf52840_s140_v6.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DNRF52840_XXAA", + "f_cpu": "64000000L", + "hwids": [ + ["0x239A", "0x4405"], + ["0x239A", "0x0029"], + ["0x239A", "0x002A"] + ], + "usb_product": "HT-n5262", + "mcu": "nrf52840", + "variant": "heltec_mesh_pocket", + "variants_dir": "variants", + "bsp": { + "name": "adafruit" + }, + "softdevice": { + "sd_flags": "-DS140", + "sd_name": "s140", + "sd_version": "6.1.1", + "sd_fwid": "0x00B6" + }, + "bootloader": { + "settings_addr": "0xFF000" + } + }, + "connectivity": ["bluetooth"], + "debug": { + "jlink_device": "nRF52840_xxAA", + "onboard_tools": ["jlink"], + "svd_path": "nrf52840.svd", + "openocd_target": "nrf52840-mdk-rs" + }, + "frameworks": ["arduino"], + "name": "Heltec nrf (Adafruit BSP)", + "upload": { + "maximum_ram_size": 248832, + "maximum_size": 815104, + "speed": 115200, + "protocol": "nrfutil", + "protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true + }, + "url": "https://heltec.org/project/meshpocket/", + "vendor": "Heltec" + } + \ No newline at end of file diff --git a/src/graphics/EInkDisplay2.cpp b/src/graphics/EInkDisplay2.cpp index d2d373d24..737fcc3f0 100644 --- a/src/graphics/EInkDisplay2.cpp +++ b/src/graphics/EInkDisplay2.cpp @@ -181,7 +181,6 @@ bool EInkDisplay::connect() // Start HSPI hspi = new SPIClass(HSPI); hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); // SCLK, MISO, MOSI, SS - // VExt already enabled in setup() // RTC GPIO hold disabled in setup() @@ -218,6 +217,21 @@ bool EInkDisplay::connect() adafruitDisplay->setRotation(1); adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT); } +#elif defined(HELTEC_MESH_POCKET) + { + spi1=&SPI1; + spi1->begin(); + // VExt already enabled in setup() + // RTC GPIO hold disabled in setup() + + // Create GxEPD2 objects + auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, *spi1); + adafruitDisplay = new GxEPD2_BW(*lowLevel); + + // Init GxEPD2 + adafruitDisplay->init(); + adafruitDisplay->setRotation(3); + } #endif return true; diff --git a/src/graphics/EInkDisplay2.h b/src/graphics/EInkDisplay2.h index 9c1c8d18e..93be197b0 100644 --- a/src/graphics/EInkDisplay2.h +++ b/src/graphics/EInkDisplay2.h @@ -73,6 +73,10 @@ class EInkDisplay : public OLEDDisplay SPIClass *hspi = NULL; #endif +#if defined(HELTEC_MESH_POCKET) + SPIClass *spi1 = NULL; +#endif + private: // FIXME quick hack to limit drawing to a very slow rate uint32_t lastDrawMsec = 0; diff --git a/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.cpp b/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.cpp new file mode 100644 index 000000000..5e21c00f6 --- /dev/null +++ b/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.cpp @@ -0,0 +1,68 @@ +#include "./LCMEN2R13ECC1.h" + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +using namespace NicheGraphics::Drivers; + +// Map the display controller IC's output to the connected panel +void LCMEN2R13ECC1::configScanning() +{ + // "Driver output control" + sendCommand(0x01); + sendData(0xF9); + sendData(0x00); + sendData(0x00); + + // To-do: delete this method? + // Values set here might be redundant: F9, 00, 00 seems to be default +} + +// Specify which information is used to control the sequence of voltages applied to move the pixels +// - For this display, configUpdateSequence() specifies that a suitable LUT will be loaded from +// the controller IC's OTP memory, when the update procedure begins. +void LCMEN2R13ECC1::configWaveform() +{ + switch (updateType) { + case FAST: + sendCommand(0x3C); // Border waveform: + sendData(0x85); + break; + + case FULL: + default: + // From OTP memory + break; + } +} + +void LCMEN2R13ECC1::configUpdateSequence() +{ + switch (updateType) { + case FAST: + sendCommand(0x22); // Set "update sequence" + sendData(0xFF); // Will load LUT from OTP memory, Display mode 2 "differential refresh" + break; + + case FULL: + default: + sendCommand(0x22); // Set "update sequence" + sendData(0xF7); // Will load LUT from OTP memory + break; + } +} + +// Once the refresh operation has been started, +// begin periodically polling the display to check for completion, using the normal Meshtastic threading code +// Only used when refresh is "async" +void LCMEN2R13ECC1::detachFromUpdate() +{ + switch (updateType) { + case FAST: + return beginPolling(50, 800); // At least 500ms for fast refresh + case FULL: + default: + return beginPolling(100, 2500); // At least 2 seconds for full refresh + } +} + +#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h b/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h new file mode 100644 index 000000000..7b0aed282 --- /dev/null +++ b/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h @@ -0,0 +1,41 @@ +/* + +E-Ink display driver + - SSD1680 + - Manufacturer: WISEVAST + - Size: 2.13 inch + - Resolution: 122px x 255px + - Flex connector marking: Soldering connector, no connector is needed + +*/ + +#pragma once + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +#include "configuration.h" + +#include "./SSD16XX.h" + +namespace NicheGraphics::Drivers +{ +class LCMEN2R13ECC1 : public SSD16XX +{ + // Display properties + private: + static constexpr uint32_t width = 122; + static constexpr uint32_t height = 250; + static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST); + + public: + LCMEN2R13ECC1() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte + + protected: + virtual void configScanning() override; + virtual void configWaveform() override; + virtual void configUpdateSequence() override; + void detachFromUpdate() override; +}; + +} // namespace NicheGraphics::Drivers +#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/platform/nrf52/architecture.h b/src/platform/nrf52/architecture.h index 4e8823063..21296c3fc 100644 --- a/src/platform/nrf52/architecture.h +++ b/src/platform/nrf52/architecture.h @@ -81,6 +81,8 @@ #define HW_VENDOR meshtastic_HardwareModel_MESHLINK #elif defined(SEEED_XIAO_NRF52840_KIT) #define HW_VENDOR meshtastic_HardwareModel_XIAO_NRF52_KIT +#elif defined(HELTEC_MESH_POCKET) +#define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_POCKET #else #define HW_VENDOR meshtastic_HardwareModel_NRF52_UNKNOWN #endif diff --git a/src/power.h b/src/power.h index e9c0deb7c..a21f7d164 100644 --- a/src/power.h +++ b/src/power.h @@ -26,6 +26,10 @@ #define OCV_ARRAY 2700, 2560, 2540, 2520, 2500, 2460, 2420, 2400, 2380, 2320, 1500 #elif defined(TRACKER_T1000_E) #define OCV_ARRAY 4190, 4078, 4017, 3969, 3887, 3818, 3798, 3791, 3766, 3712, 3100 +#elif defined(HELTEC_MESH_POCKET_BATTERY_5000) +#define OCV_ARRAY 4300, 4240, 4120, 4000, 3888, 3800, 3740, 3698, 3655, 3580, 3400 +#elif defined(HELTEC_MESH_POCKET_BATTERY_10000) +#define OCV_ARRAY 4100, 4060, 3960, 3840, 3729, 3625, 3550, 3500, 3420, 3345, 3100 #else // LiIon #define OCV_ARRAY 4190, 4050, 3990, 3890, 3800, 3720, 3630, 3530, 3420, 3300, 3100 #endif diff --git a/variants/heltec_mesh_pocket/nicheGraphics.h b/variants/heltec_mesh_pocket/nicheGraphics.h new file mode 100644 index 000000000..352a9bc47 --- /dev/null +++ b/variants/heltec_mesh_pocket/nicheGraphics.h @@ -0,0 +1,107 @@ +#pragma once + +#include "configuration.h" + +#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS + +// InkHUD-specific components +// --------------------------- +#include "graphics/niche/InkHUD/InkHUD.h" + +// Applets +#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h" +#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h" +#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h" +#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h" +#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h" + +// #include "graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.h" +// #include "graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.h" + +// Shared NicheGraphics components +// -------------------------------- +#include "graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h" +#include "graphics/niche/Inputs/TwoButton.h" + +#include "graphics/niche/Fonts/FreeSans6pt7b.h" +#include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h" +#include + +void setupNicheGraphics() +{ + using namespace NicheGraphics; + + // SPI + // ----------------------------- + SPIClass *spi1=&SPI1; + spi1->begin(); + // Display is connected to SPI1 + + // E-Ink Driver + // ----------------------------- + // Use E-Ink driver + Drivers::EInk *driver = new Drivers::LCMEN2R13ECC1; + driver->begin(spi1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES); + + // InkHUD + // ---------------------------- + + InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance(); + + // Set the driver + inkhud->setDriver(driver); + + // Set how many FAST updates per FULL update + // Set how unhealthy additional FAST updates beyond this number are + inkhud->setDisplayResilience(10, 1.5); + + // Prepare fonts + InkHUD::Applet::fontLarge = InkHUD::AppletFont(FreeSans9pt7b); + InkHUD::Applet::fontSmall = InkHUD::AppletFont(FreeSans6pt7b); + /* + // Font localization demo: Cyrillic + InkHUD::Applet::fontSmall = InkHUD::AppletFont(FreeSans6pt8bCyrillic); + InkHUD::Applet::fontSmall.addSubstitutionsWin1251(); + */ + + // Customize default settings + inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle? + inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise + inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users + inkhud->persistence->settings.optionalMenuItems.nextTile = true; + + // Pick applets + inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown + inkhud->addApplet("DMs", new InkHUD::DMApplet); // Inactive + inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // Inactive + inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // Inactive + inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated + inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // Inactive + inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0 + // inkhud->addApplet("Basic", new InkHUD::BasicExampleApplet); + // inkhud->addApplet("NewMsg", new InkHUD::NewMsgExampleApplet); + + // Start running InkHUD + inkhud->begin(); + + // Buttons + // -------------------------- + + Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component + constexpr uint8_t MAIN_BUTTON = 0; + // constexpr uint8_t AUX_BUTTON = 1; + + // Setup the main user button + buttons->setWiring(MAIN_BUTTON, Inputs::TwoButton::getUserButtonPin()); + buttons->setHandlerShortPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->shortpress(); }); + buttons->setHandlerLongPress(MAIN_BUTTON, []() { InkHUD::InkHUD::getInstance()->longpress(); }); + + // Setup the aux button + // Bonus feature of VME213 + // buttons->setWiring(AUX_BUTTON, BUTTON_PIN_SECONDARY); + // buttons->setHandlerShortPress(AUX_BUTTON, []() { InkHUD::InkHUD::getInstance()->nextTile(); }); + buttons->start(); +} + +#endif \ No newline at end of file diff --git a/variants/heltec_mesh_pocket/platformio.ini b/variants/heltec_mesh_pocket/platformio.ini new file mode 100644 index 000000000..53f56e973 --- /dev/null +++ b/variants/heltec_mesh_pocket/platformio.ini @@ -0,0 +1,92 @@ +; First prototype nrf52840/sx1262 device +[env:heltec-mesh-pocket-5000] +extends = nrf52840_base +board = heltec_mesh_pocket +debug_tool = jlink + +# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling. +build_flags = ${nrf52840_base.build_flags} -Ivariants/heltec_mesh_pocket + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DHELTEC_MESH_POCKET + -DHELTEC_MESH_POCKET_BATTERY_5000 + -DUSE_EINK + -DEINK_DISPLAY_MODEL=GxEPD2_213_B74 + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 + -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -DEINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted + -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates +; -D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated + -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + -DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting" + -DEINK_HASQUIRK_WEAKFASTREFRESH ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight + +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_pocket> +lib_deps = + ${nrf52840_base.lib_deps} + lewisxhe/PCF8563_Library@^1.0.1 + https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d + + +[env:heltec-mesh-pocket-inkhud-5000] +extends = nrf52840_base, inkhud +board = heltec_mesh_pocket +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_pocket> ${inkhud.build_src_filter} +build_flags = + ${inkhud.build_flags} + ${nrf52840_base.build_flags} + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -I variants/heltec_mesh_pocket + -D HELTEC_MESH_POCKET + -D HELTEC_MESH_POCKET_BATTERY_5000 +lib_deps = + ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX + ${nrf52840_base.lib_deps} + + +; First prototype nrf52840/sx1262 device +[env:heltec-mesh-pocket-10000] +extends = nrf52840_base +board = heltec_mesh_pocket +debug_tool = jlink + +# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling. +build_flags = ${nrf52840_base.build_flags} -Ivariants/heltec_mesh_pocket + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -DHELTEC_MESH_POCKET + -DHELTEC_MESH_POCKET_BATTERY_10000 + -DUSE_EINK + -DEINK_DISPLAY_MODEL=GxEPD2_213_B74 + -DEINK_WIDTH=250 + -DEINK_HEIGHT=122 + -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -DEINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted + -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates + -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates +; -D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated + -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + -DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting" + -DEINK_HASQUIRK_WEAKFASTREFRESH ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight + +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_pocket> +lib_deps = + ${nrf52840_base.lib_deps} + lewisxhe/PCF8563_Library@^1.0.1 + https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d + + +[env:heltec-mesh-pocket-inkhud-10000] +extends = nrf52840_base, inkhud +board = heltec_mesh_pocket +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_pocket> ${inkhud.build_src_filter} +build_flags = + ${inkhud.build_flags} + ${nrf52840_base.build_flags} + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" + -I variants/heltec_mesh_pocket + -D HELTEC_MESH_POCKET + -D HELTEC_MESH_POCKET_BATTERY_10000 +lib_deps = + ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX + ${nrf52840_base.lib_deps} diff --git a/variants/heltec_mesh_pocket/variant.cpp b/variants/heltec_mesh_pocket/variant.cpp new file mode 100644 index 000000000..20ba5f2ae --- /dev/null +++ b/variants/heltec_mesh_pocket/variant.cpp @@ -0,0 +1,13 @@ +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +const uint32_t g_ADigitalPinMap[] = { + // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled + 0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + + // P1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; + + diff --git a/variants/heltec_mesh_pocket/variant.h b/variants/heltec_mesh_pocket/variant.h new file mode 100644 index 000000000..89f06f358 --- /dev/null +++ b/variants/heltec_mesh_pocket/variant.h @@ -0,0 +1,135 @@ +#ifndef _VARIANT_HELTEC_NRF_ +#define _VARIANT_HELTEC_NRF_ +/** Master clock frequency */ +#define VARIANT_MCK (64000000ul) + +#define USE_LFXO // Board uses 32khz crystal for LF + +/*---------------------------------------------------------------------------- + * Headers + *----------------------------------------------------------------------------*/ + +#include "WVariant.h" + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Number of pins defined in PinDescription array +#define PINS_COUNT (48) +#define NUM_DIGITAL_PINS (48) +#define NUM_ANALOG_INPUTS (1) +#define NUM_ANALOG_OUTPUTS (0) + +// LEDs +#define PIN_LED1 (13) // 13 red (confirmed on 1.0 board) +#define LED_RED PIN_LED1 +#define LED_BLUE PIN_LED1 +#define LED_GREEN PIN_LED1 +#define LED_BUILTIN LED_BLUE +#define LED_CONN LED_BLUE +#define LED_STATE_ON 0 // State when LED is lit + +/* + * Buttons + */ +#define PIN_BUTTON1 (32 + 10) +// #define PIN_BUTTON2 (0 + 18) // 0.18 is labeled on the board as RESET but we configure it in the bootloader as a regular +// GPIO + +/* +No longer populated on PCB +*/ +#define PIN_SERIAL2_RX (0 + 7) +#define PIN_SERIAL2_TX (0 + 8) +// #define PIN_SERIAL2_EN (0 + 17) + +/** + Wire Interfaces + */ +#define WIRE_INTERFACES_COUNT 1 + +#define PIN_WIRE_SDA (32+15) +#define PIN_WIRE_SCL (32+13) + +/* + * Lora radio + */ + +#define USE_SX1262 +#define SX126X_CS (0 + 26) // FIXME - we really should define LORA_CS instead +#define LORA_CS (0 + 26) +#define SX126X_DIO1 (0 + 16) +// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching +// #define SX1262_DIO3 (0 + 21) +// This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the +// main +// CPU? +#define SX126X_BUSY (0 + 15) +#define SX126X_RESET (0 + 12) +// Not really an E22 but TTGO seems to be trying to clone that +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +// Display (E-Ink) +#define PIN_EINK_CS 24 +#define PIN_EINK_BUSY 32+6 +#define PIN_EINK_DC 31 +#define PIN_EINK_RES 32+4 +#define PIN_EINK_SCLK 22 +#define PIN_EINK_MOSI 20 + + +#define PIN_SPI1_MISO -1 +#define PIN_SPI1_MOSI PIN_EINK_MOSI +#define PIN_SPI1_SCK PIN_EINK_SCLK + + +/* + * GPS pins + */ + +#define PIN_SERIAL1_RX 32+5 +#define PIN_SERIAL1_TX 32+7 + +/* + * SPI Interfaces + */ +#define SPI_INTERFACES_COUNT 2 + +// For LORA, spi 0 +#define PIN_SPI_MISO (32 + 9) +#define PIN_SPI_MOSI (0 + 5) +#define PIN_SPI_SCK (0 + 4) + +// #define PIN_PWR_EN (0 + 6) + +// To debug via the segger JLINK console rather than the CDC-ACM serial device +// #define USE_SEGGER + +// Battery +// The battery sense is hooked to pin A0 (4) +// it is defined in the anlaolgue pin section of this file +// and has 12 bit resolution + +#define ADC_CTRL 32+2 +#define ADC_CTRL_ENABLED HIGH +#define BATTERY_PIN 29 +#define ADC_RESOLUTION 14 + +#define BATTERY_SENSE_RESOLUTION_BITS 12 +#define BATTERY_SENSE_RESOLUTION 4096.0 +#undef AREF_VOLTAGE +#define AREF_VOLTAGE 3.0 +#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 +#define ADC_MULTIPLIER (4.90F) + +#undef HAS_GPS +#define HAS_GPS 0 +#define HAS_RTC 0 +#ifdef __cplusplus +} +#endif + + +#endif \ No newline at end of file From 4e30023a4bd9a010d2f2b34d103897278ff898b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 06:41:33 -0500 Subject: [PATCH 077/100] [create-pull-request] automated change (#6589) Co-authored-by: fifieldt <1287116+fifieldt@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/protobufs b/protobufs index 5a5ab103d..f9aa5cfd0 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 5a5ab103d2f6aa071fca29417475681a2cec5dcf +Subproject commit f9aa5cfd08cf14917fce54e5ebc0441b35ce32b3 diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index 191f9e121..46f9d8315 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -239,6 +239,8 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_HELTEC_SENSOR_HUB = 92, /* Reserved Fried Chicken ID for future use */ meshtastic_HardwareModel_RESERVED_FRIED_CHICKEN = 93, + /* Heltec Magnetic Power Bank with Meshtastic compatible */ + meshtastic_HardwareModel_HELTEC_MESH_POCKET = 94, /* ------------------------------------------------------------------------------------------------------------------------------------------ Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. ------------------------------------------------------------------------------------------------------------------------------------------ */ From ecd9f015d8f079a0170a06afdc1243655f5867db Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 06:41:52 -0500 Subject: [PATCH 078/100] chore(deps): update meshtastic-device-ui digest to da8fb5e (#6593) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index f22d92b2e..cb36e412e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -108,7 +108,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic-device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/3fde170dca16863218cec133e05c5f2fc8d6e59a.zip + https://github.com/meshtastic/device-ui/archive/da8fb5eaac7874c31508fad5252999ec82c02498.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From 040a34fca8cd0a9581d575c3bf344e8fd82ddf84 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 15 Apr 2025 10:50:24 -0500 Subject: [PATCH 079/100] Switch to actually maintained thingsboard pubsubclient (#5204) * Switch to actually maintained thingsboard pubsubclient * .0 * TBPubSubClient * SetBufferSize is split into Send and Receive. * Update TBPubSubClient to 2.11 * Update platformio.ini Co-authored-by: Austin * Re-add setBufferSize fix --------- Co-authored-by: Tom Fifield Co-authored-by: Austin --- platformio.ini | 4 ++-- src/mqtt/MQTT.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index cb36e412e..85505d63a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -93,8 +93,8 @@ build_src_filter = ${env.build_src_filter} - - Date: Wed, 16 Apr 2025 07:37:09 +1000 Subject: [PATCH 080/100] Trunk fixes for heltec mesh pocket. (#6588) https://github.com/meshtastic/firmware/pull/6533 was merged without running trunk. This patch fixes the newly introduced trunk errors. --- boards/heltec_mesh_pocket.json | 99 +++++++++---------- src/graphics/EInkDisplay2.cpp | 2 +- .../niche/Drivers/EInk/LCMEN2R13ECC1.cpp | 22 ++--- .../niche/Drivers/EInk/LCMEN2R13ECC1.h | 10 +- variants/heltec_mesh_pocket/nicheGraphics.h | 2 +- variants/heltec_mesh_pocket/variant.cpp | 2 - variants/heltec_mesh_pocket/variant.h | 27 +++-- 7 files changed, 79 insertions(+), 85 deletions(-) diff --git a/boards/heltec_mesh_pocket.json b/boards/heltec_mesh_pocket.json index a35387857..e078c860c 100644 --- a/boards/heltec_mesh_pocket.json +++ b/boards/heltec_mesh_pocket.json @@ -1,54 +1,53 @@ { - "build": { - "arduino": { - "ldscript": "nrf52840_s140_v6.ld" - }, - "core": "nRF5", - "cpu": "cortex-m4", - "extra_flags": "-DNRF52840_XXAA", - "f_cpu": "64000000L", - "hwids": [ - ["0x239A", "0x4405"], - ["0x239A", "0x0029"], - ["0x239A", "0x002A"] - ], - "usb_product": "HT-n5262", - "mcu": "nrf52840", - "variant": "heltec_mesh_pocket", - "variants_dir": "variants", - "bsp": { - "name": "adafruit" - }, - "softdevice": { - "sd_flags": "-DS140", - "sd_name": "s140", - "sd_version": "6.1.1", - "sd_fwid": "0x00B6" - }, - "bootloader": { - "settings_addr": "0xFF000" - } + "build": { + "arduino": { + "ldscript": "nrf52840_s140_v6.ld" }, - "connectivity": ["bluetooth"], - "debug": { - "jlink_device": "nRF52840_xxAA", - "onboard_tools": ["jlink"], - "svd_path": "nrf52840.svd", - "openocd_target": "nrf52840-mdk-rs" + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DNRF52840_XXAA", + "f_cpu": "64000000L", + "hwids": [ + ["0x239A", "0x4405"], + ["0x239A", "0x0029"], + ["0x239A", "0x002A"] + ], + "usb_product": "HT-n5262", + "mcu": "nrf52840", + "variant": "heltec_mesh_pocket", + "variants_dir": "variants", + "bsp": { + "name": "adafruit" }, - "frameworks": ["arduino"], - "name": "Heltec nrf (Adafruit BSP)", - "upload": { - "maximum_ram_size": 248832, - "maximum_size": 815104, - "speed": 115200, - "protocol": "nrfutil", - "protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"], - "use_1200bps_touch": true, - "require_upload_port": true, - "wait_for_upload_port": true + "softdevice": { + "sd_flags": "-DS140", + "sd_name": "s140", + "sd_version": "6.1.1", + "sd_fwid": "0x00B6" }, - "url": "https://heltec.org/project/meshpocket/", - "vendor": "Heltec" - } - \ No newline at end of file + "bootloader": { + "settings_addr": "0xFF000" + } + }, + "connectivity": ["bluetooth"], + "debug": { + "jlink_device": "nRF52840_xxAA", + "onboard_tools": ["jlink"], + "svd_path": "nrf52840.svd", + "openocd_target": "nrf52840-mdk-rs" + }, + "frameworks": ["arduino"], + "name": "Heltec nrf (Adafruit BSP)", + "upload": { + "maximum_ram_size": 248832, + "maximum_size": 815104, + "speed": 115200, + "protocol": "nrfutil", + "protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true + }, + "url": "https://heltec.org/project/meshpocket/", + "vendor": "Heltec" +} diff --git a/src/graphics/EInkDisplay2.cpp b/src/graphics/EInkDisplay2.cpp index 737fcc3f0..5a2749482 100644 --- a/src/graphics/EInkDisplay2.cpp +++ b/src/graphics/EInkDisplay2.cpp @@ -219,7 +219,7 @@ bool EInkDisplay::connect() } #elif defined(HELTEC_MESH_POCKET) { - spi1=&SPI1; + spi1 = &SPI1; spi1->begin(); // VExt already enabled in setup() // RTC GPIO hold disabled in setup() diff --git a/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.cpp b/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.cpp index 5e21c00f6..e9a663f80 100644 --- a/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.cpp +++ b/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.cpp @@ -23,16 +23,16 @@ void LCMEN2R13ECC1::configScanning() void LCMEN2R13ECC1::configWaveform() { switch (updateType) { - case FAST: - sendCommand(0x3C); // Border waveform: - sendData(0x85); - break; - - case FULL: - default: - // From OTP memory - break; - } + case FAST: + sendCommand(0x3C); // Border waveform: + sendData(0x85); + break; + + case FULL: + default: + // From OTP memory + break; + } } void LCMEN2R13ECC1::configUpdateSequence() @@ -65,4 +65,4 @@ void LCMEN2R13ECC1::detachFromUpdate() } } -#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file +#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS \ No newline at end of file diff --git a/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h b/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h index 7b0aed282..b78e3bcca 100644 --- a/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h +++ b/src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h @@ -28,13 +28,13 @@ class LCMEN2R13ECC1 : public SSD16XX static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST); public: - LCMEN2R13ECC1() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte + LCMEN2R13ECC1() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte protected: - virtual void configScanning() override; - virtual void configWaveform() override; - virtual void configUpdateSequence() override; - void detachFromUpdate() override; + virtual void configScanning() override; + virtual void configWaveform() override; + virtual void configUpdateSequence() override; + void detachFromUpdate() override; }; } // namespace NicheGraphics::Drivers diff --git a/variants/heltec_mesh_pocket/nicheGraphics.h b/variants/heltec_mesh_pocket/nicheGraphics.h index 352a9bc47..b697faa57 100644 --- a/variants/heltec_mesh_pocket/nicheGraphics.h +++ b/variants/heltec_mesh_pocket/nicheGraphics.h @@ -34,7 +34,7 @@ void setupNicheGraphics() // SPI // ----------------------------- - SPIClass *spi1=&SPI1; + SPIClass *spi1 = &SPI1; spi1->begin(); // Display is connected to SPI1 diff --git a/variants/heltec_mesh_pocket/variant.cpp b/variants/heltec_mesh_pocket/variant.cpp index 20ba5f2ae..bdded700b 100644 --- a/variants/heltec_mesh_pocket/variant.cpp +++ b/variants/heltec_mesh_pocket/variant.cpp @@ -9,5 +9,3 @@ const uint32_t g_ADigitalPinMap[] = { // P1 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}; - - diff --git a/variants/heltec_mesh_pocket/variant.h b/variants/heltec_mesh_pocket/variant.h index 89f06f358..79f47bd0e 100644 --- a/variants/heltec_mesh_pocket/variant.h +++ b/variants/heltec_mesh_pocket/variant.h @@ -49,16 +49,16 @@ No longer populated on PCB */ #define WIRE_INTERFACES_COUNT 1 -#define PIN_WIRE_SDA (32+15) -#define PIN_WIRE_SCL (32+13) +#define PIN_WIRE_SDA (32 + 15) +#define PIN_WIRE_SCL (32 + 13) /* * Lora radio */ #define USE_SX1262 -#define SX126X_CS (0 + 26) // FIXME - we really should define LORA_CS instead -#define LORA_CS (0 + 26) +#define SX126X_CS (0 + 26) // FIXME - we really should define LORA_CS instead +#define LORA_CS (0 + 26) #define SX126X_DIO1 (0 + 16) // Note DIO2 is attached internally to the module to an analog switch for TX/RX switching // #define SX1262_DIO3 (0 + 21) @@ -72,25 +72,23 @@ No longer populated on PCB #define SX126X_DIO3_TCXO_VOLTAGE 1.8 // Display (E-Ink) -#define PIN_EINK_CS 24 -#define PIN_EINK_BUSY 32+6 -#define PIN_EINK_DC 31 -#define PIN_EINK_RES 32+4 +#define PIN_EINK_CS 24 +#define PIN_EINK_BUSY 32 + 6 +#define PIN_EINK_DC 31 +#define PIN_EINK_RES 32 + 4 #define PIN_EINK_SCLK 22 #define PIN_EINK_MOSI 20 - #define PIN_SPI1_MISO -1 #define PIN_SPI1_MOSI PIN_EINK_MOSI #define PIN_SPI1_SCK PIN_EINK_SCLK - /* * GPS pins */ -#define PIN_SERIAL1_RX 32+5 -#define PIN_SERIAL1_TX 32+7 +#define PIN_SERIAL1_RX 32 + 5 +#define PIN_SERIAL1_TX 32 + 7 /* * SPI Interfaces @@ -112,7 +110,7 @@ No longer populated on PCB // it is defined in the anlaolgue pin section of this file // and has 12 bit resolution -#define ADC_CTRL 32+2 +#define ADC_CTRL 32 + 2 #define ADC_CTRL_ENABLED HIGH #define BATTERY_PIN 29 #define ADC_RESOLUTION 14 @@ -124,12 +122,11 @@ No longer populated on PCB #define VBAT_AR_INTERNAL AR_INTERNAL_3_0 #define ADC_MULTIPLIER (4.90F) -#undef HAS_GPS +#undef HAS_GPS #define HAS_GPS 0 #define HAS_RTC 0 #ifdef __cplusplus } #endif - #endif \ No newline at end of file From 7e8294dfad233e883c58005cff549812587145ff Mon Sep 17 00:00:00 2001 From: Kalle Lilja <15094562+ThatKalle@users.noreply.github.com> Date: Wed, 16 Apr 2025 00:57:21 +0200 Subject: [PATCH 081/100] FlatHub: bump metainfo.xml on release (#6578) * add bump_metainfo.py * bump org.meshtastic.meshtasticd.metainfo.xml on release * update bump-version job to trigger on published * use defusedxml.ElementTree parse * move bump_metainfo, use requirements.txt * add bin/bump_metainfo/requirements.txt to renovate * Switch to short version string * Bump version.properties to 2.6.6 * change version format * remove url * Add url back in * Update url format * manual add 2.6.6 * consolidate into one PR * update run steps * add ability to add date if missing * update pull request title * add comments * remove quote changes --------- Co-authored-by: Austin --- .github/workflows/release_channels.yml | 32 ++++++--- bin/bump_metainfo/bump_metainfo.py | 72 +++++++++++++++++++++ bin/bump_metainfo/requirements.txt | 1 + bin/org.meshtastic.meshtasticd.metainfo.xml | 10 ++- renovate.json | 3 + version.properties | 2 +- 6 files changed, 109 insertions(+), 11 deletions(-) create mode 100755 bin/bump_metainfo/bump_metainfo.py create mode 100644 bin/bump_metainfo/requirements.txt diff --git a/.github/workflows/release_channels.yml b/.github/workflows/release_channels.yml index 710e8e51d..eece12346 100644 --- a/.github/workflows/release_channels.yml +++ b/.github/workflows/release_channels.yml @@ -46,11 +46,14 @@ jobs: # Create a PR to bump version when a release is Published bump-version: - if: ${{ github.event.release.published }} + if: github.event.action == 'published' runs-on: ubuntu-latest permissions: pull-requests: write contents: write + defaults: + run: + shell: bash steps: - name: Checkout uses: actions/checkout@v4 @@ -63,29 +66,42 @@ jobs: - name: Get release version string run: | echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT id: version env: BUILD_LOCATION: local - name: Bump version.properties - run: >- - bin/bump_version.py + run: | + # Bump version.properties + chmod +x ./bin/bump_version.py + ./bin/bump_version.py - name: Ensure debian deps are installed - shell: bash run: | sudo apt-get update -y --fix-missing sudo apt-get install -y devscripts - name: Update debian changelog - run: >- - debian/ci_changelog.sh + run: | + # Update debian changelog + chmod +x ./debian/ci_changelog.sh + ./debian/ci_changelog.sh - - name: Create version.properties pull request + - name: Bump org.meshtastic.meshtasticd.metainfo.xml + run: | + # Bump org.meshtastic.meshtasticd.metainfo.xml + pip install -r bin/bump_metainfo/requirements.txt -q + chmod +x ./bin/bump_metainfo/bump_metainfo.py + ./bin/bump_metainfo/bump_metainfo.py --file bin/org.meshtastic.meshtasticd.metainfo.xml "${{ steps.version.outputs.short }}" + + - name: Create Bumps pull request uses: peter-evans/create-pull-request@v7 with: - title: Bump version.properties + title: Bump release version + commit-message: automated bumps add-paths: | version.properties debian/changelog + bin/org.meshtastic.meshtasticd.metainfo.xml diff --git a/bin/bump_metainfo/bump_metainfo.py b/bin/bump_metainfo/bump_metainfo.py new file mode 100755 index 000000000..290cbae79 --- /dev/null +++ b/bin/bump_metainfo/bump_metainfo.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +import argparse +import xml.etree.ElementTree as ET +from defusedxml.ElementTree import parse +from datetime import datetime, timezone + + +# Indent by 2 spaces to align with xml formatting. +def indent(elem, level=0): + i = "\n" + level * " " + if len(elem): + if not elem.text or not elem.text.strip(): + elem.text = i + " " + for child in elem: + indent(child, level + 1) + if not child.tail or not child.tail.strip(): + child.tail = i + if level and (not elem.tail or not elem.tail.strip()): + elem.tail = i + + +def main(): + parser = argparse.ArgumentParser( + description="Prepend new release entry to metainfo.xml file.") + parser.add_argument("--file", help="Path to the metainfo.xml file", + default="org.meshtastic.meshtasticd.metainfo.xml") + parser.add_argument("version", help="Version string (e.g. 2.6.4)") + parser.add_argument("--date", help="Release date (YYYY-MM-DD), defaults to today", + default=datetime.now(timezone.utc).date().isoformat()) + + args = parser.parse_args() + + tree = parse(args.file) + root = tree.getroot() + + releases = root.find('releases') + if releases is None: + raise RuntimeError(" element not found in XML.") + + existing_versions = { + release.get('version'): release + for release in releases.findall('release') + } + existing_release = existing_versions.get(args.version) + + if existing_release is not None: + if not existing_release.get('date'): + print(f"Version {args.version} found without date. Adding date...") + existing_release.set('date', args.date) + else: + print( + f"Version {args.version} is already present with date, skipping insertion.") + else: + new_release = ET.Element('release', { + 'version': args.version, + 'date': args.date + }) + url = ET.SubElement(new_release, 'url', {'type': 'details'}) + url.text = f"https://github.com/meshtastic/firmware/releases?q=tag%3Av{args.version}" + + releases.insert(0, new_release) + + indent(releases, level=1) + releases.tail = "\n" + + print(f"Inserted new release: {args.version}") + + tree.write(args.file, encoding='UTF-8', xml_declaration=True) + + +if __name__ == "__main__": + main() diff --git a/bin/bump_metainfo/requirements.txt b/bin/bump_metainfo/requirements.txt new file mode 100644 index 000000000..09dd20d24 --- /dev/null +++ b/bin/bump_metainfo/requirements.txt @@ -0,0 +1 @@ +defusedxml==0.7.1 diff --git a/bin/org.meshtastic.meshtasticd.metainfo.xml b/bin/org.meshtastic.meshtasticd.metainfo.xml index a9e6cbdf5..cb921fcb3 100644 --- a/bin/org.meshtastic.meshtasticd.metainfo.xml +++ b/bin/org.meshtastic.meshtasticd.metainfo.xml @@ -87,8 +87,14 @@ - - https://github.com/meshtastic/firmware/releases/tag/v2.6.4.b89355f + + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.6 + + + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.5 + + + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.4 \ No newline at end of file diff --git a/renovate.json b/renovate.json index bf6ffdd4b..11d35aff8 100644 --- a/renovate.json +++ b/renovate.json @@ -13,6 +13,9 @@ "git-submodules": { "enabled": true }, + "pip_requirements": { + "fileMatch": ["bin/bump_metainfo/requirements.txt"] + }, "commitMessageTopic": "{{depName}}", "labels": ["dependencies"], "customDatasources": { diff --git a/version.properties b/version.properties index 0b46aeec6..8f5953fdc 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 6 -build = 5 +build = 6 From cf5c8de92e21acf7b5814225b225ceac7d87553b Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Wed, 16 Apr 2025 13:33:44 +1200 Subject: [PATCH 082/100] Fix spurious button presses on some T-Echos (#6590) Co-authored-by: Ben Meadors --- src/graphics/niche/Inputs/TwoButton.cpp | 2 +- src/mesh/RadioLibInterface.cpp | 8 ++++++++ src/mesh/RadioLibInterface.h | 5 +++++ variants/t-echo/nicheGraphics.h | 19 +++++++++++++++++-- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/graphics/niche/Inputs/TwoButton.cpp b/src/graphics/niche/Inputs/TwoButton.cpp index 1e91d9080..bd29f981d 100644 --- a/src/graphics/niche/Inputs/TwoButton.cpp +++ b/src/graphics/niche/Inputs/TwoButton.cpp @@ -181,7 +181,7 @@ void TwoButton::isrSecondary() void TwoButton::startThread() { if (!OSThread::enabled) { - OSThread::setInterval(50); + OSThread::setInterval(10); OSThread::enabled = true; } } diff --git a/src/mesh/RadioLibInterface.cpp b/src/mesh/RadioLibInterface.cpp index a6faebff4..e3ef58f14 100644 --- a/src/mesh/RadioLibInterface.cpp +++ b/src/mesh/RadioLibInterface.cpp @@ -210,6 +210,14 @@ bool RadioLibInterface::canSleep() return res; } +/** Allow other firmware components to ask whether we are currently sending a packet +Initially implemented to protect T-Echo's capacitive touch button from spurious presses during tx +*/ +bool RadioLibInterface::isSending() +{ + return sendingPacket != NULL; +} + /** Attempt to cancel a previously sent packet. Returns true if a packet was found we could cancel */ bool RadioLibInterface::cancelSending(NodeNum from, PacketId id) { diff --git a/src/mesh/RadioLibInterface.h b/src/mesh/RadioLibInterface.h index b24879eaf..9622bd625 100644 --- a/src/mesh/RadioLibInterface.h +++ b/src/mesh/RadioLibInterface.h @@ -132,6 +132,11 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified */ virtual bool isActivelyReceiving() = 0; + /** Are we are currently sending a packet? + * This method is public, intending to expose this information to other firmware components + */ + virtual bool isSending(); + /** Attempt to cancel a previously sent packet. Returns true if a packet was found we could cancel */ virtual bool cancelSending(NodeNum from, PacketId id) override; diff --git a/variants/t-echo/nicheGraphics.h b/variants/t-echo/nicheGraphics.h index 5862dcdfb..af310db25 100644 --- a/variants/t-echo/nicheGraphics.h +++ b/variants/t-echo/nicheGraphics.h @@ -29,6 +29,12 @@ #include "graphics/niche/Fonts/FreeSans6pt8bCyrillic.h" #include +// Special case - fix T-Echo's touch button +// ---------------------------------------- +// On a handful of T-Echos, LoRa TX triggers the capacitive touch +// To avoid this, we lockout the button during TX +#include "mesh/RadioLibInterface.h" + void setupNicheGraphics() { using namespace NicheGraphics; @@ -115,13 +121,22 @@ void setupNicheGraphics() buttons->setWiring(TOUCH_BUTTON, PIN_BUTTON_TOUCH); buttons->setTiming(TOUCH_BUTTON, 50, 5000); // 5 seconds before latch - limited by T-Echo's capacitive touch IC buttons->setHandlerDown(TOUCH_BUTTON, [backlight]() { + // Discard the button press if radio is active + // Rare hardware fault: LoRa activity triggers touch button + if (!RadioLibInterface::instance || RadioLibInterface::instance->isSending()) + return; + + // Backlight on (while held) backlight->peek(); - InkHUD::InkHUD::getInstance()->persistence->settings.optionalMenuItems.backlight = - false; // We've proved user still has the button. No need to make backlight togglable via the menu. + + // Handler has run, which confirms touch button wasn't removed as part of DIY build. + // No longer need the fallback backlight toggle in menu. + InkHUD::InkHUD::getInstance()->persistence->settings.optionalMenuItems.backlight = false; }); buttons->setHandlerLongPress(TOUCH_BUTTON, [backlight]() { backlight->latch(); }); buttons->setHandlerShortPress(TOUCH_BUTTON, [backlight]() { backlight->off(); }); + // Begin handling button events buttons->start(); } From 1138f74e2c025852534cd529248de45e6a6347ac Mon Sep 17 00:00:00 2001 From: Niklas <44636701+MayNiklas@users.noreply.github.com> Date: Wed, 16 Apr 2025 03:39:13 +0200 Subject: [PATCH 083/100] fix: set upload_speed for tlora_v1_3 & tlora_v2_1_16 (#6595) --- variants/tlora_v1_3/platformio.ini | 3 ++- variants/tlora_v2_1_16/platformio.ini | 3 ++- variants/tlora_v2_1_16_tcxo/platformio.ini | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/variants/tlora_v1_3/platformio.ini b/variants/tlora_v1_3/platformio.ini index 99df28e56..c5eca589f 100644 --- a/variants/tlora_v1_3/platformio.ini +++ b/variants/tlora_v1_3/platformio.ini @@ -3,4 +3,5 @@ board_level = extra extends = esp32_base board = ttgo-lora32-v1 build_flags = - ${esp32_base.build_flags} -D TLORA_V1_3 -I variants/tlora_v1_3 \ No newline at end of file + ${esp32_base.build_flags} -D TLORA_V1_3 -I variants/tlora_v1_3 +upload_speed = 115200 \ No newline at end of file diff --git a/variants/tlora_v2_1_16/platformio.ini b/variants/tlora_v2_1_16/platformio.ini index 351f71676..4253cc6af 100644 --- a/variants/tlora_v2_1_16/platformio.ini +++ b/variants/tlora_v2_1_16/platformio.ini @@ -4,4 +4,5 @@ board = ttgo-lora32-v21 board_check = true build_flags = ${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/tlora_v2_1_16 - -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. \ No newline at end of file + -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. +upload_speed = 115200 \ No newline at end of file diff --git a/variants/tlora_v2_1_16_tcxo/platformio.ini b/variants/tlora_v2_1_16_tcxo/platformio.ini index 538fd81b0..5c7cb7eb3 100644 --- a/variants/tlora_v2_1_16_tcxo/platformio.ini +++ b/variants/tlora_v2_1_16_tcxo/platformio.ini @@ -7,4 +7,5 @@ build_flags = -D TLORA_V2_1_16 -I variants/tlora_v2_1_16 -D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. - -D LORA_TCXO_GPIO=33 \ No newline at end of file + -D LORA_TCXO_GPIO=33 +upload_speed = 115200 \ No newline at end of file From 447703197174d38e5326cdd70e3edaa0276bb82a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 09:46:06 +0200 Subject: [PATCH 084/100] [create-pull-request] automated change (#6599) --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/protobufs b/protobufs index f9aa5cfd0..b982b36df 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit f9aa5cfd08cf14917fce54e5ebc0441b35ce32b3 +Subproject commit b982b36dfab2e96b8f8be90af891c68ebf8790c2 diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index 46f9d8315..36bded9b2 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -241,6 +241,8 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_RESERVED_FRIED_CHICKEN = 93, /* Heltec Magnetic Power Bank with Meshtastic compatible */ meshtastic_HardwareModel_HELTEC_MESH_POCKET = 94, + /* Seeed Solar Node */ + meshtastic_HardwareModel_SEEED_SOLAR_NODE = 95, /* ------------------------------------------------------------------------------------------------------------------------------------------ Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. ------------------------------------------------------------------------------------------------------------------------------------------ */ From 64c8bde04a222aea6694d40897b3f5db996ce4bf Mon Sep 17 00:00:00 2001 From: Benjamin Kyd Date: Wed, 16 Apr 2025 09:12:23 +0100 Subject: [PATCH 085/100] Update platformio.ini to exclude unused modules from t1000-e (#6584) * Update platformio.ini to exclude unused modules * Add No EXT GPIO flag and also correct some exclusions in main * CANNEDMSG != CANNEDMESSAGES * Remove NO_EXT_GPIO --- src/main.cpp | 8 ++++---- variants/tracker-t1000-e/platformio.ini | 6 +++++- variants/tracker-t1000-e/variant.h | 4 +++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bfbd73a43..535a7afa1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1310,7 +1310,7 @@ extern meshtastic_DeviceMetadata getDeviceMetadata() deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AUDIO_CONFIG; #endif // Option to explicitly include canned messages for edge cases, e.g. niche graphics -#if (!HAS_SCREEN && NO_EXT_GPIO) && !MESHTASTIC_INCLUDE_CANNEDMSG +#if (!HAS_SCREEN || NO_EXT_GPIO) || MESHTASTIC_EXCLUDE_CANNEDMESSAGES deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_CANNEDMSG_CONFIG; #endif #if NO_EXT_GPIO @@ -1318,11 +1318,11 @@ extern meshtastic_DeviceMetadata getDeviceMetadata() #endif // Only edge case here is if we apply this a device with built in Accelerometer and want to detect interrupts // We'll have to macro guard against those targets potentially -#if NO_EXT_GPIO +#if NO_EXT_GPIO || MESHTASTIC_EXCLUDE_DETECTIONSENSOR deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_DETECTIONSENSOR_CONFIG; #endif -// If we don't have any GPIO and we don't have GPS, no purpose in having serial config -#if NO_EXT_GPIO && NO_GPS +// If we don't have any GPIO and we don't have GPS OR we don't want too - no purpose in having serial config +#if NO_EXT_GPIO && NO_GPS || MESHTASTIC_EXCLUDE_SERIAL deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_SERIAL_CONFIG; #endif #ifndef ARCH_ESP32 diff --git a/variants/tracker-t1000-e/platformio.ini b/variants/tracker-t1000-e/platformio.ini index 8c3c97e6c..64da61434 100644 --- a/variants/tracker-t1000-e/platformio.ini +++ b/variants/tracker-t1000-e/platformio.ini @@ -5,6 +5,10 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/tracker-t1000-e -Isrc/plat -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" -DGPS_POWER_TOGGLE -DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL=1 + -DMESHTASTIC_EXCLUDE_CANNEDMESSAGES=1 + -DMESHTASTIC_EXCLUDE_SCREEN=1 + -DMESHTASTIC_EXCLUDE_DETECTIONSENSOR=1 + -DMESHTASTIC_EXCLUDE_WIFI=1 board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld build_src_filter = ${nrf52_base.build_src_filter} +<../variants/tracker-t1000-e> lib_deps = @@ -12,4 +16,4 @@ lib_deps = https://github.com/meshtastic/QMA6100P_Arduino_Library/archive/14c900b8b2e4feaac5007a7e41e0c1b7f0841136.zip debug_tool = jlink ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) -upload_protocol = nrfutil \ No newline at end of file +upload_protocol = nrfutil diff --git a/variants/tracker-t1000-e/variant.h b/variants/tracker-t1000-e/variant.h index 0d98a3033..81b4ef3fb 100644 --- a/variants/tracker-t1000-e/variant.h +++ b/variants/tracker-t1000-e/variant.h @@ -152,6 +152,8 @@ extern "C" { #define T1000X_NTC_PIN (0 + 31) // P0.31/AIN7 #define T1000X_LUX_PIN (0 + 29) // P0.29/AIN5 +#define HAS_SCREEN 0 + #ifdef __cplusplus } #endif @@ -160,4 +162,4 @@ extern "C" { * Arduino objects - C++ only *----------------------------------------------------------------------------*/ -#endif // _VARIANT_TRACKER_T1000_E_ \ No newline at end of file +#endif // _VARIANT_TRACKER_T1000_E_ From e5cd0d613cc2cdf643e162cda80aa9d24af3b4f8 Mon Sep 17 00:00:00 2001 From: "Aaron.Lee" <32860565+Heltec-Aaron-Lee@users.noreply.github.com> Date: Wed, 16 Apr 2025 17:20:12 +0800 Subject: [PATCH 086/100] Make startup screen show the short ID (#6591) * Update the short ID show on the boot up screen function --- .../InkHUD/Applets/System/Logo/LogoApplet.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.cpp b/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.cpp index 520b3ef65..89bdb0bc7 100644 --- a/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.cpp +++ b/src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.cpp @@ -11,10 +11,19 @@ InkHUD::LogoApplet::LogoApplet() : concurrency::OSThread("LogoApplet") OSThread::setIntervalFromNow(8 * 1000UL); OSThread::enabled = true; - textLeft = ""; - textRight = ""; - textTitle = xstr(APP_VERSION_SHORT); - fontTitle = fontSmall; + // During onboarding, show the default short name as well as the version string + // This behavior assists manufacturers during mass production, and should not be modified without good reason + if (!settings->tips.safeShutdownSeen) { + fontTitle = fontLarge; + textLeft = xstr(APP_VERSION_SHORT); + textRight = owner.short_name; + textTitle = "Meshtastic"; + } else { + fontTitle = fontSmall; + textLeft = ""; + textRight = ""; + textTitle = xstr(APP_VERSION_SHORT); + } bringToForeground(); // This is then drawn with a FULL refresh by Renderer::begin From 5699d8632ef27d527e6907735208cbdec51d1de2 Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 16 Apr 2025 05:21:31 -0400 Subject: [PATCH 087/100] Debian: use native-tft compile target (#6580) --- debian/ci_pack_sdeb.sh | 4 ++-- debian/control | 5 ++++- debian/meshtasticd.install | 10 +++++----- debian/rules | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index c0cea0010..81e681e0c 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -5,8 +5,8 @@ export PLATFORMIO_PACKAGES_DIR=pio/packages export PLATFORMIO_CORE_DIR=pio/core # Download libraries to `pio` -platformio pkg install -e native -platformio pkg install -e native -t platformio/tool-scons@4.40502.0 +platformio pkg install -e native-tft +platformio pkg install -e native-tft -t platformio/tool-scons@4.40502.0 # Compress `pio` directory to prevent dh_clean from sanitizing it tar -cf pio.tar pio/ rm -rf pio diff --git a/debian/control b/debian/control index 693cd6aa5..9277f6f54 100644 --- a/debian/control +++ b/debian/control @@ -21,7 +21,10 @@ Build-Depends: debhelper-compat (= 13), openssl, libssl-dev, libulfius-dev, - liborcania-dev + liborcania-dev, + libx11-dev, + libinput-dev, + libxkbcommon-x11-dev Standards-Version: 4.6.2 Homepage: https://github.com/meshtastic/firmware Rules-Requires-Root: no diff --git a/debian/meshtasticd.install b/debian/meshtasticd.install index da1b0685d..6b6b5a361 100644 --- a/debian/meshtasticd.install +++ b/debian/meshtasticd.install @@ -1,8 +1,8 @@ -.pio/build/native/meshtasticd usr/sbin +.pio/build/native-tft/meshtasticd usr/sbin -bin/config.yaml etc/meshtasticd -bin/config.d/* etc/meshtasticd/available.d +bin/config.yaml etc/meshtasticd +bin/config.d/* etc/meshtasticd/available.d -bin/meshtasticd.service lib/systemd/system +bin/meshtasticd.service lib/systemd/system -web/* usr/share/meshtasticd/web \ No newline at end of file +web/* usr/share/meshtasticd/web \ No newline at end of file diff --git a/debian/rules b/debian/rules index 0612ba352..0b5d1ac57 100755 --- a/debian/rules +++ b/debian/rules @@ -26,7 +26,7 @@ override_dh_auto_build: mkdir -p web && tar -xf web.tar -C web gunzip web/ -r # Build with platformio - $(PIO_ENV) platformio run -e native + $(PIO_ENV) platformio run -e native-tft # Move the binary and default config to the correct name - mv .pio/build/native/program .pio/build/native/meshtasticd + mv .pio/build/native-tft/program .pio/build/native-tft/meshtasticd cp bin/config-dist.yaml bin/config.yaml From 4a9a59342a3f6227fb8f48807314e1bbb2b6f650 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Wed, 16 Apr 2025 11:23:52 +0200 Subject: [PATCH 088/100] Create lora-piggystick-lr1121.yaml (#6600) --- bin/config.d/lora-piggystick-lr1121.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bin/config.d/lora-piggystick-lr1121.yaml diff --git a/bin/config.d/lora-piggystick-lr1121.yaml b/bin/config.d/lora-piggystick-lr1121.yaml new file mode 100644 index 000000000..348db61b1 --- /dev/null +++ b/bin/config.d/lora-piggystick-lr1121.yaml @@ -0,0 +1,11 @@ +Lora: + Module: lr1121 + CS: 0 + IRQ: 6 + Reset: 2 + Busy: 4 + spidev: ch341 + DIO3_TCXO_VOLTAGE: 1.8 +# USB_Serialnum: 12345678 + USB_PID: 0x5512 + USB_VID: 0x1A86 From e0dafc3618ae8ce6c115caafdd7a1f68fdb94df6 Mon Sep 17 00:00:00 2001 From: Niklas <44636701+MayNiklas@users.noreply.github.com> Date: Wed, 16 Apr 2025 13:15:16 +0200 Subject: [PATCH 089/100] fix: set upload_speed for tlora_v1 (#6601) --- variants/tlora_v1/platformio.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/variants/tlora_v1/platformio.ini b/variants/tlora_v1/platformio.ini index 65ec4bcdc..17fc71d72 100644 --- a/variants/tlora_v1/platformio.ini +++ b/variants/tlora_v1/platformio.ini @@ -3,4 +3,5 @@ board_level = extra extends = esp32_base board = ttgo-lora32-v1 build_flags = - ${esp32_base.build_flags} -D TLORA_V1 -I variants/tlora_v1 \ No newline at end of file + ${esp32_base.build_flags} -D TLORA_V1 -I variants/tlora_v1 +upload_speed = 115200 \ No newline at end of file From 816d948ee53d9125001945963a5cd9fe800ae980 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 06:15:33 -0500 Subject: [PATCH 090/100] Upgrade trunk (#6592) Co-authored-by: sachaw <11172820+sachaw@users.noreply.github.com> --- .trunk/trunk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 01e8f8d1b..60e422312 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -8,7 +8,7 @@ plugins: uri: https://github.com/trunk-io/plugins lint: enabled: - - renovate@39.238.1 + - renovate@39.243.0 - prettier@3.5.3 - trufflehog@3.88.23 - yamllint@1.37.0 @@ -28,7 +28,7 @@ lint: - shellcheck@0.10.0 - black@25.1.0 - git-diff-check - - gitleaks@8.24.2 + - gitleaks@8.24.3 - clang-format@16.0.3 ignore: - linters: [ALL] From 5fd64d41143c3ef33d1f5e584f6964e39b806ac4 Mon Sep 17 00:00:00 2001 From: Benjamin Kyd Date: Wed, 16 Apr 2025 20:42:08 +0100 Subject: [PATCH 091/100] Fix uninitialised memory read (adminModule) (#6605) --- src/graphics/Screen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 8075dd468..9afd88c76 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1796,7 +1796,9 @@ void Screen::setup() powerStatusObserver.observe(&powerStatus->onNewStatus); gpsStatusObserver.observe(&gpsStatus->onNewStatus); nodeStatusObserver.observe(&nodeStatus->onNewStatus); +#if !MESHTASTIC_EXCLUDE_ADMIN adminMessageObserver.observe(adminModule); +#endif if (textMessageModule) textMessageObserver.observe(textMessageModule); if (inputBroker) @@ -2857,4 +2859,4 @@ int Screen::handleAdminMessage(const meshtastic_AdminMessage *arg) } // namespace graphics #else graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {} -#endif // HAS_SCREEN \ No newline at end of file +#endif // HAS_SCREEN From d74359abf0d07d66b893f1e1366f7d5dd21364ee Mon Sep 17 00:00:00 2001 From: dylanli Date: Thu, 17 Apr 2025 14:11:17 +0800 Subject: [PATCH 092/100] add support for Seeed solar panel (#6597) * add seeed_solar_node * fix RF_SW problem * fix IIC problem * Update Button redefination * Add on-board flash pin defination * fix missing a ',' * update seeed sorlar panel defination * fix word spell * fix upstream change * fix upstream change * fix upstream change * fix formate * Restore the FLASH definition that was deleted by mistake and pull down the CS pin to ensure low power consumption * fix led defination conflict * Delete lib/device-ui directory * Restore protobufs submodule --------- Co-authored-by: WayenWeng --- boards/Seeed_Solar_Node.json | 54 ++++++++ src/platform/nrf52/architecture.h | 4 +- variants/Seeed_Solar_Node/platformio.ini | 14 ++ variants/Seeed_Solar_Node/variant.cpp | 108 ++++++++++++++++ variants/Seeed_Solar_Node/variant.h | 157 +++++++++++++++++++++++ 5 files changed, 336 insertions(+), 1 deletion(-) create mode 100644 boards/Seeed_Solar_Node.json create mode 100644 variants/Seeed_Solar_Node/platformio.ini create mode 100644 variants/Seeed_Solar_Node/variant.cpp create mode 100644 variants/Seeed_Solar_Node/variant.h diff --git a/boards/Seeed_Solar_Node.json b/boards/Seeed_Solar_Node.json new file mode 100644 index 000000000..e1b502cfa --- /dev/null +++ b/boards/Seeed_Solar_Node.json @@ -0,0 +1,54 @@ +{ + "build": { + "arduino": { + "ldscript": "nrf52840_s140_v7.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA", + "f_cpu": "64000000L", + "hwids": [["0x2886", "0x0059"]], + "usb_product": "XIAO-BOOT", + "mcu": "nrf52840", + "variant": "Seeed_Solar_Node", + "bsp": { + "name": "adafruit" + }, + "softdevice": { + "sd_flags": "-DS140", + "sd_name": "s140", + "sd_version": "7.3.0", + "sd_fwid": "0x0123" + }, + "bootloader": { + "settings_addr": "0xFF000" + } + }, + "connectivity": ["bluetooth"], + "debug": { + "jlink_device": "nRF52840_xxAA", + "svd_path": "nrf52840.svd", + "openocd_target": "nrf52840-mdk-rs" + }, + "frameworks": ["arduino"], + "name": "Seeed_Solar_Node", + "upload": { + "maximum_ram_size": 248832, + "maximum_size": 815104, + "speed": 115200, + "protocol": "nrfutil", + "protocols": [ + "jlink", + "nrfjprog", + "nrfutil", + "stlink", + "cmsis-dap", + "blackmagic" + ], + "use_1200bps_touch": true, + "require_upload_port": true, + "wait_for_upload_port": true + }, + "url": "https://www.seeedstudio.com/Seeed-XIAO-BLE-Sense-nRF52840-p-5253.html", + "vendor": "Seeed Studio" +} diff --git a/src/platform/nrf52/architecture.h b/src/platform/nrf52/architecture.h index 21296c3fc..9d1d48f1c 100644 --- a/src/platform/nrf52/architecture.h +++ b/src/platform/nrf52/architecture.h @@ -81,6 +81,8 @@ #define HW_VENDOR meshtastic_HardwareModel_MESHLINK #elif defined(SEEED_XIAO_NRF52840_KIT) #define HW_VENDOR meshtastic_HardwareModel_XIAO_NRF52_KIT +#elif defined(SEEED_SOLAR_NODE) +#define HW_VENDOR meshtastic_HardwareModel_SEEED_SOLAR_NODE #elif defined(HELTEC_MESH_POCKET) #define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_POCKET #else @@ -135,4 +137,4 @@ #if !defined(PIN_SERIAL_RX) && !defined(NRF52840_XXAA) // No serial ports on this board - ONLY use segger in memory console #define USE_SEGGER -#endif +#endif \ No newline at end of file diff --git a/variants/Seeed_Solar_Node/platformio.ini b/variants/Seeed_Solar_Node/platformio.ini new file mode 100644 index 000000000..9651d3a77 --- /dev/null +++ b/variants/Seeed_Solar_Node/platformio.ini @@ -0,0 +1,14 @@ +[env:Seeed_Solar_Node] +board = Seeed_Solar_Node +extends = nrf52840_base +;board_level = extra +build_flags = ${nrf52840_base.build_flags} + -I $PROJECT_DIR/variants/Seeed_Solar_Node + -D SEEED_SOLAR_NODE + -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 + -L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard" +board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld +build_src_filter = ${nrf52_base.build_src_filter} +<../variants/Seeed_Solar_Node> +lib_deps = + ${nrf52840_base.lib_deps} +debug_tool = jlink diff --git a/variants/Seeed_Solar_Node/variant.cpp b/variants/Seeed_Solar_Node/variant.cpp new file mode 100644 index 000000000..994e97ff9 --- /dev/null +++ b/variants/Seeed_Solar_Node/variant.cpp @@ -0,0 +1,108 @@ +/* + * variant.cpp - Digital pin mapping for nRF52-based development board + * + * This file defines the pin mapping array that maps logical digital pins (D0-D17) + * to physical GPIO ports/pins on the Nordic nRF52 series microcontroller. + * + * Board: [Seeed Studio XIAO nRF52840 Sense (Seeed Solar Node)] + * Hardware Features: + * - LoRa module (CS/SCK/MISO/MOSI control pins) + * - GNSS module (TX/RX/Reset/Wakeup) + * - User LEDs (D11-D12) + * - User button (D13) + * - Grove/NFC interface (D14-D15) + * - Battery voltage monitoring (D16) + * + * Created [20250225] + * By [Dylan] + * Version 1.0 + * License: [MIT] + */ + +#include "variant.h" +#include "nrf.h" +#include "wiring_constants.h" +#include "wiring_digital.h" + +/** + * @brief Digital pin to GPIO port/pin mapping table + * + * Format: Logical Pin (Dx) -> nRF Port.Pin (Px.xx) + * + * Pin Groupings: + * [D0-D10] - Peripheral control (LoRa, GNSS) + * [D11-D12] - LED outputs + * [D13] - User button + * [D14-D15] - Grove/NFC interface + * [D16] - Battery voltage ADC input + * [D17] - GNSS module reset + */ + +extern "C" { +const uint32_t g_ADigitalPinMap[] = { + // D0 .. D10 - Peripheral control pins + 2, // D0 P0.02 (A0) GNSS_WAKEUP + 3, // D1 P0.03 (A1) LORA_DIO1 + 28, // D2 P0.28 (A2) LORA_RESET + 29, // D3 P0.29 (A3) LORA_BUSY + 4, // D4 P0.04 (A4/SDA) LORA_CS + 5, // D5 P0.05 (A5/SCL) LORA_SW + 43, // D6 P1.11 (UART_TX) GNSS_TX + 44, // D7 P1.12 (UART_RX) GNSS_RX + 45, // D8 P1.13 (SPI_SCK) LORA_SCK + 46, // D9 P1.14 (SPI_MISO) LORA_MISO + 47, // D10 P1.15 (SPI_MOSI) LORA_MOSI + + // D11-D12 - LED outputs + 15, // D11 P0.15 User LED + 19, // D12 P0.19 Breathing LED + + // D13 - User input + 33, // D13 P1.01 User Button + + // D14-D15 - Grove/NFC interface + 9, // D14 P0.09 NFC1/GROVE_D1 + 10, // D15 P0.10 NFC2/GROVE_D0 + + // D16 - Power management + // 31, // D16 P0.31 VBAT_ADC (Battery voltage) + 31, // D16 P0.31 VBAT_ADC (Battery voltage) + // D17 - GNSS control + 35, // D17 P1.03 GNSS_RESET + + 37, // D18 P1.05 GNSS_ENABLE + 14, // D19 P0.14 BAT_READ + 39, // D20 P1.07 USER_BUTTON + + // + 21, // D21 P0.21 (QSPI_SCK) + 25, // D22 P0.25 (QSPI_CSN) + 20, // D23 P0.20 (QSPI_SIO_0 DI) + 24, // D24 P0.24 (QSPI_SIO_1 DO) + 22, // D25 P0.22 (QSPI_SIO_2 WP) + 23, // D26 P0.23 (QSPI_SIO_3 HOLD) +}; +} + +void initVariant() +{ + pinMode(PIN_QSPI_CS, OUTPUT); + digitalWrite(PIN_QSPI_CS, HIGH); + // This setup is crucial for ensuring low power consumption and proper initialization of the hardware components. + pinMode(GPS_EN, OUTPUT); + digitalWrite(GPS_EN, LOW); + + // VBAT_ENABLE + pinMode(BAT_READ, OUTPUT); + digitalWrite(BAT_READ, LOW); + + pinMode(PIN_LED1, OUTPUT); + digitalWrite(PIN_LED1, LOW); + pinMode(PIN_LED2, OUTPUT); + digitalWrite(PIN_LED2, LOW); + pinMode(PIN_LED2, OUTPUT); + // digitalWrite(LED_PIN, LOW); + + pinMode(GPS_EN, OUTPUT); + digitalWrite(GPS_EN, HIGH); +} \ No newline at end of file diff --git a/variants/Seeed_Solar_Node/variant.h b/variants/Seeed_Solar_Node/variant.h new file mode 100644 index 000000000..86682302b --- /dev/null +++ b/variants/Seeed_Solar_Node/variant.h @@ -0,0 +1,157 @@ +#ifndef _SEEED_SOLAR_NODE_H_ +#define _SEEED_SOLAR_NODE_H_ +#include "WVariant.h" +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// Clock Configuration +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +#define VARIANT_MCK (64000000ul) // Master clock frequency +#define USE_LFXO // 32.768kHz crystal for LFCLK + +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// Pin Capacity Definitions +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +#define PINS_COUNT (33u) // Total GPIO pins +#define NUM_DIGITAL_PINS (33u) // Digital I/O pins +#define NUM_ANALOG_INPUTS (8u) // Analog inputs (A0-A5 + VBAT + AREF) +#define NUM_ANALOG_OUTPUTS (0u) + +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// LED Configuration +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// LEDs +// LEDs +#define PIN_LED1 (11) // LED P1.15 +#define PIN_LED2 (12) // + +#define LED_BUILTIN PIN_LED1 +#define LED_CONN PIN_LED2 + +#define LED_GREEN PIN_LED1 +#define LED_BLUE PIN_LED2 +// #define LED_PIN PIN_LED2 +#define LED_STATE_ON 1 // State when LED is litted +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// Button Configuration +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +#define BUTTON_PIN D13 // This is the Program Button +// #define BUTTON_NEED_PULLUP 1 +#define BUTTON_ACTIVE_LOW true +#define BUTTON_ACTIVE_PULLUP false + +#define BUTTON_PIN_TOUCH 20 // Touch button +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// Digital Pin Mapping (D0-D10) +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +#define D0 0 // P0.02 GNSS_WAKEUP/IO0 +#define D1 1 // P0.03 LORA_DIO1 +#define D2 2 // P0.28 LORA_RESET +#define D3 3 // P0.29 LORA_BUSY +#define D4 4 // P0.04 LORA_CS/I2C_SDA +#define D5 5 // P0.05 LORA_SW/I2C_SCL +#define D6 6 // P1.11 GNSS_TX +#define D7 7 // P1.12 GNSS_RX +#define D8 8 // P1.13 SPI_SCK +#define D9 9 // P1.14 SPI_MISO +#define D10 10 // P1.15 SPI_MOSI +#define D13 13 // P1.01 User Button +#define D14 14 // P0.09 NFC1/GROVE_D1 +#define D15 15 // P0.10 NFC2/GROVE_D0 +#define D16 16 // P0.31 VBAT_ADC (Battery voltage) +#define D17 17 // P1.03 GNSS_RESET +#define D18 18 // P1.05 GNSS_ENABLE +#define D19 19 // P0.14 BAT_READ +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// Analog Pin Definitions +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +#define PIN_A0 0 // P0.02 Analog Input 0 +#define PIN_A1 1 // P0.03 Analog Input 1 +#define PIN_A2 2 // P0.28 Analog Input 2 +#define PIN_A3 3 // P0.29 Analog Input 3 +#define PIN_A4 4 // P0.04 Analog Input 4 +#define PIN_A5 5 // P0.05 Analog Input 5 +#define PIN_VBAT D16 // P0.31 Battery voltage sense +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// Communication Interfaces +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// I2C Configuration +#define HAS_WIRE 1 +#define PIN_WIRE_SDA D14 // P0.09 +#define PIN_WIRE_SCL D15 // P0.10 +#define WIRE_INTERFACES_COUNT 1 +#define I2C_NO_RESCAN + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; +// SPI Configuration (SX1262) + +#define SPI_INTERFACES_COUNT 1 +#define PIN_SPI_MISO 9 // P1.14 (D9) +#define PIN_SPI_MOSI 10 // P1.15 (D10) +#define PIN_SPI_SCK 8 // P1.13 (D8) + +// SX1262 LoRa Module Pins +#define USE_SX1262 +#define SX126X_CS D4 // Chip select +#define SX126X_DIO1 D1 // Digital IO 1 (Interrupt) +#define SX126X_BUSY D3 // Busy status +#define SX126X_RESET D2 // Reset control +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // TCXO supply voltage +#define SX126X_RXEN D5 // RX enable control +#define SX126X_TXEN RADIOLIB_NC +#define SX126X_DIO2_AS_RF_SWITCH // This Line is really necessary for SX1262 to work with RF switch or will loss TX power +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// Power Management +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +#define BAT_READ \ + D19 // P0_14 = 14 Reads battery voltage from divider on signal board. (PIN_VBAT is reading voltage divider on XIAO and is + // program pin 32 / or P0.31) +#define BATTERY_SENSE_RESOLUTION_BITS 12 +#define ADC_MULTIPLIER 3.3 +#define BATTERY_PIN PIN_VBAT // PIN_A7 +#define AREF_VOLTAGE 3.3 +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// GPS L76KB +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +#define GPS_L76K +#ifdef GPS_L76K +#define PIN_GPS_RX D6 // 44 +#define PIN_GPS_TX D7 // 43 +#define HAS_GPS 1 +#define GPS_BAUDRATE 9600 +#define GPS_THREAD_INTERVAL 50 +#define PIN_SERIAL1_RX PIN_GPS_TX +#define PIN_SERIAL1_TX PIN_GPS_RX +#define PIN_GPS_STANDBY D0 +#define GPS_EN D18 // P1.05 +#endif + +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// On-board QSPI Flash +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// On-board QSPI Flash +#define PIN_QSPI_SCK (21) +#define PIN_QSPI_CS (22) +#define PIN_QSPI_IO0 (23) +#define PIN_QSPI_IO1 (24) +#define PIN_QSPI_IO2 (25) +#define PIN_QSPI_IO3 (26) + +#define EXTERNAL_FLASH_DEVICES P25Q16H +#define EXTERNAL_FLASH_USE_QSPI + +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +// Compatibility Definitions +// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +#ifdef __cplusplus +extern "C" { +#endif +// Serial port placeholders + +#define PIN_SERIAL2_RX (-1) +#define PIN_SERIAL2_TX (-1) +#ifdef __cplusplus +} +#endif + +#endif // _SEEED_SOLAR_NODE_H_ \ No newline at end of file From a36f21b29ae22b5c1476277aa3b9768460cd7642 Mon Sep 17 00:00:00 2001 From: Benjamin Kyd Date: Thu, 17 Apr 2025 10:36:19 +0100 Subject: [PATCH 093/100] Fix compiler error in PowerFSM when WiFi is excluded (#6603) --- src/PowerFSM.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/PowerFSM.cpp b/src/PowerFSM.cpp index 4c4d203c2..dbe4796cf 100644 --- a/src/PowerFSM.cpp +++ b/src/PowerFSM.cpp @@ -19,7 +19,7 @@ #include "sleep.h" #include "target_specific.h" -#if HAS_WIFI && !defined(ARCH_PORTDUINO) +#if HAS_WIFI && !defined(ARCH_PORTDUINO) || defined(MESHTASTIC_EXCLUDE_WIFI) #include "mesh/wifi/WiFiAPClient.h" #endif @@ -269,9 +269,6 @@ Fsm powerFSM(&stateBOOT); void PowerFSM_setup() { bool isRouter = (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ? 1 : 0); - bool isTrackerOrSensor = config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER || - config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER || - config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR; bool hasPower = isPowered(); LOG_INFO("PowerFSM init, USB power=%d", hasPower ? 1 : 0); @@ -383,6 +380,12 @@ void PowerFSM_setup() // See: https://github.com/meshtastic/firmware/issues/1071 // Don't add power saving transitions if we are a power saving tracker or sensor or have Wifi enabled. Sleep will be initiated // through the modules + +#if HAS_WIFI || !defined(MESHTASTIC_EXCLUDE_WIFI) + bool isTrackerOrSensor = config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER || + config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER || + config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR; + if ((isRouter || config.power.is_power_saving) && !isWifiAvailable() && !isTrackerOrSensor) { powerFSM.add_timed_transition(&stateNB, &stateLS, Default::getConfiguredOrDefaultMs(config.power.min_wake_secs, default_min_wake_secs), NULL, @@ -400,7 +403,9 @@ void PowerFSM_setup() Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), NULL, "Screen-on timeout"); } -#else +#endif // HAS_WIFI || !defined(MESHTASTIC_EXCLUDE_WIFI) + +#else // (not) ARCH_ESP32 // If not ESP32, light-sleep not used. Check periodically if config has drifted out of stateDark powerFSM.add_timed_transition(&stateDARK, &stateDARK, Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), NULL, @@ -409,4 +414,4 @@ void PowerFSM_setup() powerFSM.run_machine(); // run one iteration of the state machine, so we run our on enter tasks for the initial DARK state } -#endif \ No newline at end of file +#endif From c177c6d655b2bbb05d4d8711fd67756de9fc6412 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 05:33:42 -0500 Subject: [PATCH 094/100] [create-pull-request] automated change (#6610) Co-authored-by: caveman99 <25002+caveman99@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/protobufs b/protobufs index b982b36df..27fac3914 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit b982b36dfab2e96b8f8be90af891c68ebf8790c2 +Subproject commit 27fac39141d99fe727a0a1824c5397409b1aea75 diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index 36bded9b2..6fa0b60b0 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -243,6 +243,10 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_HELTEC_MESH_POCKET = 94, /* Seeed Solar Node */ meshtastic_HardwareModel_SEEED_SOLAR_NODE = 95, + /* NomadStar Meteor Pro https://nomadstar.ch/ */ + meshtastic_HardwareModel_NOMADSTAR_METEOR_PRO = 96, + /* Elecrow CrowPanel Advance models, ESP32-S3 and TFT with SX1262 radio plugin */ + meshtastic_HardwareModel_CROWPANEL = 97, /* ------------------------------------------------------------------------------------------------------------------------------------------ Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. ------------------------------------------------------------------------------------------------------------------------------------------ */ From ef14967fbf29f0aa2dc38f5dcc9c8289b7461ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 17 Apr 2025 16:03:37 +0200 Subject: [PATCH 095/100] Crowpanel 2.4,2.8 and 3.5 support (#6355) Co-authored-by: mverch67 --- boards/crowpanel.json | 43 ++++ src/FSCommon.cpp | 9 +- src/Power.cpp | 2 + src/graphics/Screen.cpp | 12 +- src/graphics/ScreenFonts.h | 4 +- src/graphics/TFTDisplay.cpp | 330 +++++++++++++++++++++++++- src/graphics/images.h | 2 +- src/main.cpp | 24 +- src/mesh/NodeDB.cpp | 7 +- src/platform/esp32/architecture.h | 2 + src/sleep.cpp | 4 +- variants/elecrow_panel/pins_arduino.h | 64 +++++ variants/elecrow_panel/platformio.ini | 123 ++++++++++ variants/elecrow_panel/variant.h | 195 +++++++++++++++ 14 files changed, 789 insertions(+), 32 deletions(-) create mode 100644 boards/crowpanel.json create mode 100644 variants/elecrow_panel/pins_arduino.h create mode 100644 variants/elecrow_panel/platformio.ini create mode 100644 variants/elecrow_panel/variant.h diff --git a/boards/crowpanel.json b/boards/crowpanel.json new file mode 100644 index 000000000..570961ed7 --- /dev/null +++ b/boards/crowpanel.json @@ -0,0 +1,43 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32s3_out.ld", + "memory_type": "qio_opi", + "partitions": "default_16MB.csv" + }, + "core": "esp32", + "extra_flags": [ + "-DBOARD_HAS_PSRAM", + "-DARDUINO_USB_CDC_ON_BOOT=1", + "-DARDUINO_USB_MODE=0", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=0" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "qio", + "hwids": [["0x303A", "0x1001"]], + "mcu": "esp32s3", + "variant": "ESP32-S3-WROOM-1-N16R8" + }, + "connectivity": ["wifi", "bluetooth", "lora"], + "debug": { + "default_tool": "esp-builtin", + "onboard_tools": ["esp-builtin"], + "openocd_target": "esp32s3.cfg" + }, + "frameworks": ["arduino", "espidf"], + "name": "ESP32-S3-WROOM-1-N16R8 (16 MB Flash, 8 MB PSRAM)", + "upload": { + "flash_size": "16MB", + "maximum_ram_size": 524288, + "maximum_size": 16777216, + "require_upload_port": true, + "speed": 921600 + }, + "monitor": { + "speed": 115200 + }, + "url": "https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf", + "vendor": "Espressif" +} diff --git a/src/FSCommon.cpp b/src/FSCommon.cpp index 88f0764b5..f215be80f 100644 --- a/src/FSCommon.cpp +++ b/src/FSCommon.cpp @@ -12,13 +12,14 @@ #include "SPILock.h" #include "configuration.h" -#ifdef HAS_SDCARD +// Software SPI is used by MUI so disable SD card here until it's also implemented +#if defined(HAS_SDCARD) && !defined(SDCARD_USE_SOFT_SPI) #include #include #ifdef SDCARD_USE_SPI1 -SPIClass SPI1(HSPI); -#define SDHandler SPI1 +SPIClass SPI_HSPI(HSPI); +#define SDHandler SPI_HSPI #else #define SDHandler SPI #endif @@ -306,7 +307,7 @@ void fsInit() */ void setupSDCard() { -#ifdef HAS_SDCARD +#if defined(HAS_SDCARD) && !defined(SDCARD_USE_SOFT_SPI) concurrency::LockGuard g(spiLock); SDHandler.begin(SPI_SCK, SPI_MISO, SPI_MOSI); if (!SD.begin(SDCARD_CS, SDHandler, SD_SPI_FREQUENCY)) { diff --git a/src/Power.cpp b/src/Power.cpp index f11f8eac3..ed1bd20ef 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -450,6 +450,8 @@ class AnalogBatteryLevel : public HasBatteryLevel return isBatteryConnect() && isVbusIn(); #endif #endif + // by default, we check the battery voltage only + return isVbusIn(); } private: diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 9afd88c76..ad0b94efe 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1104,7 +1104,7 @@ static void drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const NodeStat char usersString[20]; snprintf(usersString, sizeof(usersString), "%d/%d", nodeStatus->getNumOnline(), nodeStatus->getNumTotal()); #if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ - defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS)) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) display->drawFastImage(x, y + 3, 8, 8, imgUser); #else @@ -1545,7 +1545,7 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O dispdev = new SSD1306Wire(address.address, -1, -1, geometry, (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE); #elif defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7789_CS) || \ - defined(RAK14014) || defined(HX8357_CS) + defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) dispdev = new TFTDisplay(address.address, -1, -1, geometry, (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE); #elif defined(USE_EINK) && !defined(USE_EINK_DYNAMICDISPLAY) @@ -1751,7 +1751,7 @@ void Screen::setup() // flip it. If you have a headache now, you're welcome. if (!config.display.flip_screen) { #if defined(ST7701_CS) || defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || \ - defined(ST7789_CS) || defined(RAK14014) || defined(HX8357_CS) + defined(ST7789_CS) || defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) static_cast(dispdev)->flipScreenVertically(); #elif defined(USE_ST7789) static_cast(dispdev)->flipScreenVertically(); @@ -2492,7 +2492,7 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16 if (!Throttle::isWithinTimespanMs(storeForwardModule->lastHeartbeat, (storeForwardModule->heartbeatInterval * 1200))) { // no heartbeat, overlap a bit #if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ - defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || ARCH_PORTDUINO) && \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || ARCH_PORTDUINO) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8, imgQuestionL1); @@ -2504,7 +2504,7 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16 #endif } else { #if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ - defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS)) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(ourId), y + 3 + FONT_HEIGHT_SMALL, 16, 8, imgSFL1); @@ -2519,7 +2519,7 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16 } else { // TODO: Raspberry Pi supports more than just the one screen size #if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ - defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || ARCH_PORTDUINO) && \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || ARCH_PORTDUINO) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8, imgInfoL1); diff --git a/src/graphics/ScreenFonts.h b/src/graphics/ScreenFonts.h index 079a3e282..0be0dc814 100644 --- a/src/graphics/ScreenFonts.h +++ b/src/graphics/ScreenFonts.h @@ -65,8 +65,8 @@ #endif #if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ - defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \ - !defined(DISPLAY_FORCE_SMALL_FONTS) + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) || \ + defined(ILI9488_CS) && !defined(DISPLAY_FORCE_SMALL_FONTS) // The screen is bigger so use bigger fonts #define FONT_SMALL FONT_MEDIUM_LOCAL // Height: 19 #define FONT_MEDIUM FONT_LARGE_LOCAL // Height: 28 diff --git a/src/graphics/TFTDisplay.cpp b/src/graphics/TFTDisplay.cpp index c5187cffc..14787baff 100644 --- a/src/graphics/TFTDisplay.cpp +++ b/src/graphics/TFTDisplay.cpp @@ -120,6 +120,303 @@ static void rak14014_tpIntHandle(void) _rak14014_touch_int = true; } +#elif defined(ST72xx_DE) +#include +#include +#include +#include +TCA9534 ioex; + +class LGFX : public lgfx::LGFX_Device +{ + lgfx::Bus_RGB _bus_instance; + lgfx::Panel_RGB _panel_instance; + lgfx::Touch_GT911 _touch_instance; + + public: + const uint16_t screenWidth = TFT_WIDTH; + const uint16_t screenHeight = TFT_HEIGHT; + + bool init_impl(bool use_reset, bool use_clear) override + { + ioex.attach(Wire); + ioex.setDeviceAddress(0x18); + ioex.config(1, TCA9534::Config::OUT); + ioex.config(2, TCA9534::Config::OUT); + ioex.config(3, TCA9534::Config::OUT); + ioex.config(4, TCA9534::Config::OUT); + + ioex.output(1, TCA9534::Level::H); + ioex.output(3, TCA9534::Level::L); + ioex.output(4, TCA9534::Level::H); + + pinMode(1, OUTPUT); + digitalWrite(1, LOW); + ioex.output(2, TCA9534::Level::L); + delay(20); + ioex.output(2, TCA9534::Level::H); + delay(100); + pinMode(1, INPUT); + + return LGFX_Device::init_impl(use_reset, use_clear); + } + + LGFX(void) + { + { + auto cfg = _panel_instance.config(); + + cfg.memory_width = screenWidth; + cfg.memory_height = screenHeight; + cfg.panel_width = screenWidth; + cfg.panel_height = screenHeight; + cfg.offset_x = 0; + cfg.offset_y = 0; + cfg.offset_rotation = 0; + _panel_instance.config(cfg); + } + + { + auto cfg = _panel_instance.config_detail(); + cfg.use_psram = 0; + _panel_instance.config_detail(cfg); + } + + { + auto cfg = _bus_instance.config(); + cfg.panel = &_panel_instance; + cfg.pin_d0 = ST72xx_B0; // B0 + cfg.pin_d1 = ST72xx_B1; // B1 + cfg.pin_d2 = ST72xx_B2; // B2 + cfg.pin_d3 = ST72xx_B3; // B3 + cfg.pin_d4 = ST72xx_B4; // B4 + cfg.pin_d5 = ST72xx_G0; // G0 + cfg.pin_d6 = ST72xx_G1; // G1 + cfg.pin_d7 = ST72xx_G2; // G2 + cfg.pin_d8 = ST72xx_G3; // G3 + cfg.pin_d9 = ST72xx_G4; // G4 + cfg.pin_d10 = ST72xx_G5; // G5 + cfg.pin_d11 = ST72xx_R0; // R0 + cfg.pin_d12 = ST72xx_R1; // R1 + cfg.pin_d13 = ST72xx_R2; // R2 + cfg.pin_d14 = ST72xx_R3; // R3 + cfg.pin_d15 = ST72xx_R4; // R4 + + cfg.pin_henable = ST72xx_DE; + cfg.pin_vsync = ST72xx_VSYNC; + cfg.pin_hsync = ST72xx_HSYNC; + cfg.pin_pclk = ST72xx_PCLK; + cfg.freq_write = 13000000; + +#ifdef ST7265_HSYNC_POLARITY + cfg.hsync_polarity = ST7265_HSYNC_POLARITY; + cfg.hsync_front_porch = ST7265_HSYNC_FRONT_PORCH; // 8; + cfg.hsync_pulse_width = ST7265_HSYNC_PULSE_WIDTH; // 4; + cfg.hsync_back_porch = ST7265_HSYNC_BACK_PORCH; // 8; + + cfg.vsync_polarity = ST7265_VSYNC_POLARITY; // 0; + cfg.vsync_front_porch = ST7265_VSYNC_FRONT_PORCH; // 8; + cfg.vsync_pulse_width = ST7265_VSYNC_PULSE_WIDTH; // 4; + cfg.vsync_back_porch = ST7265_VSYNC_BACK_PORCH; // 8; + + cfg.pclk_idle_high = 1; + cfg.pclk_active_neg = ST7265_PCLK_ACTIVE_NEG; // 0; + // cfg.pclk_idle_high = 0; + // cfg.de_idle_high = 1; +#endif + +#ifdef ST7262_HSYNC_POLARITY + cfg.hsync_polarity = ST7262_HSYNC_POLARITY; + cfg.hsync_front_porch = ST7262_HSYNC_FRONT_PORCH; // 8; + cfg.hsync_pulse_width = ST7262_HSYNC_PULSE_WIDTH; // 4; + cfg.hsync_back_porch = ST7262_HSYNC_BACK_PORCH; // 8; + + cfg.vsync_polarity = ST7262_VSYNC_POLARITY; // 0; + cfg.vsync_front_porch = ST7262_VSYNC_FRONT_PORCH; // 8; + cfg.vsync_pulse_width = ST7262_VSYNC_PULSE_WIDTH; // 4; + cfg.vsync_back_porch = ST7262_VSYNC_BACK_PORCH; // 8; + + cfg.pclk_idle_high = 1; + cfg.pclk_active_neg = ST7262_PCLK_ACTIVE_NEG; // 0; + // cfg.pclk_idle_high = 0; + // cfg.de_idle_high = 1; +#endif + +#ifdef SC7277_HSYNC_POLARITY + cfg.hsync_polarity = SC7277_HSYNC_POLARITY; + cfg.hsync_front_porch = SC7277_HSYNC_FRONT_PORCH; // 8; + cfg.hsync_pulse_width = SC7277_HSYNC_PULSE_WIDTH; // 4; + cfg.hsync_back_porch = SC7277_HSYNC_BACK_PORCH; // 8; + + cfg.vsync_polarity = SC7277_VSYNC_POLARITY; // 0; + cfg.vsync_front_porch = SC7277_VSYNC_FRONT_PORCH; // 8; + cfg.vsync_pulse_width = SC7277_VSYNC_PULSE_WIDTH; // 4; + cfg.vsync_back_porch = SC7277_VSYNC_BACK_PORCH; // 8; + + cfg.pclk_idle_high = 1; + cfg.pclk_active_neg = SC7277_PCLK_ACTIVE_NEG; // 0; + // cfg.pclk_idle_high = 0; + // cfg.de_idle_high = 1; +#endif + + _bus_instance.config(cfg); + } + _panel_instance.setBus(&_bus_instance); + + { + auto cfg = _touch_instance.config(); + cfg.x_min = 0; + cfg.x_max = TFT_WIDTH; + cfg.y_min = 0; + cfg.y_max = TFT_HEIGHT; + cfg.pin_int = -1; + cfg.pin_rst = -1; + cfg.bus_shared = true; + cfg.offset_rotation = 0; + + cfg.i2c_port = 0; + cfg.i2c_addr = 0x5D; + cfg.pin_sda = I2C_SDA; + cfg.pin_scl = I2C_SCL; + cfg.freq = 400000; + _touch_instance.config(cfg); + _panel_instance.setTouch(&_touch_instance); + } + + setPanel(&_panel_instance); + } +}; + +static LGFX *tft = nullptr; + +#elif defined(ILI9488_CS) +#include // Graphics and font library for ILI9488 driver chip + +class LGFX : public lgfx::LGFX_Device +{ + lgfx::Panel_ILI9488 _panel_instance; + lgfx::Bus_SPI _bus_instance; + lgfx::Light_PWM _light_instance; + lgfx::Touch_GT911 _touch_instance; + + public: + LGFX(void) + { + { + auto cfg = _bus_instance.config(); + + // configure SPI + cfg.spi_host = ILI9488_SPI_HOST; // ESP32-S2,S3,C3 : SPI2_HOST or SPI3_HOST / ESP32 : VSPI_HOST or HSPI_HOST + cfg.spi_mode = 0; + cfg.freq_write = SPI_FREQUENCY; // SPI clock for transmission (up to 80MHz, rounded to the value obtained by dividing + // 80MHz by an integer) + cfg.freq_read = SPI_READ_FREQUENCY; // SPI clock when receiving + cfg.spi_3wire = false; // Set to true if reception is done on the MOSI pin + cfg.use_lock = true; // Set to true to use transaction locking + cfg.dma_channel = SPI_DMA_CH_AUTO; // SPI_DMA_CH_AUTO; // Set DMA channel to use (0=not use DMA / 1=1ch / 2=ch / + // SPI_DMA_CH_AUTO=auto setting) + cfg.pin_sclk = ILI9488_SCK; // Set SPI SCLK pin number + cfg.pin_mosi = ILI9488_SDA; // Set SPI MOSI pin number + cfg.pin_miso = ILI9488_MISO; // Set SPI MISO pin number (-1 = disable) + cfg.pin_dc = ILI9488_RS; // Set SPI DC pin number (-1 = disable) + + _bus_instance.config(cfg); // applies the set value to the bus. + _panel_instance.setBus(&_bus_instance); // set the bus on the panel. + } + + { // Set the display panel control. + auto cfg = _panel_instance.config(); // Gets a structure for display panel settings. + + cfg.pin_cs = ILI9488_CS; // Pin number where CS is connected (-1 = disable) + cfg.pin_rst = -1; // Pin number where RST is connected (-1 = disable) + cfg.pin_busy = -1; // Pin number where BUSY is connected (-1 = disable) + + // The following setting values ​​are general initial values ​​for each panel, so please comment out any + // unknown items and try them. + + cfg.memory_width = TFT_WIDTH; // Maximum width supported by the driver IC + cfg.memory_height = TFT_HEIGHT; // Maximum height supported by the driver IC + cfg.panel_width = TFT_WIDTH; // actual displayable width + cfg.panel_height = TFT_HEIGHT; // actual displayable height + cfg.offset_x = TFT_OFFSET_X; // Panel offset amount in X direction + cfg.offset_y = TFT_OFFSET_Y; // Panel offset amount in Y direction + cfg.offset_rotation = TFT_OFFSET_ROTATION; // Rotation direction value offset 0~7 (4~7 is mirrored) +#ifdef TFT_DUMMY_READ_PIXELS + cfg.dummy_read_pixel = TFT_DUMMY_READ_PIXELS; // Number of bits for dummy read before pixel readout +#else + cfg.dummy_read_pixel = 9; // Number of bits for dummy read before pixel readout +#endif + cfg.dummy_read_bits = 1; // Number of bits for dummy read before non-pixel data read + cfg.readable = true; // Set to true if data can be read + cfg.invert = true; // Set to true if the light/darkness of the panel is reversed + cfg.rgb_order = false; // Set to true if the panel's red and blue are swapped + cfg.dlen_16bit = + false; // Set to true for panels that transmit data length in 16-bit units with 16-bit parallel or SPI + cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.) + + // Set the following only when the display is shifted with a driver with a variable number of pixels, such as the + // ST7735 or ILI9163. + // cfg.memory_width = TFT_WIDTH; // Maximum width supported by the driver IC + // cfg.memory_height = TFT_HEIGHT; // Maximum height supported by the driver IC + _panel_instance.config(cfg); + } + +#ifdef ILI9488_BL + // Set the backlight control + { + auto cfg = _light_instance.config(); // Gets a structure for backlight settings. + + cfg.pin_bl = ILI9488_BL; // Pin number to which the backlight is connected + cfg.invert = false; // true to invert the brightness of the backlight + // cfg.freq = 44100; // PWM frequency of backlight + // cfg.pwm_channel = 1; // PWM channel number to use + + _light_instance.config(cfg); + _panel_instance.setLight(&_light_instance); // Set the backlight on the panel. + } +#endif + +#if HAS_TOUCHSCREEN + // Configure settings for touch screen control. + { + auto cfg = _touch_instance.config(); + + cfg.pin_cs = -1; + cfg.x_min = 0; + cfg.x_max = TFT_HEIGHT - 1; + cfg.y_min = 0; + cfg.y_max = TFT_WIDTH - 1; + cfg.pin_int = SCREEN_TOUCH_INT; +#ifdef SCREEN_TOUCH_RST + cfg.pin_rst = SCREEN_TOUCH_RST; +#endif + cfg.bus_shared = true; + cfg.offset_rotation = TFT_OFFSET_ROTATION; + // cfg.freq = 2500000; + + // I2C + cfg.i2c_port = TOUCH_I2C_PORT; + cfg.i2c_addr = TOUCH_SLAVE_ADDRESS; +#ifdef SCREEN_TOUCH_USE_I2C1 + cfg.pin_sda = I2C_SDA1; + cfg.pin_scl = I2C_SCL1; +#else + cfg.pin_sda = I2C_SDA; + cfg.pin_scl = I2C_SCL; +#endif + // cfg.freq = 400000; + + _touch_instance.config(cfg); + _panel_instance.setTouch(&_touch_instance); + } +#endif + + setPanel(&_panel_instance); + } +}; + +static LGFX *tft = nullptr; + #elif defined(ST7789_CS) #include // Graphics and font library for ST7735 driver chip @@ -129,7 +426,7 @@ class LGFX : public lgfx::LGFX_Device lgfx::Bus_SPI _bus_instance; lgfx::Light_PWM _light_instance; #if HAS_TOUCHSCREEN -#ifdef T_WATCH_S3 +#if defined(T_WATCH_S3) || defined(ELECROW) lgfx::Touch_FT5x06 _touch_instance; #else lgfx::Touch_GT911 _touch_instance; @@ -171,16 +468,22 @@ class LGFX : public lgfx::LGFX_Device // The following setting values ​​are general initial values ​​for each panel, so please comment out any // unknown items and try them. - cfg.panel_width = TFT_WIDTH; // actual displayable width - cfg.panel_height = TFT_HEIGHT; // actual displayable height - cfg.offset_x = TFT_OFFSET_X; // Panel offset amount in X direction - cfg.offset_y = TFT_OFFSET_Y; // Panel offset amount in Y direction - cfg.offset_rotation = TFT_OFFSET_ROTATION; // Rotation direction value offset 0~7 (4~7 is mirrored) - cfg.dummy_read_pixel = 9; // Number of bits for dummy read before pixel readout - cfg.dummy_read_bits = 1; // Number of bits for dummy read before non-pixel data read - cfg.readable = true; // Set to true if data can be read - cfg.invert = true; // Set to true if the light/darkness of the panel is reversed - cfg.rgb_order = false; // Set to true if the panel's red and blue are swapped + cfg.memory_width = TFT_WIDTH; // Maximum width supported by the driver IC + cfg.memory_height = TFT_HEIGHT; // Maximum height supported by the driver IC + cfg.panel_width = TFT_WIDTH; // actual displayable width + cfg.panel_height = TFT_HEIGHT; // actual displayable height + cfg.offset_x = TFT_OFFSET_X; // Panel offset amount in X direction + cfg.offset_y = TFT_OFFSET_Y; // Panel offset amount in Y direction + cfg.offset_rotation = TFT_OFFSET_ROTATION; // Rotation direction value offset 0~7 (4~7 is mirrored) +#ifdef TFT_DUMMY_READ_PIXELS + cfg.dummy_read_pixel = TFT_DUMMY_READ_PIXELS; // Number of bits for dummy read before pixel readout +#else + cfg.dummy_read_pixel = 9; // Number of bits for dummy read before pixel readout +#endif + cfg.dummy_read_bits = 1; // Number of bits for dummy read before non-pixel data read + cfg.readable = true; // Set to true if data can be read + cfg.invert = true; // Set to true if the light/darkness of the panel is reversed + cfg.rgb_order = false; // Set to true if the panel's red and blue are swapped cfg.dlen_16bit = false; // Set to true for panels that transmit data length in 16-bit units with 16-bit parallel or SPI cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.) @@ -217,6 +520,9 @@ class LGFX : public lgfx::LGFX_Device cfg.y_min = 0; cfg.y_max = TFT_WIDTH - 1; cfg.pin_int = SCREEN_TOUCH_INT; +#ifdef SCREEN_TOUCH_RST + cfg.pin_rst = SCREEN_TOUCH_RST; +#endif cfg.bus_shared = true; cfg.offset_rotation = TFT_OFFSET_ROTATION; // cfg.freq = 2500000; @@ -640,7 +946,7 @@ static LGFX *tft = nullptr; #endif #if defined(ST7701_CS) || defined(ST7735_CS) || defined(ST7789_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || \ - defined(RAK14014) || defined(HX8357_CS) || (ARCH_PORTDUINO && HAS_SCREEN != 0) + defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST72xx_DE) || (ARCH_PORTDUINO && HAS_SCREEN != 0) #include "SPILock.h" #include "TFTDisplay.h" #include diff --git a/src/graphics/images.h b/src/graphics/images.h index b757dcf30..069839a16 100644 --- a/src/graphics/images.h +++ b/src/graphics/images.h @@ -21,7 +21,7 @@ const uint8_t bluetoothConnectedIcon[36] PROGMEM = {0xfe, 0x01, 0xff, 0x03, 0x03 #endif #if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \ - defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || ARCH_PORTDUINO) && \ + defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || ARCH_PORTDUINO) && \ !defined(DISPLAY_FORCE_SMALL_FONTS) const uint8_t imgQuestionL1[] PROGMEM = {0xff, 0x01, 0x01, 0x32, 0x7b, 0x49, 0x49, 0x6f, 0x26, 0x01, 0x01, 0xff}; const uint8_t imgQuestionL2[] PROGMEM = {0x0f, 0x08, 0x08, 0x08, 0x06, 0x0f, 0x0f, 0x06, 0x08, 0x08, 0x08, 0x0f}; diff --git a/src/main.cpp b/src/main.cpp index 535a7afa1..eb93a70d1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -115,6 +115,10 @@ AccelerometerThread *accelerometerThread = nullptr; AudioThread *audioThread = nullptr; #endif +#ifdef USE_PCA9557 +PCA9557 IOEXP; +#endif + #if HAS_TFT extern void tftSetup(void); #endif @@ -133,6 +137,10 @@ void setupNicheGraphics(); #include "nicheGraphics.h" #endif +#if defined(HW_SPI1_DEVICE) && defined(ARCH_ESP32) +SPIClass SPI1(HSPI); +#endif + using namespace concurrency; volatile static const char slipstreamTZString[] = {USERPREFS_TZ_STRING}; @@ -364,9 +372,11 @@ void setup() SPISettings spiSettings(4000000, MSBFIRST, SPI_MODE0); #endif +#if !HAS_TFT meshtastic_Config_DisplayConfig_OledType screen_model = meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO; OLEDDISPLAY_GEOMETRY screen_geometry = GEOMETRY_128_64; +#endif #ifdef USE_SEGGER auto mode = false ? SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL : SEGGER_RTT_MODE_NO_BLOCK_TRIM; @@ -595,6 +605,7 @@ void setup() } #endif +#if !HAS_TFT auto screenInfo = i2cScanner->firstScreen(); screen_found = screenInfo.type != ScanI2C::DeviceType::NONE ? screenInfo.address : ScanI2C::ADDRESS_NONE; @@ -612,6 +623,7 @@ void setup() screen_model = meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO; } } +#endif #define UPDATE_FROM_SCANNER(FIND_FN) @@ -779,9 +791,11 @@ void setup() else playStartMelody(); +#if !HAS_TFT // fixed screen override? if (config.display.oled != meshtastic_Config_DisplayConfig_OledType_OLED_AUTO) screen_model = config.display.oled; +#endif #if defined(USE_SH1107) screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // set dimension of 128x128 @@ -837,10 +851,16 @@ void setup() #elif !defined(ARCH_ESP32) // ARCH_RP2040 SPI.begin(); #else - // ESP32 + // ESP32 +#if defined(HW_SPI1_DEVICE) + SPI1.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); + LOG_DEBUG("SPI1.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); + SPI1.setFrequency(4000000); +#else SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); LOG_DEBUG("SPI.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); SPI.setFrequency(4000000); +#endif #endif // Initialize the screen first so we can show the logo while we start up everything else. @@ -934,7 +954,7 @@ void setup() // Don't call screen setup until after nodedb is setup (because we need // the current region name) #if defined(ST7701_CS) || defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || \ - defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) + defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) screen->setup(); #elif defined(ARCH_PORTDUINO) if (screen_found.port != ScanI2C::I2CPort::NO_I2C || settingsMap[displayPanel]) { diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index c89abbe74..90a90e89f 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -584,7 +584,8 @@ void NodeDB::installDefaultConfig(bool preserveKey = false) resetRadioConfig(true); // This also triggers NodeInfo/Position requests since we're fresh strncpy(config.network.ntp_server, "meshtastic.pool.ntp.org", 32); -#if (defined(T_DECK) || defined(T_WATCH_S3) || defined(UNPHONE) || defined(PICOMPUTER_S3) || defined(SENSECAP_INDICATOR)) && \ +#if (defined(T_DECK) || defined(T_WATCH_S3) || defined(UNPHONE) || defined(PICOMPUTER_S3) || defined(SENSECAP_INDICATOR) || \ + defined(ELECROW)) && \ HAS_TFT // switch BT off by default; use TFT programming mode or hotkey to enable config.bluetooth.enabled = false; @@ -595,7 +596,7 @@ void NodeDB::installDefaultConfig(bool preserveKey = false) config.bluetooth.fixed_pin = defaultBLEPin; #if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7789_CS) || \ - defined(HX8357_CS) || defined(USE_ST7789) + defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) bool hasScreen = true; #ifdef HELTEC_MESH_NODE_T114 uint32_t st7789_id = get_st7789_id(ST7789_NSS, ST7789_SCK, ST7789_SDA, ST7789_RS, ST7789_RESET); @@ -689,7 +690,7 @@ void NodeDB::initConfigIntervals() config.display.screen_on_secs = default_screen_on_secs; -#if defined(T_WATCH_S3) || defined(T_DECK) || defined(UNPHONE) || defined(MESH_TAB) || defined(RAK14014) +#if defined(T_WATCH_S3) || defined(T_DECK) || defined(UNPHONE) || defined(MESH_TAB) || defined(RAK14014) || defined(ELECROW) config.power.is_power_saving = true; config.display.screen_on_secs = 30; config.power.wait_bluetooth_secs = 30; diff --git a/src/platform/esp32/architecture.h b/src/platform/esp32/architecture.h index 0af6d4d04..68d06c6d7 100644 --- a/src/platform/esp32/architecture.h +++ b/src/platform/esp32/architecture.h @@ -182,6 +182,8 @@ #define HW_VENDOR meshtastic_HardwareModel_T_ETH_ELITE #elif defined(HELTEC_SENSOR_HUB) #define HW_VENDOR meshtastic_HardwareModel_HELTEC_SENSOR_HUB +#elif defined(ELECROW_PANEL) +#define HW_VENDOR meshtastic_HardwareModel_CROWPANEL #endif // ----------------------------------------------------------------------------- diff --git a/src/sleep.cpp b/src/sleep.cpp index 02fa8d871..2985db0c2 100644 --- a/src/sleep.cpp +++ b/src/sleep.cpp @@ -400,7 +400,7 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r #ifdef INPUTDRIVER_ENCODER_BTN gpio_wakeup_enable((gpio_num_t)INPUTDRIVER_ENCODER_BTN, GPIO_INTR_LOW_LEVEL); #endif -#ifdef T_WATCH_S3 +#if defined(T_WATCH_S3) || defined(ELECROW) gpio_wakeup_enable((gpio_num_t)SCREEN_TOUCH_INT, GPIO_INTR_LOW_LEVEL); #endif enableLoraInterrupt(); @@ -434,7 +434,7 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r gpio_wakeup_disable(pin); #endif -#ifdef T_WATCH_S3 +#if defined(T_WATCH_S3) || defined(ELECROW) gpio_wakeup_disable((gpio_num_t)SCREEN_TOUCH_INT); #endif diff --git a/variants/elecrow_panel/pins_arduino.h b/variants/elecrow_panel/pins_arduino.h new file mode 100644 index 000000000..b98530378 --- /dev/null +++ b/variants/elecrow_panel/pins_arduino.h @@ -0,0 +1,64 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +// static const uint8_t LED_BUILTIN = -1; + +// static const uint8_t TX = 43; +// static const uint8_t RX = 44; + +static const uint8_t SDA = 39; +static const uint8_t SCL = 40; + +// Default SPI will be mapped to Radio +static const uint8_t SS = -1; +static const uint8_t MOSI = 48; +static const uint8_t MISO = 47; +static const uint8_t SCK = 41; + +#ifndef CROW_SELECT +static const uint8_t SPI_MOSI = 6; +static const uint8_t SPI_SCK = 5; +static const uint8_t SPI_MISO = 4; +static const uint8_t SPI_CS = 7; // SD does not support -1 +static const uint8_t SDCARD_CS = SPI_CS; +#endif + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; +static const uint8_t A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +#endif /* Pins_Arduino_h */ \ No newline at end of file diff --git a/variants/elecrow_panel/platformio.ini b/variants/elecrow_panel/platformio.ini new file mode 100644 index 000000000..66dc35c3b --- /dev/null +++ b/variants/elecrow_panel/platformio.ini @@ -0,0 +1,123 @@ +[crowpanel_base] +extends = esp32s3_base +board = crowpanel +board_check = true +upload_protocol = esptool +board_build.partitions = default_16MB.csv ; must be here for some reason, board.json is not enough !? + +build_flags = ${esp32s3_base.build_flags} -Os + -I variants/elecrow_panel + -D ELECROW + -D ELECROW_PANEL + -D CONFIG_ARDUHAL_LOG_COLORS + -D RADIOLIB_DEBUG_SPI=0 + -D RADIOLIB_DEBUG_PROTOCOL=0 + -D RADIOLIB_DEBUG_BASIC=0 + -D RADIOLIB_VERBOSE_ASSERT=0 + -D RADIOLIB_SPI_PARANOID=0 + -D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1 + -D MESHTASTIC_EXCLUDE_INPUTBROKER=1 + -D MESHTASTIC_EXCLUDE_WEBSERVER=1 + -D MESHTASTIC_EXCLUDE_SERIAL=1 + -D MESHTASTIC_EXCLUDE_SOCKETAPI=1 + -D MESHTASTIC_EXCLUDE_SCREEN=1 + -D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1 +; -D INPUTDRIVER_BUTTON_TYPE=0 + -D HAS_TELEMETRY=0 + -D CONFIG_DISABLE_HAL_LOCKS=1 + -D HAS_SCREEN=0 + -D HAS_TFT=1 + -D RAM_SIZE=6144 + -D LV_LVGL_H_INCLUDE_SIMPLE + -D LV_CONF_INCLUDE_SIMPLE + -D LV_COMP_CONF_INCLUDE_SIMPLE + -D LV_USE_SYSMON=0 + -D LV_USE_PROFILER=0 + -D LV_USE_PERF_MONITOR=0 + -D LV_USE_MEM_MONITOR=0 + -D LV_USE_LOG=0 + -D LV_BUILD_TEST=0 + -D USE_LOG_DEBUG + -D LOG_DEBUG_INC=\"DebugConfiguration.h\" + -D USE_PACKET_API + +lib_deps = ${esp32s3_base.lib_deps} + ${device-ui_base.lib_deps} + earlephilhower/ESP8266Audio@^1.9.9 + earlephilhower/ESP8266SAM@^1.0.1 + lovyan03/LovyanGFX@^1.2.0 + hideakitai/TCA9534@^0.1.1 + +[env:elecrow-24-28-tft] +extends = crowpanel_base + +build_flags = + ${crowpanel_base.build_flags} + -D TFT_HEIGHT=320 ; needed in variant.h + -D HAS_SDCARD + -D SDCARD_USE_SOFT_SPI + -D SPI_DRIVER_SELECT=2 + -D USE_PIN_BUZZER +; -D INPUTDRIVER_BUTTON_TYPE=0 ; no button as this pin is assigned to LoRa cs! + -D SCREEN_TOUCH_INT=47 ; used to wake up the MCU by touch + -D LGFX_DRIVER_TEMPLATE + -D LGFX_DRIVER=LGFX_GENERIC + -D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_GENERIC.h\" + -D SPI_FREQUENCY=80000000 + -D LGFX_SCREEN_WIDTH=240 + -D LGFX_SCREEN_HEIGHT=320 + -D LGFX_PANEL=ST7789 + -D LGFX_ROTATION=1 + -D LGFX_CFG_HOST=SPI2_HOST + -D LGFX_PIN_SCK=42 + -D LGFX_PIN_MOSI=39 + -D LGFX_PIN_DC=41 + -D LGFX_PIN_CS=40 + -D LGFX_PIN_BL=38 + -D LGFX_TOUCH=FT5x06 + -D LGFX_TOUCH_I2C_ADDR=0x38 + -D LGFX_TOUCH_I2C_SDA=15 + -D LGFX_TOUCH_I2C_SCL=16 + -D LGFX_TOUCH_INT=47 + -D LGFX_TOUCH_RST=48 + -D LGFX_TOUCH_ROTATION=0 + -D VIEW_320x240 + -D MAP_FULL_REDRAW + +[env:elecrow-35-tft] +extends = crowpanel_base + +build_flags = + ${crowpanel_base.build_flags} + -D TFT_HEIGHT=480 ; needed in variant.h + -D HAS_SDCARD + -D SDCARD_USE_SOFT_SPI + -D SPI_DRIVER_SELECT=2 + -D USE_PIN_BUZZER +; -D INPUTDRIVER_BUTTON_TYPE=0 ; no button as this pin is assigned to LoRa cs! + -D SCREEN_TOUCH_INT=47 ; used to wake up the MCU by touch + -D LV_CACHE_DEF_SIZE=2097152 + -D LGFX_DRIVER_TEMPLATE + -D LGFX_DRIVER=LGFX_GENERIC + -D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_GENERIC.h\" + -D SPI_FREQUENCY=60000000 + -D LGFX_SCREEN_WIDTH=320 + -D LGFX_SCREEN_HEIGHT=480 + -D LGFX_PANEL=ILI9488 + -D LGFX_ROTATION=0 + -D LGFX_CFG_HOST=SPI2_HOST + -D LGFX_PIN_SCK=42 + -D LGFX_PIN_MOSI=39 + -D LGFX_PIN_DC=41 + -D LGFX_PIN_CS=40 + -D LGFX_PIN_BL=38 + -D LGFX_TOUCH=GT911 + -D LGFX_TOUCH_I2C_ADDR=0x5D + -D LGFX_TOUCH_I2C_SDA=15 + -D LGFX_TOUCH_I2C_SCL=16 + -D LGFX_TOUCH_INT=47 + -D LGFX_TOUCH_RST=48 + -D LGFX_TOUCH_ROTATION=0 + -D DISPLAY_SET_RESOLUTION + -D VIEW_320x240 + -D MAP_FULL_REDRAW diff --git a/variants/elecrow_panel/variant.h b/variants/elecrow_panel/variant.h new file mode 100644 index 000000000..b1035ed31 --- /dev/null +++ b/variants/elecrow_panel/variant.h @@ -0,0 +1,195 @@ +#define I2C_SDA 15 +#define I2C_SCL 16 + +#if TFT_HEIGHT == 320 && not defined(HAS_TFT) // 2.4 and 2.8 TFT +// ST7789 TFT LCD +#define ST7789_CS 40 +#define ST7789_RS 41 // DC +#define ST7789_SDA 39 // MOSI +#define ST7789_SCK 42 +#define ST7789_RESET -1 +#define ST7789_MISO 38 +#define ST7789_BUSY -1 +#define ST7789_BL 38 +#define ST7789_SPI_HOST SPI2_HOST +#define TFT_BL 38 +#define SPI_FREQUENCY 60000000 +#define SPI_READ_FREQUENCY 16000000 +#define TFT_OFFSET_ROTATION 0 +#define SCREEN_ROTATE +#define TFT_DUMMY_READ_PIXELS 8 +#define SCREEN_TRANSITION_FRAMERATE 5 +#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness + +#define HAS_TOUCHSCREEN 1 +#define SCREEN_TOUCH_INT 47 +#define SCREEN_TOUCH_RST 48 +#define TOUCH_I2C_PORT 0 +#define TOUCH_SLAVE_ADDRESS 0x38 // FT5x06 +#endif + +#if TFT_HEIGHT == 480 && not defined(HAS_TFT) // 3.5 TFT +// ILI9488 TFT LCD +#define ILI9488_CS 40 +#define ILI9488_RS 41 // DC +#define ILI9488_SDA 39 // MOSI +#define ILI9488_SCK 42 +#define ILI9488_RESET -1 +#define ILI9488_MISO 38 +#define ILI9488_BUSY -1 +#define ILI9488_BL 38 +#define ILI9488_SPI_HOST SPI2_HOST +#define TFT_BL 38 +#define SPI_FREQUENCY 40000000 +#define SPI_READ_FREQUENCY 16000000 +#define TFT_OFFSET_ROTATION 0 +#define SCREEN_ROTATE +#define TFT_DUMMY_READ_PIXELS 8 +#define SCREEN_TRANSITION_FRAMERATE 5 +#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness + +#define HAS_TOUCHSCREEN 1 +#define SCREEN_TOUCH_INT 47 +#define SCREEN_TOUCH_RST 48 +#define TOUCH_I2C_PORT 0 +#define TOUCH_SLAVE_ADDRESS 0x5D // GT911 +#endif + +#ifdef CROW_SELECT +#define ST72xx_DE 42 +#define ST72xx_VSYNC 41 +#define ST72xx_HSYNC 40 +#define ST72xx_PCLK 39 +#define ST72xx_R0 7 +#define ST72xx_R1 17 +#define ST72xx_R2 18 +#define ST72xx_R3 3 +#define ST72xx_R4 46 +#define ST72xx_G0 9 +#define ST72xx_G1 10 +#define ST72xx_G2 11 +#define ST72xx_G3 12 +#define ST72xx_G4 13 +#define ST72xx_G5 14 +#define ST72xx_B0 21 +#define ST72xx_B1 47 +#define ST72xx_B2 48 +#define ST72xx_B3 45 +#define ST72xx_B4 38 + +#define HAS_TOUCHSCREEN 1 +#define TOUCH_I2C_PORT 0 +#define TOUCH_SLAVE_ADDRESS 0x5D // GT911 +#endif + +#if defined(CROW_SELECT) && CROW_SELECT == 1 // 4.3 TFT 800x480 +#define ST7265_HSYNC_POLARITY 0 +#define ST7265_HSYNC_FRONT_PORCH 24 +#define ST7265_HSYNC_PULSE_WIDTH 8 +#define ST7265_HSYNC_BACK_PORCH 24 +#define ST7265_VSYNC_POLARITY 1 +#define ST7265_VSYNC_FRONT_PORCH 24 +#define ST7265_VSYNC_PULSE_WIDTH 8 +#define ST7265_VSYNC_BACK_PORCH 24 +#define ST7265_PCLK_ACTIVE_NEG 1 +#endif + +#if defined(CROW_SELECT) && CROW_SELECT == 2 // 5.0 TFT 800x480 +#define ST7262_HSYNC_POLARITY 0 +#define ST7262_HSYNC_FRONT_PORCH 8 +#define ST7262_HSYNC_PULSE_WIDTH 4 +#define ST7262_HSYNC_BACK_PORCH 8 +#define ST7262_VSYNC_POLARITY 0 +#define ST7262_VSYNC_FRONT_PORCH 8 +#define ST7262_VSYNC_PULSE_WIDTH 4 +#define ST7262_VSYNC_BACK_PORCH 8 +#define ST7262_PCLK_ACTIVE_NEG 0 +#endif + +#if defined(CROW_SELECT) && CROW_SELECT == 3 // 7.0 TFT 800x480 +#define SC7277_HSYNC_POLARITY 0 +#define SC7277_HSYNC_FRONT_PORCH 8 +#define SC7277_HSYNC_PULSE_WIDTH 4 +#define SC7277_HSYNC_BACK_PORCH 8 +#define SC7277_VSYNC_POLARITY 0 +#define SC7277_VSYNC_FRONT_PORCH 8 +#define SC7277_VSYNC_PULSE_WIDTH 4 +#define SC7277_VSYNC_BACK_PORCH 8 +#define SC7277_PCLK_ACTIVE_NEG 0 +#endif + +#if TFT_HEIGHT == 320 // 2.4-2.8 have I2S audio +// dac / amp +// #define HAS_I2S // didn't get I2S sound working +#define PIN_BUZZER 8 // using pwm buzzer instead (nobody will notice, lol) +#define DAC_I2S_BCK 13 +#define DAC_I2S_WS 11 +#define DAC_I2S_DOUT 12 +#define DAC_I2S_MCLK 8 // don't use GPIO0 because it's assigned to LoRa or button +#else +#define PIN_BUZZER 8 +#endif + +// GPS via UART1 connector +#define HAS_GPS 1 +#define GPS_DEFAULT_NOT_PRESENT 1 +#define GPS_RX_PIN 18 +#define GPS_TX_PIN 17 + +// Extension Slot Layout, viewed from above (2.4-3.5) +// DIO1/IO1 o o IO2/NRESET +// SCK/IO10 o o IO16/NC +// MISO/IO9 o o IO15/NC +// MOSI/IO3 o o NC/DIO2 +// 3V3 o o IO46/BUSY +// GND o o IO0/NSS +// 5V/NC o o NC/DIO3 +// J9 J8 + +// Extension Slot Layout, viewed from above (4.3-7.0) +// !! DIO1/IO20 o o IO19/NRESET !! +// !! SCK/IO5 o o IO16/NC +// !! MISO/IO4 o o IO15/NC +// !! MOSI/IO6 o o NC/DIO2 +// 3V3 o o IO2/BUSY !! +// GND o o IO0/NSS +// 5V/NC o o NC/DIO3 +// J9 J8 + +// LoRa +#define USE_SX1262 +#define LORA_CS 0 // GND + +#if TFT_HEIGHT == 320 || TFT_HEIGHT == 480 // 2.4 - 3.5 TFT +#define LORA_SCK 10 +#define LORA_MISO 9 +#define LORA_MOSI 3 + +#define LORA_RESET 2 +#define LORA_DIO1 1 // SX1262 IRQ +#define LORA_DIO2 46 // SX1262 BUSY + +// need to pull IO45 low to enable LORA and disable Microphone on 24 28 35 +#define SENSOR_POWER_CTRL_PIN 45 +#define SENSOR_POWER_ON LOW +#else +#define LORA_SCK 5 +#define LORA_MISO 4 +#define LORA_MOSI 6 + +#define LORA_RESET 19 +#define LORA_DIO1 20 // SX1262 IRQ +#define LORA_DIO2 2 // SX1262 BUSY +#endif + +#define HW_SPI1_DEVICE +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET +#define SX126X_DIO2_AS_RF_SWITCH + +#define SX126X_DIO3_TCXO_VOLTAGE 3.3 + +#define USE_VIRTUAL_KEYBOARD 1 +#define DISPLAY_CLOCK_FRAME 1 \ No newline at end of file From e2f6600cb955f8de86175a87fae36f49863ba72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 17 Apr 2025 22:58:28 +0200 Subject: [PATCH 096/100] Lib Update (#6510) * Lib Update Draft because PIN display doesn't work yet. * pin entry still no worky * Fix for missing PIN code issue (#6574) --------- Co-authored-by: Ben Meadors Co-authored-by: Alexander Begoon --- arch/esp32/esp32.ini | 2 +- src/nimble/NimbleBluetooth.cpp | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index 5e15cb451..35f3a5a1c 100644 --- a/arch/esp32/esp32.ini +++ b/arch/esp32/esp32.ini @@ -50,7 +50,7 @@ lib_deps = # renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master https://github.com/meshtastic/esp32_https_server/archive/896f1771ceb5979987a0b41028bf1b4e7aad419b.zip # renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino - h2zero/NimBLE-Arduino@^1.4.3 + h2zero/NimBLE-Arduino@^2.2.3 # renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip # renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index 009439f25..208d8ae3c 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -49,7 +49,7 @@ static uint8_t lastToRadio[MAX_TO_FROM_RADIO_SIZE]; class NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks { - virtual void onWrite(NimBLECharacteristic *pCharacteristic) + virtual void onWrite(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo) { LOG_DEBUG("To Radio onwrite"); auto val = pCharacteristic->getValue(); @@ -66,7 +66,7 @@ class NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks class NimbleBluetoothFromRadioCallback : public NimBLECharacteristicCallbacks { - virtual void onRead(NimBLECharacteristic *pCharacteristic) + virtual void onRead(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo) { uint8_t fromRadioBytes[meshtastic_FromRadio_size]; size_t numBytes = bluetoothPhoneAPI->getFromRadio(fromRadioBytes); @@ -79,7 +79,7 @@ class NimbleBluetoothFromRadioCallback : public NimBLECharacteristicCallbacks class NimbleBluetoothServerCallback : public NimBLEServerCallbacks { - virtual uint32_t onPassKeyRequest() + virtual uint32_t onPassKeyDisplay() { uint32_t passkey = config.bluetooth.fixed_pin; @@ -125,7 +125,7 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks return passkey; } - virtual void onAuthenticationComplete(ble_gap_conn_desc *desc) + virtual void onAuthenticationComplete(NimBLEConnInfo &connInfo) { LOG_INFO("BLE authentication complete"); @@ -138,9 +138,9 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks } } - virtual void onDisconnect(NimBLEServer *pServer, ble_gap_conn_desc *desc) + virtual void onDisconnect(NimBLEServer *pServer, NimBLEConnInfo &connInfo, int reason) { - LOG_INFO("BLE disconnect"); + LOG_INFO("BLE disconnect. Reason %i", reason); bluetoothStatus->updateStatus( new meshtastic::BluetoothStatus(meshtastic::BluetoothStatus::ConnectionState::DISCONNECTED)); @@ -191,7 +191,7 @@ int NimbleBluetooth::getRssi() if (bleServer && isConnected()) { auto service = bleServer->getServiceByUUID(MESH_SERVICE_UUID); uint16_t handle = service->getHandle(); - return NimBLEDevice::getClientByID(handle)->getRssi(); + return NimBLEDevice::getClientByHandle(handle)->getRssi(); } return 0; // FIXME figure out where to source this } @@ -216,6 +216,7 @@ void NimbleBluetooth::setup() NimbleBluetoothServerCallback *serverCallbacks = new NimbleBluetoothServerCallback(); bleServer->setCallbacks(serverCallbacks, true); + bleServer->advertiseOnDisconnect(true); setupService(); startAdvertising(); } @@ -259,7 +260,7 @@ void NimbleBluetooth::setupService() BatteryCharacteristic = batteryService->createCharacteristic( // 0x2A19 is the Battery Level characteristic) (uint16_t)0x2a19, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY, 1); - NimBLE2904 *batteryLevelDescriptor = (NimBLE2904 *)BatteryCharacteristic->createDescriptor((uint16_t)0x2904); + NimBLE2904 *batteryLevelDescriptor = (NimBLE2904 *)BatteryCharacteristic->create2904(); batteryLevelDescriptor->setFormat(NimBLE2904::FORMAT_UINT8); batteryLevelDescriptor->setNamespace(1); batteryLevelDescriptor->setUnit(0x27ad); From 74b3dc34e4e230193fa6e5bab9fd88fbce5d574b Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Fri, 18 Apr 2025 10:11:42 +1200 Subject: [PATCH 097/100] Fix crash when clearing NRF52 BLE bonds (#6609) * Fix crash before clearing BLE bonds * Prevent clients re-pairing BLE during factory reset Clients seem able to re-pair BLE after clearing bonds during factory reset, even after advertising disabled. This seems to primarily occur on Android devices, which seem to more actively maintain the BLE connection. As a workaround, `NRF52Bluetooth::shutdown` swaps the BLE pairing callback to one which actively rejects new connections. --------- Co-authored-by: Ben Meadors --- src/mesh/NodeDB.cpp | 1 - src/platform/nrf52/NRF52Bluetooth.cpp | 40 +++++++++++++++++++-------- src/platform/nrf52/NRF52Bluetooth.h | 3 ++ 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 90a90e89f..67f0da600 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -450,7 +450,6 @@ bool NodeDB::factoryReset(bool eraseBleBonds) nvs_flash_erase(); #endif #ifdef ARCH_NRF52 - Bluefruit.begin(); LOG_INFO("Clear bluetooth bonds!"); bond_print_list(BLE_GAP_ROLE_PERIPH); bond_print_list(BLE_GAP_ROLE_CENTRAL); diff --git a/src/platform/nrf52/NRF52Bluetooth.cpp b/src/platform/nrf52/NRF52Bluetooth.cpp index 87d8adfa9..4f6fe7c6b 100644 --- a/src/platform/nrf52/NRF52Bluetooth.cpp +++ b/src/platform/nrf52/NRF52Bluetooth.cpp @@ -210,17 +210,8 @@ void NRF52Bluetooth::shutdown() { // Shutdown bluetooth for minimum power draw LOG_INFO("Disable NRF52 bluetooth"); - uint8_t connection_num = Bluefruit.connected(); - if (connection_num) { - for (uint8_t i = 0; i < connection_num; i++) { - LOG_INFO("NRF52 bluetooth disconnecting handle %d", i); - Bluefruit.disconnect(i); - } - // Wait for disconnection - while (Bluefruit.connected()) - yield(); - LOG_INFO("All bluetooth connections ended"); - } + Bluefruit.Security.setPairPasskeyCallback(NRF52Bluetooth::onUnwantedPairing); // Actively refuse (during factory reset) + disconnect(); Bluefruit.Advertising.stop(); } void NRF52Bluetooth::startDisabled() @@ -372,6 +363,33 @@ bool NRF52Bluetooth::onPairingPasskey(uint16_t conn_handle, uint8_t const passke LOG_INFO("BLE passkey pair: match_request=%i", match_request); return true; } + +// Actively refuse new BLE pairings +// After clearing bonds (at factory reset), clients seem initially able to attempt to re-pair, even with advertising disabled. +// On NRF52Bluetooth::shutdown, we change the pairing callback to this method, to aggressively refuse any connection attempts. +bool NRF52Bluetooth::onUnwantedPairing(uint16_t conn_handle, uint8_t const passkey[6], bool match_request) +{ + NRF52Bluetooth::disconnect(); + return false; +} + +// Disconnect any BLE connections +void NRF52Bluetooth::disconnect() +{ + uint8_t connection_num = Bluefruit.connected(); + if (connection_num) { + // Close all connections. We're only expecting one. + for (uint8_t i = 0; i < connection_num; i++) + Bluefruit.disconnect(i); + + // Wait for disconnection + while (Bluefruit.connected()) + yield(); + + LOG_INFO("Ended BLE connection"); + } +} + void NRF52Bluetooth::onPairingCompleted(uint16_t conn_handle, uint8_t auth_status) { if (auth_status == BLE_GAP_SEC_STATUS_SUCCESS) { diff --git a/src/platform/nrf52/NRF52Bluetooth.h b/src/platform/nrf52/NRF52Bluetooth.h index 2229163f8..630ab05bc 100644 --- a/src/platform/nrf52/NRF52Bluetooth.h +++ b/src/platform/nrf52/NRF52Bluetooth.h @@ -19,4 +19,7 @@ class NRF52Bluetooth : BluetoothApi static void onConnectionSecured(uint16_t conn_handle); static bool onPairingPasskey(uint16_t conn_handle, uint8_t const passkey[6], bool match_request); static void onPairingCompleted(uint16_t conn_handle, uint8_t auth_status); + + static bool onUnwantedPairing(uint16_t conn_handle, uint8_t const passkey[6], bool match_request); + static void disconnect(); }; \ No newline at end of file From 9da141aa8c062bfb3664214d0945fb95b6a44e8a Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 18 Apr 2025 08:27:38 -0400 Subject: [PATCH 098/100] Add TFT docker builds (for CI) (#6614) --- .github/workflows/docker_build.yml | 7 +++++++ .github/workflows/main_matrix.yml | 26 ++++++++++++++++++++++---- Dockerfile | 13 ++++++++----- alpine.Dockerfile | 6 ++++-- bin/build-native.sh | 7 ++++--- 5 files changed, 45 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index eec0785c0..cde7fd274 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -26,6 +26,11 @@ on: required: false type: boolean default: false + pio_env: + description: PlatformIO environment to build + required: false + type: string + default: native outputs: digest: description: Digest of built image @@ -90,3 +95,5 @@ jobs: push: ${{ inputs.push }} tags: ${{ steps.meta.outputs.tags }} # Tag is only meant to be consumed by the "manifest" job platforms: ${{ inputs.platform }} + build-args: | + PIO_ENV=${{ inputs.pio_env }} diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 5b11926f2..0889ce22e 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -145,7 +145,7 @@ jobs: test-native: uses: ./.github/workflows/test_native.yml - docker-debian-amd64: + docker-deb-amd64: uses: ./.github/workflows/docker_build.yml with: distro: debian @@ -153,7 +153,16 @@ jobs: runs-on: ubuntu-24.04 push: false - docker-alpine-amd64: + docker-deb-amd64-tft: + uses: ./.github/workflows/docker_build.yml + with: + distro: debian + platform: linux/amd64 + runs-on: ubuntu-24.04 + push: false + pio_env: native-tft + + docker-alp-amd64: uses: ./.github/workflows/docker_build.yml with: distro: alpine @@ -161,7 +170,16 @@ jobs: runs-on: ubuntu-24.04 push: false - docker-debian-arm64: + docker-alp-amd64-tft: + uses: ./.github/workflows/docker_build.yml + with: + distro: alpine + platform: linux/amd64 + runs-on: ubuntu-24.04 + push: false + pio_env: native-tft + + docker-deb-arm64: uses: ./.github/workflows/docker_build.yml with: distro: debian @@ -169,7 +187,7 @@ jobs: runs-on: ubuntu-24.04-arm push: false - docker-debian-armv7: + docker-deb-armv7: uses: ./.github/workflows/docker_build.yml with: distro: debian diff --git a/Dockerfile b/Dockerfile index 55580c579..be192f216 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # trunk-ignore-all(terrascan/AC_DOCKER_0002): Known terrascan issue # trunk-ignore-all(trivy/DS002): We must run as root for this container -# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions +ARG PIO_ENV=native FROM python:3.13-bookworm AS builder ENV DEBIAN_FRONTEND=noninteractive @@ -12,9 +12,10 @@ ENV TZ=Etc/UTC # Install Dependencies ENV PIP_ROOT_USER_ACTION=ignore RUN apt-get update && apt-get install --no-install-recommends -y \ - curl wget g++ zip git ca-certificates \ + curl wget g++ zip git ca-certificates pkg-config \ libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \ - libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev pkg-config \ + libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev \ + libx11-dev libinput-dev libxkbcommon-x11-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* \ && pip install --no-cache-dir -U platformio \ && mkdir /tmp/firmware @@ -24,7 +25,7 @@ WORKDIR /tmp/firmware COPY . /tmp/firmware # Build -RUN bash ./bin/build-native.sh && \ +RUN bash ./bin/build-native.sh "$PIO_ENV" && \ cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd" # Fetch web assets @@ -44,7 +45,9 @@ ENV TZ=Etc/UTC USER root RUN apt-get update && apt-get --no-install-recommends -y install \ - libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libuv1 libusb-1.0-0-dev liborcania2.3 libulfius2.7 libssl3 \ + libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libuv1 libusb-1.0-0-dev \ + liborcania2.3 libulfius2.7 libssl3 \ + libx11-6 libinput10 libxkbcommon-x11-0 \ && apt-get clean && rm -rf /var/lib/apt/lists/* \ && mkdir -p /var/lib/meshtasticd \ && mkdir -p /etc/meshtasticd/config.d \ diff --git a/alpine.Dockerfile b/alpine.Dockerfile index 17afc2964..f85c147da 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -1,8 +1,8 @@ # trunk-ignore-all(trivy/DS002): We must run as root for this container -# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions +ARG PIO_ENV=native FROM python:3.13-alpine3.21 AS builder @@ -10,6 +10,7 @@ ENV PIP_ROOT_USER_ACTION=ignore RUN apk --no-cache add \ bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \ libusb-dev i2c-tools-dev libuv-dev openssl-dev pkgconf argp-standalone \ + libx11-dev libinput-dev libxkbcommon-dev \ && rm -rf /var/cache/apk/* \ && pip install --no-cache-dir -U platformio \ && mkdir /tmp/firmware @@ -21,7 +22,7 @@ COPY . /tmp/firmware # Add `argp` for musl ENV PLATFORMIO_BUILD_FLAGS="-Os -ffunction-sections -fdata-sections -Wl,--gc-sections -largp" -RUN bash ./bin/build-native.sh && \ +RUN bash ./bin/build-native.sh "$PIO_ENV" && \ cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd" # ##### PRODUCTION BUILD ############# @@ -33,6 +34,7 @@ USER root RUN apk --no-cache add \ libstdc++ libgpiod yaml-cpp libusb i2c-tools libuv \ + libx11 libinput libxkbcommon \ && rm -rf /var/cache/apk/* \ && mkdir -p /var/lib/meshtasticd \ && mkdir -p /etc/meshtasticd/config.d \ diff --git a/bin/build-native.sh b/bin/build-native.sh index c6b1434dd..51379ad76 100755 --- a/bin/build-native.sh +++ b/bin/build-native.sh @@ -15,6 +15,7 @@ platformioFailed() { VERSION=$(bin/buildinfo.py long) SHORT_VERSION=$(bin/buildinfo.py short) +PIO_ENV=${1:-native} OUTDIR=release/ @@ -24,7 +25,7 @@ mkdir -p $OUTDIR/ rm -r $OUTDIR/* || true # Important to pull latest version of libs into all device flavors, otherwise some devices might be stale -pio pkg update --environment native || platformioFailed -pio run --environment native || platformioFailed -cp .pio/build/native/program "$OUTDIR/meshtasticd_linux_$(uname -m)" +pio pkg update --environment "$PIO_ENV" || platformioFailed +pio run --environment "$PIO_ENV" || platformioFailed +cp ".pio/build/$PIO_ENV/program" "$OUTDIR/meshtasticd_linux_$(uname -m)" cp bin/native-install.* $OUTDIR From 64a1cd3f99ca39f08f302b0cecd6b6aa0fdf4231 Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 18 Apr 2025 10:29:39 -0400 Subject: [PATCH 099/100] Docker is fun (#6623) --- Dockerfile | 2 +- alpine.Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index be192f216..6c1b83653 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions -ARG PIO_ENV=native FROM python:3.13-bookworm AS builder +ARG PIO_ENV=native ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC diff --git a/alpine.Dockerfile b/alpine.Dockerfile index f85c147da..f4a95095d 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -2,11 +2,11 @@ # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions -ARG PIO_ENV=native FROM python:3.13-alpine3.21 AS builder - +ARG PIO_ENV=native ENV PIP_ROOT_USER_ACTION=ignore + RUN apk --no-cache add \ bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \ libusb-dev i2c-tools-dev libuv-dev openssl-dev pkgconf argp-standalone \ From 5ab1db01420210896082eb4fcc2be741a23b1d70 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 09:36:23 -0500 Subject: [PATCH 100/100] chore(deps): update meshtastic-device-ui digest to 65eb74f (#6624) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 85505d63a..f0756cb89 100644 --- a/platformio.ini +++ b/platformio.ini @@ -108,7 +108,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic-device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/da8fb5eaac7874c31508fad5252999ec82c02498.zip + https://github.com/meshtastic/device-ui/archive/65eb74fadf373e3ceec0bddb95a7cb978e2acd81.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino)