Fixed bug

This commit is contained in:
Ryzerth 2021-04-24 19:41:02 +02:00
parent 8305750016
commit 2a22a125bb
2 changed files with 6 additions and 1 deletions

View File

@ -163,6 +163,10 @@ private:
if (code == RADIO_IFACE_CMD_GET_MODE) {
*(int*)out = _this->demodId;
}
else if (code == RADIO_IFACE_CMD_SET_MODE) {
int in = *(int*)in;
if (in != _this->demodId) { _this->selectDemodById(in); }
}
}
void selectDemod(Demodulator* demod) {

View File

@ -1,7 +1,8 @@
#pragma once
enum {
RADIO_IFACE_CMD_GET_MODE
RADIO_IFACE_CMD_GET_MODE,
RADIO_IFACE_CMD_SET_MODE
};
enum {