Syrlinks Update #353
@ -25,7 +25,7 @@ void SyrlinksHandler::doStartUp() {
|
||||
}
|
||||
if (internalState == InternalState::ENABLE_TEMPERATURE_PROTECTION) {
|
||||
if (commandExecuted) {
|
||||
// Got to normal mode immediately.
|
||||
// Got to normal mode immediately and disable transmitter on startup.
|
||||
setMode(_MODE_TO_NORMAL);
|
||||
internalState = InternalState::IDLE;
|
||||
commandExecuted = false;
|
||||
@ -740,6 +740,18 @@ void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
||||
}
|
||||
return false;
|
||||
};
|
||||
auto txStandbyHandler = [&]() {
|
||||
if (internalState == InternalState::IDLE) {
|
||||
internalState = InternalState::SET_TX_STANDBY;
|
||||
commandExecuted = false;
|
||||
}
|
||||
if (internalState == InternalState::SET_TX_STANDBY) {
|
||||
if (commandExecuted) {
|
||||
commandDone();
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
if (tgtMode == HasModesIF::MODE_ON or tgtMode == DeviceHandlerIF::MODE_NORMAL) {
|
||||
switch (getSubmode()) {
|
||||
case (syrlinks::Submode::RX_AND_TX_DEFAULT_DATARATE): {
|
||||
@ -768,17 +780,8 @@ void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
||||
break;
|
||||
}
|
||||
case (syrlinks::Submode::RX_ONLY): {
|
||||
if (internalState == InternalState::IDLE) {
|
||||
internalState = InternalState::SET_TX_STANDBY;
|
||||
commandExecuted = false;
|
||||
}
|
||||
if (internalState == InternalState::SET_TX_STANDBY) {
|
||||
if (commandExecuted) {
|
||||
commandDone();
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
txStandbyHandler();
|
||||
return;
|
||||
}
|
||||
case (syrlinks::Submode::RX_AND_TX_CW): {
|
||||
if (internalState == InternalState::IDLE) {
|
||||
|
@ -9,7 +9,6 @@ namespace syrlinks {
|
||||
enum class ParameterId : uint8_t { DATARATE = 0 };
|
||||
|
||||
enum Submode {
|
||||
DEFAULT,
|
||||
RX_ONLY,
|
||||
RX_AND_TX_DEFAULT_DATARATE,
|
||||
RX_AND_TX_LOW_DATARATE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user