mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-05 14:35:52 +00:00
Compare commits
No commits in common. "390b9df25b7f138d7799d5b961d56861749772d8" and "c4ca1c4941425203314b7b12ec917cdd4174a1d1" have entirely different histories.
390b9df25b
...
c4ca1c4941
@ -1 +1 @@
|
|||||||
Subproject commit 27fac39141d99fe727a0a1824c5397409b1aea75
|
Subproject commit b982b36dfab2e96b8f8be90af891c68ebf8790c2
|
@ -19,7 +19,7 @@
|
|||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
#include "target_specific.h"
|
#include "target_specific.h"
|
||||||
|
|
||||||
#if HAS_WIFI && !defined(ARCH_PORTDUINO) || defined(MESHTASTIC_EXCLUDE_WIFI)
|
#if HAS_WIFI && !defined(ARCH_PORTDUINO)
|
||||||
#include "mesh/wifi/WiFiAPClient.h"
|
#include "mesh/wifi/WiFiAPClient.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -269,6 +269,9 @@ Fsm powerFSM(&stateBOOT);
|
|||||||
void PowerFSM_setup()
|
void PowerFSM_setup()
|
||||||
{
|
{
|
||||||
bool isRouter = (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ? 1 : 0);
|
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();
|
bool hasPower = isPowered();
|
||||||
|
|
||||||
LOG_INFO("PowerFSM init, USB power=%d", hasPower ? 1 : 0);
|
LOG_INFO("PowerFSM init, USB power=%d", hasPower ? 1 : 0);
|
||||||
@ -380,12 +383,6 @@ void PowerFSM_setup()
|
|||||||
// See: https://github.com/meshtastic/firmware/issues/1071
|
// 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
|
// 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
|
// 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) {
|
if ((isRouter || config.power.is_power_saving) && !isWifiAvailable() && !isTrackerOrSensor) {
|
||||||
powerFSM.add_timed_transition(&stateNB, &stateLS,
|
powerFSM.add_timed_transition(&stateNB, &stateLS,
|
||||||
Default::getConfiguredOrDefaultMs(config.power.min_wake_secs, default_min_wake_secs), NULL,
|
Default::getConfiguredOrDefaultMs(config.power.min_wake_secs, default_min_wake_secs), NULL,
|
||||||
@ -403,9 +400,7 @@ void PowerFSM_setup()
|
|||||||
Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs),
|
Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs),
|
||||||
NULL, "Screen-on timeout");
|
NULL, "Screen-on timeout");
|
||||||
}
|
}
|
||||||
#endif // HAS_WIFI || !defined(MESHTASTIC_EXCLUDE_WIFI)
|
#else
|
||||||
|
|
||||||
#else // (not) ARCH_ESP32
|
|
||||||
// If not ESP32, light-sleep not used. Check periodically if config has drifted out of stateDark
|
// If not ESP32, light-sleep not used. Check periodically if config has drifted out of stateDark
|
||||||
powerFSM.add_timed_transition(&stateDARK, &stateDARK,
|
powerFSM.add_timed_transition(&stateDARK, &stateDARK,
|
||||||
Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), NULL,
|
Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), NULL,
|
||||||
|
@ -243,10 +243,6 @@ typedef enum _meshtastic_HardwareModel {
|
|||||||
meshtastic_HardwareModel_HELTEC_MESH_POCKET = 94,
|
meshtastic_HardwareModel_HELTEC_MESH_POCKET = 94,
|
||||||
/* Seeed Solar Node */
|
/* Seeed Solar Node */
|
||||||
meshtastic_HardwareModel_SEEED_SOLAR_NODE = 95,
|
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.
|
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.
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||||
|
@ -182,8 +182,6 @@
|
|||||||
#define HW_VENDOR meshtastic_HardwareModel_T_ETH_ELITE
|
#define HW_VENDOR meshtastic_HardwareModel_T_ETH_ELITE
|
||||||
#elif defined(HELTEC_SENSOR_HUB)
|
#elif defined(HELTEC_SENSOR_HUB)
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_SENSOR_HUB
|
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_SENSOR_HUB
|
||||||
#elif defined(ELECROW_PANEL)
|
|
||||||
#define HW_VENDOR meshtastic_HardwareModel_CROWPANEL
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@ -8,7 +8,7 @@ board_build.partitions = default_16MB.csv ; must be here for some reason, board.
|
|||||||
build_flags = ${esp32s3_base.build_flags} -Os
|
build_flags = ${esp32s3_base.build_flags} -Os
|
||||||
-I variants/elecrow_panel
|
-I variants/elecrow_panel
|
||||||
-D ELECROW
|
-D ELECROW
|
||||||
-D ELECROW_PANEL
|
-D PRIVATE_HW
|
||||||
-D CONFIG_ARDUHAL_LOG_COLORS
|
-D CONFIG_ARDUHAL_LOG_COLORS
|
||||||
-D RADIOLIB_DEBUG_SPI=0
|
-D RADIOLIB_DEBUG_SPI=0
|
||||||
-D RADIOLIB_DEBUG_PROTOCOL=0
|
-D RADIOLIB_DEBUG_PROTOCOL=0
|
||||||
|
Loading…
Reference in New Issue
Block a user