diff --git a/ELECHOUSE_CC1101_SRC_DRV.cpp b/ELECHOUSE_CC1101_SRC_DRV.cpp index 01fd172..2396fcc 100644 --- a/ELECHOUSE_CC1101_SRC_DRV.cpp +++ b/ELECHOUSE_CC1101_SRC_DRV.cpp @@ -971,12 +971,10 @@ void ELECHOUSE_CC1101::RegConfigSettings(void) ****************************************************************/ void ELECHOUSE_CC1101::SetTx(void) { - if(trxstate!=1){ SpiStrobe(CC1101_SIDLE); SpiStrobe(CC1101_STX); //start send trxstate=1; } -} /**************************************************************** *FUNCTION NAME:SetRx *FUNCTION :set CC1101 to receive state @@ -985,11 +983,10 @@ void ELECHOUSE_CC1101::SetTx(void) ****************************************************************/ void ELECHOUSE_CC1101::SetRx(void) { - if(trxstate!=2){ + SpiStrobe(CC1101_SIDLE); SpiStrobe(CC1101_SRX); //start receive trxstate=2; } -} /**************************************************************** *FUNCTION NAME:SetTx *FUNCTION :set CC1101 send data and change frequency @@ -998,13 +995,11 @@ void ELECHOUSE_CC1101::SetRx(void) ****************************************************************/ void ELECHOUSE_CC1101::SetTx(float mhz) { - setMHZ(mhz); - if(trxstate!=1){ SpiStrobe(CC1101_SIDLE); + setMHZ(mhz); SpiStrobe(CC1101_STX); //start send trxstate=1; } -} /**************************************************************** *FUNCTION NAME:SetRx *FUNCTION :set CC1101 to receive state and change frequency @@ -1013,12 +1008,11 @@ void ELECHOUSE_CC1101::SetTx(float mhz) ****************************************************************/ void ELECHOUSE_CC1101::SetRx(float mhz) { + SpiStrobe(CC1101_SIDLE); setMHZ(mhz); - if(trxstate!=2){ SpiStrobe(CC1101_SRX); //start receive trxstate=2; } -} /**************************************************************** *FUNCTION NAME:RSSI Level *FUNCTION :Calculating the RSSI Level diff --git a/README.md b/README.md index 87aa27f..67f2967 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SmartRC-CC1101-Driver-Lib_V2.5.3 +# SmartRC-CC1101-Driver-Lib_V2.5.4 Note: Find out about the laws in your country. Use at your own risk. @@ -132,6 +132,15 @@ https://www.paypal.me/LittleSatan666 Thank You! +--------------------------------------------- +Changelog: SmartRC-CC1101-Driver-Lib_V2.5.4 +--------------------------------------------- +23.01.2021 + +Driver Library :No big frequency jumps over SetRx(freq); Possible. Fixed! Big thanks to NorthernMan54 for testing! + +Driver Library :double-initaliesing option from V2.5.3 has been removed. Necessary for SetRx(freq); to use. + --------------------------------------------- Changelog: SmartRC-CC1101-Driver-Lib_V2.5.3 --------------------------------------------- diff --git a/library.json b/library.json index a4c4909..02ceec6 100644 --- a/library.json +++ b/library.json @@ -11,7 +11,7 @@ "type": "git", "url": "https://github.com/LSatan/SmartRC-CC1101-Driver-Lib" }, - "version": "2.5.3", + "version": "2.5.4", "frameworks": [ "arduino" ], diff --git a/library.properties b/library.properties index b9c827e..60d0861 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SmartRC-CC1101-Driver-Lib -version=2.5.3 +version=2.5.4 author=LSatan maintainer=LSatan sentence=Driver for cc1101.