Remove global var for wireless power, add wl channel menu

This commit is contained in:
John Stäck 2019-07-23 10:32:33 +02:00
parent 33bfc9ea08
commit def0dcacd0
5 changed files with 37 additions and 10 deletions

View file

@ -163,4 +163,20 @@ void sendWLPower(const uint8_t level) {
buf[5] = level;
dinMIDIsendSysex(buf, 6);
}
}
void sendWLChannel(const uint8_t channel) {
uint8_t buf[6] = {
0x00, 0x21, 0x11, //Manufacturer id
0x02, //TX02
0x05, //Set channel
0x04 //Channel value (4-80)
};
if(channel<4 || channel>80) return; //Don't send invalid values
buf[5] = channel;
dinMIDIsendSysex(buf, 6);
}