mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-19 09:51:30 +10:00
Update Radiomaster target
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "Throttle.h"
|
||||
#include "configuration.h"
|
||||
#include "error.h"
|
||||
#include "main.h"
|
||||
#include "mesh/NodeDB.h"
|
||||
#ifdef LR11X0_DIO_AS_RF_SWITCH
|
||||
#include "rfswitch.h"
|
||||
@@ -48,6 +49,8 @@ template <typename T> bool LR11x0Interface<T>::init()
|
||||
digitalWrite(LR11X0_POWER_EN, HIGH);
|
||||
#endif
|
||||
|
||||
enableFan();
|
||||
|
||||
// FIXME: correct logic to default to not using TCXO if no voltage is specified for LR11x0_DIO3_TCXO_VOLTAGE
|
||||
#if !defined(LR11X0_DIO3_TCXO_VOLTAGE)
|
||||
float tcxoVoltage =
|
||||
@@ -275,6 +278,19 @@ template <typename T> bool LR11x0Interface<T>::isActivelyReceiving()
|
||||
RADIOLIB_LR11X0_IRQ_PREAMBLE_DETECTED);
|
||||
}
|
||||
|
||||
template <typename T> void LR11x0Interface<T>::regulateFan()
|
||||
{
|
||||
float *pa_temp = 0;
|
||||
lora.getTemp(pa_temp);
|
||||
if (*pa_temp > 40) {
|
||||
pa_fan_percentage = max(pa_fan_percentage + 1, 100);
|
||||
enableFan();
|
||||
} else {
|
||||
pa_fan_percentage = max(pa_fan_percentage - 1, 100);
|
||||
enableFan();
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T> bool LR11x0Interface<T>::sleep()
|
||||
{
|
||||
// \todo Display actual typename of the adapter, not just `LR11x0`
|
||||
|
||||
Reference in New Issue
Block a user