RadioDevice: Add ability to set modulation back to none
This commit is contained in:
parent
166963288b
commit
640ce09132
@ -13,7 +13,7 @@ bool RadioDevice::setModulation(const RadioDevice::Modulation newModulation) {
|
|||||||
const auto state = getState();
|
const auto state = getState();
|
||||||
if ((state == State::PendingOn) || (state == State::On)) {
|
if ((state == State::PendingOn) || (state == State::On)) {
|
||||||
return false;
|
return false;
|
||||||
} else if (!(canTransmit(newModulation) || canReceive(newModulation))) {
|
} else if (!((newModulation == Modulation::None) || canTransmit(newModulation) || canReceive(newModulation))) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
auto lock = mutex.asScopedLock();
|
auto lock = mutex.asScopedLock();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user