fix knob mute and selection not sending mqtt

This commit is contained in:
interfisch 2020-05-03 12:38:20 +02:00
parent 947d00e783
commit 587fd4fcd3
1 changed files with 4 additions and 2 deletions

View File

@ -301,7 +301,8 @@ void loop() {
case 1: //mute
if (menu_selectedChannel<=MENU_MAXCHANNEL) { //inside valid range
setMuteChannel(menu_selectedChannel,!getMute(menu_selectedChannel)); // mute/unmute menu_selectedChannel
//setMuteChannel(menu_selectedChannel,!getMute(menu_selectedChannel)); // mute/unmute menu_selectedChannel
changeRelaisByNumber(NUMMUTECHANNELS,"audiomixer/mute_", ""+menu_selectedChannel, ""+!getMute(menu_selectedChannel), &setMuteChannel); //toggle
}else{ //nothing selected
menu_mode = 0; //return to volume mode
}
@ -309,7 +310,8 @@ void loop() {
case 2: //group selection
if (menu_selectedChannel<=MENU_MAXCHANNEL) { //inside valid range
setSelectionChannel(menu_selectedChannel,!getSelection(menu_selectedChannel)); // toggle selection menu_selectedChannel
//setSelectionChannel(menu_selectedChannel,!getSelection(menu_selectedChannel)); // toggle selection menu_selectedChannel
changeRelaisByNumber(NUMSELECTCHANNELS,"audiomixer/select_", ""+menu_selectedChannel, ""+!getSelection(menu_selectedChannel), &setSelectionChannel); //toggle
}else{ //nothing selected
menu_mode = 0; //return to volume mode
}