mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-30 14:40:40 +00:00
Merge branch 'master' into nomad-gemini
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -119,12 +119,13 @@ int32_t ExternalNotificationModule::runOnce()
|
||||
if (externalTurnedOn[1] + (moduleConfig.external_notification.output_ms ? moduleConfig.external_notification.output_ms
|
||||
: EXT_NOTIFICATION_MODULE_OUTPUT_MS) <
|
||||
millis()) {
|
||||
setExternalState(0, !getExternal(1));
|
||||
setExternalState(1, !getExternal(1));
|
||||
}
|
||||
if (externalTurnedOn[2] + (moduleConfig.external_notification.output_ms ? moduleConfig.external_notification.output_ms
|
||||
: EXT_NOTIFICATION_MODULE_OUTPUT_MS) <
|
||||
millis()) {
|
||||
setExternalState(0, !getExternal(2));
|
||||
LOG_DEBUG("EXTERNAL 2 %d compared to %d", externalTurnedOn[2]+moduleConfig.external_notification.output_ms, millis());
|
||||
setExternalState(2, !getExternal(2));
|
||||
}
|
||||
#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE)
|
||||
red = (colorState & 4) ? brightnessValues[brightnessIndex] : 0; // Red enabled on colorState = 4,5,6,7
|
||||
|
||||
Reference in New Issue
Block a user