mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-15 09:45:06 +00:00
PA FAN Disable (#4355)
* PA FAN Disable * PA FAN Disable * Trunk * Trunk * Trunk * Thunk .....
This commit is contained in:
parent
93ba19d1e1
commit
1951569b1a
@ -973,6 +973,13 @@ void setup()
|
|||||||
mqttInit();
|
mqttInit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RF95_FAN_EN
|
||||||
|
// Ability to disable FAN if PIN has been set with RF95_FAN_EN.
|
||||||
|
// Make sure LoRa has been started before disabling FAN.
|
||||||
|
if (config.lora.pa_fan_disabled)
|
||||||
|
digitalWrite(RF95_FAN_EN, LOW ^ 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef ARCH_PORTDUINO
|
#ifndef ARCH_PORTDUINO
|
||||||
|
|
||||||
// Initialize Wifi
|
// Initialize Wifi
|
||||||
@ -1087,4 +1094,4 @@ void loop()
|
|||||||
mainDelay.delay(delayMsec);
|
mainDelay.delay(delayMsec);
|
||||||
}
|
}
|
||||||
// if (didWake) LOG_DEBUG("wake!\n");
|
// if (didWake) LOG_DEBUG("wake!\n");
|
||||||
}
|
}
|
||||||
|
@ -466,6 +466,15 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
|||||||
config.lora.sx126x_rx_boosted_gain == c.payload_variant.lora.sx126x_rx_boosted_gain) {
|
config.lora.sx126x_rx_boosted_gain == c.payload_variant.lora.sx126x_rx_boosted_gain) {
|
||||||
requiresReboot = false;
|
requiresReboot = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RF95_FAN_EN
|
||||||
|
// Turn PA off if disabled by config
|
||||||
|
if (c.payload_variant.lora.pa_fan_disabled) {
|
||||||
|
digitalWrite(RF95_FAN_EN, LOW ^ 0);
|
||||||
|
} else {
|
||||||
|
digitalWrite(RF95_FAN_EN, HIGH ^ 0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
config.lora = c.payload_variant.lora;
|
config.lora = c.payload_variant.lora;
|
||||||
// If we're setting region for the first time, init the region
|
// If we're setting region for the first time, init the region
|
||||||
if (isRegionUnset && config.lora.region > meshtastic_Config_LoRaConfig_RegionCode_UNSET) {
|
if (isRegionUnset && config.lora.region > meshtastic_Config_LoRaConfig_RegionCode_UNSET) {
|
||||||
@ -877,4 +886,4 @@ AdminModule::AdminModule() : ProtobufModule("Admin", meshtastic_PortNum_ADMIN_AP
|
|||||||
{
|
{
|
||||||
// restrict to the admin channel for rx
|
// restrict to the admin channel for rx
|
||||||
boundChannel = Channels::adminChannel;
|
boundChannel = Channels::adminChannel;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user