cc1200: use Hz instead of kHz for channel spacing

This commit is contained in:
Simon Duquennoy 2016-09-22 11:27:18 +02:00
parent 3f4436bac9
commit 97843ed322
3 changed files with 5 additions and 5 deletions

View file

@ -2013,7 +2013,7 @@ calculate_freq(uint8_t channel)
uint32_t freq;
freq = CC1200_RF_CFG.chan_center_freq0 + channel * CC1200_RF_CFG.chan_spacing;
freq = CC1200_RF_CFG.chan_center_freq0 + (channel * CC1200_RF_CFG.chan_spacing) / 1000 /* /1000 because chan_spacing is in Hz */;
freq *= FREQ_MULTIPLIER;
freq /= FREQ_DIVIDER;