Payload: Fixes and improvements #637
@ -46,6 +46,10 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
16505 type.
|
16505 type.
|
||||||
- Host build is working again. Added reduced live TM helper which schedules the PUS and CFDP
|
- Host build is working again. Added reduced live TM helper which schedules the PUS and CFDP
|
||||||
funnel.
|
funnel.
|
||||||
|
- PLOC Supervisor handler now has a power switcher assigned to make PLOC power switching work
|
||||||
|
without an additional PCDU power switch command.
|
||||||
|
- The PLOC Supervisor handler now waits for the replies to the `SET_TIME` command to verify working
|
||||||
|
communication.
|
||||||
|
|
||||||
# [v2.0.5] 2023-05-11
|
# [v2.0.5] 2023-05-11
|
||||||
|
|
||||||
|
@ -644,6 +644,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
|
|||||||
auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
|
auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
|
||||||
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
||||||
power::PDU1_CH6_PLOC_12V, *supvHelper);
|
power::PDU1_CH6_PLOC_12V, *supvHelper);
|
||||||
|
supvHandler->setPowerSwitcher(&pwrSwitch);
|
||||||
supvHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
supvHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
static_cast<void>(consumer);
|
static_cast<void>(consumer);
|
||||||
|
@ -52,12 +52,12 @@ void ObjectFactory::produce(void* args) {
|
|||||||
// level components.
|
// level components.
|
||||||
dummy::DummyCfg dummyCfg;
|
dummy::DummyCfg dummyCfg;
|
||||||
dummyCfg.addCoreCtrlCfg = false;
|
dummyCfg.addCoreCtrlCfg = false;
|
||||||
|
dummyCfg.addCamSwitcherDummy = false;
|
||||||
#if OBSW_ADD_SYRLINKS == 1
|
#if OBSW_ADD_SYRLINKS == 1
|
||||||
dummyCfg.addSyrlinksDummies = false;
|
dummyCfg.addSyrlinksDummies = false;
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
|
||||||
dummyCfg.addPlocDummies = false;
|
dummyCfg.addPlocDummies = false;
|
||||||
dummyCfg.addCamSwitcherDummy = false;
|
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||||
dummyCfg.addPowerDummies = false;
|
dummyCfg.addPowerDummies = false;
|
||||||
|
@ -151,7 +151,7 @@ void PlocSupervisorHandler::doStartUp() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (startupState == StartupState::SET_TIME_EXECUTING) {
|
if (startupState == StartupState::TIME_WAS_SET) {
|
||||||
startupState = StartupState::ON;
|
startupState = StartupState::ON;
|
||||||
}
|
}
|
||||||
if (startupState == StartupState::ON) {
|
if (startupState == StartupState::ON) {
|
||||||
@ -176,7 +176,7 @@ ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t*
|
|||||||
ReturnValue_t PlocSupervisorHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
|
ReturnValue_t PlocSupervisorHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
|
||||||
if (startupState == StartupState::SET_TIME) {
|
if (startupState == StartupState::SET_TIME) {
|
||||||
*id = supv::SET_TIME_REF;
|
*id = supv::SET_TIME_REF;
|
||||||
startupState = StartupState::SET_TIME_EXECUTING;
|
startupState = StartupState::WAIT_FOR_TIME_REPLY;
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
}
|
}
|
||||||
return NOTHING_TO_SEND;
|
return NOTHING_TO_SEND;
|
||||||
@ -1909,6 +1909,10 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionRepor
|
|||||||
case supv::SET_TIME_REF: {
|
case supv::SET_TIME_REF: {
|
||||||
// We could only allow proper bootup when the time was set successfully, but
|
// We could only allow proper bootup when the time was set successfully, but
|
||||||
// this makes debugging difficult.
|
// this makes debugging difficult.
|
||||||
|
|
||||||
|
if (startupState == StartupState::WAIT_FOR_TIME_REPLY) {
|
||||||
|
startupState = StartupState::TIME_WAS_SET;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -99,7 +99,14 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
static const uint32_t MRAM_DUMP_TIMEOUT = 60000;
|
static const uint32_t MRAM_DUMP_TIMEOUT = 60000;
|
||||||
// 4 s
|
// 4 s
|
||||||
static const uint32_t BOOT_TIMEOUT = 4000;
|
static const uint32_t BOOT_TIMEOUT = 4000;
|
||||||
enum class StartupState : uint8_t { OFF, BOOTING, SET_TIME, SET_TIME_EXECUTING, ON };
|
enum class StartupState : uint8_t {
|
||||||
|
OFF,
|
||||||
|
BOOTING,
|
||||||
|
SET_TIME,
|
||||||
|
WAIT_FOR_TIME_REPLY,
|
||||||
|
TIME_WAS_SET,
|
||||||
|
ON
|
||||||
|
};
|
||||||
|
|
||||||
static constexpr bool SET_TIME_DURING_BOOT = true;
|
static constexpr bool SET_TIME_DURING_BOOT = true;
|
||||||
|
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 5fbd19bb6cca0790373a809d78f2307adca9d0c8
|
Subproject commit f090c3af66d1a0b760344e80053d6e83895e661a
|
Loading…
Reference in New Issue
Block a user