From da97fdc337b64743eb70cf7d02daf7155ae5002e Mon Sep 17 00:00:00 2001 From: "S. Seegel" Date: Sun, 19 Mar 2017 20:48:46 +0100 Subject: [PATCH] added new options --- rfm69.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/rfm69.py b/rfm69.py index 7273d96..5d3f225 100644 --- a/rfm69.py +++ b/rfm69.py @@ -119,7 +119,7 @@ class Rfm69: config[RegPacketConfig2] = 0 #1< 32) and (e < 7): + e += 1 + RxBw /= 2 + RxBw = RxBw / 4 - 4 + RxBw = max(RxBw, 0) + m = int(RxBw) + self.__SetReg(RegAfcBw, 0x1F, m<<3 | e) + elif key == "Preamble": self.__WriteRegWord(RegPreambleMsb, value) @@ -230,6 +241,9 @@ class Rfm69: elif key == "Dagc": self.__WriteReg(RegDagc, value) + elif key == "AfcFei": + self.__WriteReg(RegAfcFei, value) + else: print("Unrecognized option >>" + key + "<<")