some more debugging capabilities
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
d319fcfa03
commit
7ffba2bbda
@ -74,7 +74,6 @@ void FreshMpsocHandler::performDefaultDeviceOperation() {
|
||||
if (activeCmdInfo.pending and activeCmdInfo.cmdCountdown.hasTimedOut()) {
|
||||
sif::warning << "PlocMpsocHandler: Command " << activeCmdInfo.pendingCmd << " has timed out"
|
||||
<< std::endl;
|
||||
activeCmdInfo.reset();
|
||||
cmdDoneHandler(false, mpsoc::COMMAND_TIMEOUT);
|
||||
}
|
||||
EventMessage event;
|
||||
@ -301,7 +300,7 @@ void FreshMpsocHandler::handleTransitionToOn() {
|
||||
}
|
||||
}
|
||||
if (startupState == StartupState::DONE) {
|
||||
setMode(MODE_ON);
|
||||
setMode(targetMode, targetSubmode);
|
||||
transitionActive = false;
|
||||
hkReport.setReportingEnabled(true);
|
||||
powerState = PowerState::IDLE;
|
||||
@ -350,6 +349,7 @@ void FreshMpsocHandler::dataReceived(ActionId_t actionId, const uint8_t* data, u
|
||||
}
|
||||
|
||||
void FreshMpsocHandler::completionSuccessfulReceived(ActionId_t actionId) {
|
||||
sif::debug << "received completion for action ID " << actionId << std::endl;
|
||||
switch (powerState) {
|
||||
case PowerState::PENDING_STARTUP: {
|
||||
if (actionId != supv::START_MPSOC) {
|
||||
@ -373,6 +373,8 @@ void FreshMpsocHandler::completionSuccessfulReceived(ActionId_t actionId) {
|
||||
}
|
||||
|
||||
void FreshMpsocHandler::completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) {
|
||||
sif::debug << "received completion failure for action ID " << actionId << " with code "
|
||||
<< returnCode << std::endl;
|
||||
handleActionCommandFailure(actionId, returnCode);
|
||||
}
|
||||
|
||||
@ -1059,13 +1061,12 @@ bool FreshMpsocHandler::handleHwStartup() {
|
||||
}
|
||||
}
|
||||
if (powerState == PowerState::DONE) {
|
||||
if (mpsocBootTransitionCd.hasTimedOut()) {
|
||||
// Wait a bit for the MPSoC to fully boot.
|
||||
uartIsolatorSwitch.pullHigh();
|
||||
powerState = PowerState::IDLE;
|
||||
} else {
|
||||
if (!mpsocBootTransitionCd.hasTimedOut()) {
|
||||
return false;
|
||||
}
|
||||
uartIsolatorSwitch.pullHigh();
|
||||
powerState = PowerState::IDLE;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -58,7 +58,13 @@ ReturnValue_t MpsocCommunication::readSerialInterface() {
|
||||
if (bytesRead < 0) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
if (bytesRead > 0) {
|
||||
if (MPSOC_LOW_LEVEL_RX_WIRETAPPING) {
|
||||
sif::debug << "Read " << bytesRead << " bytes on the MPSoC interface" << std::endl;
|
||||
}
|
||||
return readRingBuf.writeData(readBuf, bytesRead);
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
const SpacePacketReader& MpsocCommunication::getSpReader() const { return spReader; }
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include "fsfw/tmtcpacket/ccsds/SpacePacketReader.h"
|
||||
#include "linux/payload/SerialCommunicationHelper.h"
|
||||
|
||||
static constexpr bool MPSOC_LOW_LEVEL_RX_WIRETAPPING = false;
|
||||
|
||||
class MpsocCommunication : public SystemObject {
|
||||
public:
|
||||
static const uint8_t CLASS_ID = CLASS_ID::PLOC_MPSOC_COM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user