mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-07 20:19:25 +00:00
Compare commits
3 Commits
e866734a25
...
ea150c32f3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ea150c32f3 | ||
![]() |
ac804818de | ||
![]() |
8fcfe7f28b |
@ -271,7 +271,7 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
||||
config.power.adc_multiplier_override > 0 ? config.power.adc_multiplier_override : ADC_MULTIPLIER;
|
||||
// Do not call analogRead() often.
|
||||
const uint32_t min_read_interval = 5000;
|
||||
if (!Throttle::isWithinTimespanMs(last_read_time_ms, min_read_interval)) {
|
||||
if (!initial_read_done || !Throttle::isWithinTimespanMs(last_read_time_ms, min_read_interval)) {
|
||||
last_read_time_ms = millis();
|
||||
|
||||
uint32_t raw = 0;
|
||||
|
@ -20,8 +20,12 @@
|
||||
|
||||
/// max number of nodes allowed in the mesh
|
||||
#ifndef MAX_NUM_NODES
|
||||
#ifdef ARCH_NRF52
|
||||
#define MAX_NUM_NODES 80
|
||||
#else
|
||||
#define MAX_NUM_NODES 100
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/// Max number of channels allowed
|
||||
#define MAX_NUM_CHANNELS (member_size(meshtastic_ChannelFile, channels) / member_size(meshtastic_ChannelFile, channels[0]))
|
||||
|
@ -526,6 +526,11 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
||||
requiresReboot = false;
|
||||
}
|
||||
config.power = c.payload_variant.power;
|
||||
if (c.payload_variant.power.on_battery_shutdown_after_secs > 0 &&
|
||||
c.payload_variant.power.on_battery_shutdown_after_secs < 30) {
|
||||
LOG_WARN("Tried to set on_battery_shutdown_after_secs too low, set to min 30 seconds");
|
||||
config.power.on_battery_shutdown_after_secs = 30;
|
||||
}
|
||||
break;
|
||||
case meshtastic_Config_network_tag:
|
||||
LOG_INFO("Set config: WiFi");
|
||||
|
Loading…
Reference in New Issue
Block a user