DIO3_TCXO_VOLTAGE in config.yaml can now take an exact voltage (#5558)

This commit is contained in:
Jonathan Bennett
2024-12-13 11:48:27 -06:00
committed by GitHub
parent 03770b799f
commit 92225eb6c3
3 changed files with 8 additions and 5 deletions

View File

@@ -50,9 +50,7 @@ template <typename T> bool SX126xInterface<T>::init()
#endif
#if ARCH_PORTDUINO
float tcxoVoltage = 0;
if (settingsMap[dio3_tcxo_voltage])
tcxoVoltage = 1.8;
float tcxoVoltage = (float)settingsMap[dio3_tcxo_voltage] / 1000;
if (settingsMap[sx126x_ant_sw] != RADIOLIB_NC) {
digitalWrite(settingsMap[sx126x_ant_sw], HIGH);
pinMode(settingsMap[sx126x_ant_sw], OUTPUT);