jgromes / RadioLib

Universal wireless communication library for embedded devices
https://jgromes.github.io/RadioLib/
MIT License
1.54k stars 384 forks source link

SX1267 doesn't update _freq #253

Closed HamzaHajeir closed 3 years ago

HamzaHajeir commented 3 years ago

Hi

Investigating (again) in the difference between SX1278 and SX1276 implementations (please tell me). to mimic the change to the other library that's used in STM32CubeIDE.

I saw something that could go wrong : SX1276.cpp :: 120.

It only returns the state of setFrequencyRaw(); while the code in SX1278.cpp updates the class field _freq with new one.

I think it's a wrong behavior since the parent's SX1278::getRSSI() checks for the frequency, While SX1278 operates on a lower frequencies, SX1276 operates on higher frequencies too.

Is that missed ?

Thanks

jgromes commented 3 years ago

Yet another good catch, many thanks! You're right, that is indeed missing, for all classes derived from SX1278 in fact. Will fix ASAP.

jgromes commented 3 years ago

Should be fixed now for SX1276/77/79 as well as RFM95/96, thanks for reporting!

HamzaHajeir commented 3 years ago

You're welcomed ;)