Merge remote-tracking branch 'origin/develop' into refactoring_bugfixes_power_switching
This commit is contained in:
@ -486,7 +486,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
|
||||
|
||||
#if OBSW_ADD_I2C_TEST_CODE == 0
|
||||
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
|
||||
"I2C_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
|
||||
"I2C_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.4, missedDeadlineFunc);
|
||||
result = pst::pstI2c(i2cPst);
|
||||
if (result != returnvalue::OK) {
|
||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
@ -500,7 +500,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
|
||||
#endif
|
||||
|
||||
FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask(
|
||||
"GS_PST_TASK", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
||||
"GS_PST_TASK", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
|
||||
result = pst::pstGompaceCan(gomSpacePstTask);
|
||||
if (result != returnvalue::OK) {
|
||||
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "fsfw/tasks/TaskFactory.h"
|
||||
#include "fsfw/version.h"
|
||||
#include "mission/acsDefs.h"
|
||||
#include "mission/comDefs.h"
|
||||
#include "mission/system/tree/system.h"
|
||||
#include "q7sConfig.h"
|
||||
#include "watchdog/definitions.h"
|
||||
@ -68,6 +69,7 @@ int obsw::obsw(int argc, char* argv[]) {
|
||||
#if OBSW_COMMAND_SAFE_MODE_AT_STARTUP == 1
|
||||
// This ensures that the PCDU switches were updated.
|
||||
TaskFactory::delayTask(1000);
|
||||
commandComSubsystemRxOnly();
|
||||
commandEiveSystemToSafe();
|
||||
#else
|
||||
announceAllModes();
|
||||
@ -118,7 +120,22 @@ void obsw::commandEiveSystemToSafe() {
|
||||
ReturnValue_t result =
|
||||
MessageQueueSenderIF::sendMessage(sysQueueId, &msg, MessageQueueIF::NO_QUEUE, false);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Sending safe mode command to EIVE system failed" << std::endl;
|
||||
sif::error << "obsw: Sending safe mode command to EIVE system failed" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void obsw::commandComSubsystemRxOnly() {
|
||||
auto* comSs = ObjectManager::instance()->get<HasModesIF>(objects::COM_SUBSYSTEM);
|
||||
if (comSs == nullptr) {
|
||||
sif::error << "obsw: Could not retrieve COM subsystem object" << std::endl;
|
||||
return;
|
||||
}
|
||||
CommandMessage msg;
|
||||
ModeMessage::setCmdModeMessage(msg, com::RX_ONLY, 0);
|
||||
ReturnValue_t result = MessageQueueSenderIF::sendMessage(comSs->getCommandQueue(), &msg,
|
||||
MessageQueueIF::NO_QUEUE, false);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "obsw: Sending RX_ONLY mode command to COM subsystem failed" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,6 +146,6 @@ void obsw::announceAllModes() {
|
||||
ReturnValue_t result =
|
||||
MessageQueueSenderIF::sendMessage(sysQueueId, &msg, MessageQueueIF::NO_QUEUE, false);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Sending safe mode command to EIVE system failed" << std::endl;
|
||||
sif::error << "obsw: Sending safe mode command to EIVE system failed" << std::endl;
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ int obsw(int argc, char* argv[]);
|
||||
|
||||
void bootDelayHandling();
|
||||
void commandEiveSystemToSafe();
|
||||
void commandComSubsystemRxOnly();
|
||||
void announceAllModes();
|
||||
|
||||
}; // namespace obsw
|
||||
|
Reference in New Issue
Block a user