Skip to content

Commit 834c3c5

Browse files
committed
Add this back in
1 parent 25a19b4 commit 834c3c5

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/modules/SerialModule.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
4646
4747
*/
48-
#ifdef HELTEC_MESH_SOLAR
48+
#ifdef HELTEC_MESH_SOLAR
4949
#include "meshSolarApp.h"
5050
#endif
5151

@@ -63,9 +63,8 @@
6363
SerialModule *serialModule;
6464
SerialModuleRadio *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)
6968
SerialModule::SerialModule() : StreamAPI(&Serial), concurrency::OSThread("Serial") {}
7069
static 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

Comments
 (0)