Skip to content

Commit

Permalink
[CC1101] Fixed incorrect fabs brackets (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Mar 9, 2022
1 parent 2e7067d commit 9117c61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/CC1101/CC1101.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ int16_t CC1101::setRxBandwidth(float rxBw) {
for(int8_t e = 3; e >= 0; e--) {
for(int8_t m = 3; m >= 0; m --) {
float point = (RADIOLIB_CC1101_CRYSTAL_FREQ * 1000000.0)/(8 * (m + 4) * ((uint32_t)1 << e));
if((fabs(rxBw * 1000.0) - point) <= 1000) {
if(fabs((rxBw * 1000.0) - point) <= 1000) {
// set Rx channel filter bandwidth
return(SPIsetRegValue(RADIOLIB_CC1101_REG_MDMCFG4, (e << 6) | (m << 4), 7, 4));
}
Expand Down

0 comments on commit 9117c61

Please sign in to comment.