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 + "<<")