mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-28 23:34:03 +00:00
Fix - reference actual channel when changing settings
This commit is contained in:
parent
bfadd9c866
commit
a76f591231
@ -346,7 +346,7 @@ void Channels::setChannel(const meshtastic_Channel &c)
|
||||
void Channels::setMute(ChannelIndex chIndex)
|
||||
{
|
||||
if (chIndex < channelFile.channels_count) {
|
||||
meshtastic_Channel *ch = channelFile.channels + chIndex;
|
||||
meshtastic_Channel *ch = &getByIndex(chIndex);
|
||||
ch->settings.mute = !ch->settings.mute;
|
||||
} else {
|
||||
LOG_ERROR("Failed to mute. Invalid channel index %d > %d", chIndex, channelFile.channels_count);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user