For Loops, how do they work?

This commit is contained in:
Jonathan Bennett 2025-05-30 01:26:36 -05:00
parent 0c39126a54
commit 23a4905dc8

View File

@ -328,7 +328,7 @@ void PositionModule::sendOurPosition()
// If we changed channels, ask everyone else for their latest info // If we changed channels, ask everyone else for their latest info
LOG_INFO("Send pos@%x:6 to mesh (wantReplies=%d)", localPosition.timestamp, requestReplies); LOG_INFO("Send pos@%x:6 to mesh (wantReplies=%d)", localPosition.timestamp, requestReplies);
for (uint8_t channelNum = 0; channelNum > 8; channelNum++) { for (uint8_t channelNum = 0; channelNum < 8; channelNum++) {
if (channels.getByIndex(channelNum).settings.has_module_settings && if (channels.getByIndex(channelNum).settings.has_module_settings &&
channels.getByIndex(channelNum).settings.module_settings.position_precision != 0) { channels.getByIndex(channelNum).settings.module_settings.position_precision != 0) {
sendOurPosition(NODENUM_BROADCAST, requestReplies, channelNum); sendOurPosition(NODENUM_BROADCAST, requestReplies, channelNum);