Add support for DIO3 TCXO configuration in radio settings and management script

This commit is contained in:
Lloyd
2025-11-15 00:41:41 +00:00
parent d266a18795
commit 600a18c076
4 changed files with 144 additions and 46 deletions

View File

@@ -217,6 +217,7 @@ else
tx_power=$(echo "$hw_config" | jq -r '.tx_power // empty')
preamble_length=$(echo "$hw_config" | jq -r '.preamble_length // empty')
is_waveshare=$(echo "$hw_config" | jq -r '.is_waveshare // empty')
use_dio3_tcxo=$(echo "$hw_config" | jq -r '.use_dio3_tcxo // empty')
# Update sx1262 section in config.yaml (2-space indentation)
[ -n "$bus_id" ] && sed "${SED_OPTS[@]}" "s/^ bus_id:.*/ bus_id: $bus_id/" "$CONFIG_FILE"
@@ -236,6 +237,13 @@ else
else
sed "${SED_OPTS[@]}" "s/^ is_waveshare:.*/ is_waveshare: false/" "$CONFIG_FILE"
fi
# Update use_dio3_tcxo flag
if [ "$use_dio3_tcxo" == "true" ]; then
sed "${SED_OPTS[@]}" "s/^ use_dio3_tcxo:.*/ use_dio3_tcxo: true/" "$CONFIG_FILE"
elif [ "$use_dio3_tcxo" == "false" ]; then
sed "${SED_OPTS[@]}" "s/^ use_dio3_tcxo:.*/ use_dio3_tcxo: false/" "$CONFIG_FILE"
fi
fi
# Cleanup
@@ -263,6 +271,7 @@ if [ -n "$bus_id" ]; then
echo " TX Power: $tx_power dBm"
echo " Preamble Length: $preamble_length"
[ -n "$is_waveshare" ] && echo " Waveshare: $is_waveshare"
[ -n "$use_dio3_tcxo" ] && echo " Use DIO3 TCXO: $use_dio3_tcxo"
fi
# Enable and start the service