some bugfixes
This commit is contained in:
parent
30f020bff3
commit
f545928adc
@ -136,28 +136,19 @@ ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId,
|
||||
|
||||
void PlocSupervisorHandler::doStartUp() {
|
||||
if (setTimeDuringStartup) {
|
||||
switch (startupState) {
|
||||
case StartupState::OFF: {
|
||||
bootTimeout.resetTimer();
|
||||
uartManager.start();
|
||||
startupState = StartupState::BOOTING;
|
||||
break;
|
||||
if (startupState == StartupState::OFF) {
|
||||
bootTimeout.resetTimer();
|
||||
uartManager.start();
|
||||
startupState = StartupState::BOOTING;
|
||||
}
|
||||
if (startupState == StartupState::BOOTING) {
|
||||
if (bootTimeout.hasTimedOut()) {
|
||||
uartIsolatorSwitch.pullHigh();
|
||||
startupState = StartupState::SET_TIME;
|
||||
}
|
||||
case StartupState::BOOTING: {
|
||||
if (bootTimeout.hasTimedOut()) {
|
||||
uartIsolatorSwitch.pullHigh();
|
||||
startupState = StartupState::SET_TIME;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case StartupState::SET_TIME_EXECUTING:
|
||||
break;
|
||||
case StartupState::ON: {
|
||||
setMode(_MODE_TO_ON);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (startupState == StartupState::ON) {
|
||||
setMode(_MODE_TO_ON);
|
||||
}
|
||||
} else {
|
||||
uartIsolatorSwitch.pullHigh();
|
||||
|
@ -571,9 +571,9 @@ ReturnValue_t PlocSupvUartManager::handlePacketTransmissionNoReply(
|
||||
bool ackReceived = false;
|
||||
bool packetWasHandled = false;
|
||||
while (true) {
|
||||
while (result != NO_PACKET_FOUND) {
|
||||
do {
|
||||
result = tryHdlcParsing();
|
||||
}
|
||||
} while (result != NO_PACKET_FOUND);
|
||||
if (not decodedQueue.empty()) {
|
||||
size_t packetLen = 0;
|
||||
decodedQueue.retrieve(&packetLen);
|
||||
@ -589,6 +589,7 @@ ReturnValue_t PlocSupvUartManager::handlePacketTransmissionNoReply(
|
||||
if (not ackReceived) {
|
||||
retval = handleAckReception(packet, serviceId, packetLen);
|
||||
if (retval == 1) {
|
||||
sif::debug << "ACK received" << std::endl;
|
||||
ackReceived = true;
|
||||
packetWasHandled = true;
|
||||
} else if (retval == -1) {
|
||||
@ -597,6 +598,7 @@ ReturnValue_t PlocSupvUartManager::handlePacketTransmissionNoReply(
|
||||
} else {
|
||||
retval = handleExeAckReception(packet, serviceId, packetLen);
|
||||
if (retval == 1) {
|
||||
sif::debug << "EXE ACK received" << std::endl;
|
||||
break;
|
||||
} else if (retval == -1) {
|
||||
return returnvalue::FAILED;
|
||||
@ -758,9 +760,10 @@ ReturnValue_t PlocSupvUartManager::handleCheckMemoryCommand() {
|
||||
bool packetWasHandled = false;
|
||||
bool exeReceived = false;
|
||||
while (true) {
|
||||
while (result != NO_PACKET_FOUND) {
|
||||
do {
|
||||
result = tryHdlcParsing();
|
||||
}
|
||||
|
||||
} while (result != NO_PACKET_FOUND);
|
||||
if (not decodedQueue.empty()) {
|
||||
size_t packetLen = 0;
|
||||
decodedQueue.retrieve(&packetLen);
|
||||
|
Loading…
Reference in New Issue
Block a user