4545
4646
4747*/
48- #ifdef HELTEC_MESH_SOLAR
48+ #ifdef HELTEC_MESH_SOLAR
4949#include " meshSolarApp.h"
5050#endif
5151
6363SerialModule *serialModule;
6464SerialModuleRadio *serialModuleRadio;
6565
66-
6766#if defined(TTGO_T_ECHO) || defined(CANARYONE) || defined(MESHLINK) || defined(ELECROW_ThinkNode_M1) || \
68- defined (ELECROW_ThinkNode_M5) || defined(HELTEC_MESH_SOLAR)
67+ defined (ELECROW_ThinkNode_M5) || defined(HELTEC_MESH_SOLAR) || defined(T_ECHO_LITE)
6968SerialModule::SerialModule() : StreamAPI(&Serial), concurrency::OSThread(" Serial" ) {}
7069static Print *serialPrint = &Serial;
7170#elif defined(CONFIG_IDF_TARGET_ESP32C6)
@@ -83,7 +82,7 @@ bool SerialModule::isValidConfig(const meshtastic_ModuleConfig_SerialConfig &con
8382{
8483 if (config.override_console_serial_port && !IS_ONE_OF (config.mode , meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA,
8584 meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO,
86- meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG)) {
85+ meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG)) {
8786 const char *warning =
8887 " Invalid Serial config: override console serial port is only supported in NMEA and CalTopo output-only modes." ;
8988 LOG_ERROR (warning);
@@ -249,11 +248,11 @@ int32_t SerialModule::runOnce()
249248 }
250249#if defined(HELTEC_MESH_SOLAR)
251250 else if ((moduleConfig.serial .mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG)) {
252- serialPayloadSize = Serial.readBytes (serialBytes, sizeof (serialBytes)- 1 );
253- // If the parsing fails, the following parsing will be performed.
254- if ((serialPayloadSize > 0 ) && (meshSolarCmdHandle (serialBytes)!= 0 )) {
255- return runOncePart (serialBytes,serialPayloadSize);
256- }
251+ serialPayloadSize = Serial.readBytes (serialBytes, sizeof (serialBytes) - 1 );
252+ // If the parsing fails, the following parsing will be performed.
253+ if ((serialPayloadSize > 0 ) && (meshSolarCmdHandle (serialBytes) != 0 )) {
254+ return runOncePart (serialBytes, serialPayloadSize);
255+ }
257256 }
258257#endif
259258 else {
0 commit comments