Compare commits

..

1 Commits

Author SHA1 Message Date
Tom Fifield
1e69a20934
Merge 0a5263a4aa into 25a19b49ad 2025-08-27 20:56:42 +00:00

View File

@ -45,7 +45,7 @@
*/ */
#ifdef HELTEC_MESH_SOLAR #ifdef HELTEC_MESH_SOLAR
#include "meshSolarApp.h" #include "meshSolarApp.h"
#endif #endif
@ -63,8 +63,9 @@
SerialModule *serialModule; SerialModule *serialModule;
SerialModuleRadio *serialModuleRadio; SerialModuleRadio *serialModuleRadio;
#if defined(TTGO_T_ECHO) || defined(CANARYONE) || defined(MESHLINK) || defined(ELECROW_ThinkNode_M1) || \ #if defined(TTGO_T_ECHO) || defined(CANARYONE) || defined(MESHLINK) || defined(ELECROW_ThinkNode_M1) || \
defined(ELECROW_ThinkNode_M5) || defined(HELTEC_MESH_SOLAR) || defined(T_ECHO_LITE) defined(ELECROW_ThinkNode_M5) || defined(HELTEC_MESH_SOLAR)
SerialModule::SerialModule() : StreamAPI(&Serial), concurrency::OSThread("Serial") {} SerialModule::SerialModule() : StreamAPI(&Serial), concurrency::OSThread("Serial") {}
static Print *serialPrint = &Serial; static Print *serialPrint = &Serial;
#elif defined(CONFIG_IDF_TARGET_ESP32C6) #elif defined(CONFIG_IDF_TARGET_ESP32C6)
@ -82,7 +83,7 @@ bool SerialModule::isValidConfig(const meshtastic_ModuleConfig_SerialConfig &con
{ {
if (config.override_console_serial_port && !IS_ONE_OF(config.mode, meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA, if (config.override_console_serial_port && !IS_ONE_OF(config.mode, meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA,
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO, meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO,
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG)) { meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG)) {
const char *warning = const char *warning =
"Invalid Serial config: override console serial port is only supported in NMEA and CalTopo output-only modes."; "Invalid Serial config: override console serial port is only supported in NMEA and CalTopo output-only modes.";
LOG_ERROR(warning); LOG_ERROR(warning);
@ -248,11 +249,11 @@ int32_t SerialModule::runOnce()
} }
#if defined(HELTEC_MESH_SOLAR) #if defined(HELTEC_MESH_SOLAR)
else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG)) { else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG)) {
serialPayloadSize = Serial.readBytes(serialBytes, sizeof(serialBytes) - 1); serialPayloadSize = Serial.readBytes(serialBytes, sizeof(serialBytes)-1);
// If the parsing fails, the following parsing will be performed. //If the parsing fails, the following parsing will be performed.
if ((serialPayloadSize > 0) && (meshSolarCmdHandle(serialBytes) != 0)) { if((serialPayloadSize > 0) && (meshSolarCmdHandle(serialBytes)!=0)) {
return runOncePart(serialBytes, serialPayloadSize); return runOncePart(serialBytes,serialPayloadSize);
} }
} }
#endif #endif
else { else {