From 8030080c1972dc37c0f106e91a197e173e6004e5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 12 Dec 2023 11:52:24 -0500 Subject: [PATCH] Update rpitx.py formatting of tx and rx frequency --- rpitx.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/rpitx.py b/rpitx.py index 2197c7bf..82c94710 100644 --- a/rpitx.py +++ b/rpitx.py @@ -279,13 +279,21 @@ if __name__ == "__main__": else: sq = '0' if len(config) > 6: - tx = config[6] - print(tx) +# tx = config[6] + txf = float(config[6]) + print(txf) +# print( "{:.4f}".format(txf)) + tx = "{:.4f}".format(txf) + print(tx) else: tx = '434.9000' if len(config) > 7: - rx = config[7] - print(rx) +# rx = config[7] + rxf = float(config[7]) + print(rxf) +# print( "{:.4f}".format(rxf)) + rx = "{:.4f}".format(rxf) + print(rx) else: rx = '435.0000' print(config)