Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SX1268 module support and base class for SX126x module family #865

Merged
merged 11 commits into from
Sep 18, 2021
Prev Previous commit
Next Next commit
save channel & freq before outputting them for debugging
The frequency could be overridden in `RadioInterface::getFreq()` for some modules.
osmanovv committed Sep 15, 2021
commit bd9bf585d3750998161eeb8f2371ad7bec3330b9
6 changes: 3 additions & 3 deletions src/mesh/RadioInterface.cpp
Original file line number Diff line number Diff line change
@@ -320,16 +320,16 @@ void RadioInterface::applyModemConfig()
int channel_num = channelSettings.channel_num ? channelSettings.channel_num - 1 : hash(channelName) % myRegion->numChannels;
float freq = myRegion->freq + radioConfig.preferences.frequency_offset + myRegion->spacing * channel_num;

saveChannelNum(channel_num);
saveFreq(freq);

DEBUG_MSG("Set radio: name=%s, config=%u, ch=%d, power=%d\n", channelName, channelSettings.modem_config, channel_num, power);
DEBUG_MSG("Radio myRegion->freq: %f\n", myRegion->freq);
DEBUG_MSG("Radio myRegion->spacing: %f\n", myRegion->spacing);
DEBUG_MSG("Radio myRegion->numChannels: %d\n", myRegion->numChannels);
DEBUG_MSG("Radio channel_num: %d\n", channel_num);
DEBUG_MSG("Radio frequency: %f\n", getFreq()); // the frequency could be overridden in RadioInterface::getFreq() for some modules
DEBUG_MSG("Short packet time: %u msec\n", shortPacketMsec);

saveChannelNum(channel_num);
saveFreq(freq);
}

/**