From a36f21b29ae22b5c1476277aa3b9768460cd7642 Mon Sep 17 00:00:00 2001 From: Benjamin Kyd Date: Thu, 17 Apr 2025 10:36:19 +0100 Subject: [PATCH 1/2] 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 2/2] [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. ------------------------------------------------------------------------------------------------------------------------------------------ */