start fixing this crap
This commit is contained in:
parent
ba70bde3e9
commit
fe6b13bb81
@ -67,12 +67,6 @@ void initmission::initTasks() {
|
||||
void (*missedDeadlineFunc)(void) = nullptr;
|
||||
#endif
|
||||
|
||||
PeriodicTaskIF* sysCtrlTask = factory->createPeriodicTask(
|
||||
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||
result = sysCtrlTask->addComponent(objects::CORE_CONTROLLER);
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
|
||||
}
|
||||
#if OBSW_ADD_SA_DEPL == 1
|
||||
// Could add this to the core controller but the core controller does so many thing that I would
|
||||
// prefer to have the solar array deployment in a seprate task.
|
||||
@ -84,6 +78,17 @@ void initmission::initTasks() {
|
||||
}
|
||||
#endif
|
||||
|
||||
PeriodicTaskIF* sysTask = factory->createPeriodicTask(
|
||||
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||
result = sysTask->addComponent(objects::CORE_CONTROLLER);
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
|
||||
}
|
||||
result = sysTask->addComponent(objects::PL_SUBSYSTEM);
|
||||
if (result != returnvalue::OK) {
|
||||
initmission::printAddObjectError("PL_SUBSYSTEM", objects::PL_SUBSYSTEM);
|
||||
}
|
||||
|
||||
/* TMTC Distribution */
|
||||
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
||||
"DIST", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||
@ -127,9 +132,7 @@ void initmission::initTasks() {
|
||||
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
|
||||
}
|
||||
|
||||
// Minimal distance between two received TCs amounts to 0.6 seconds
|
||||
// If a command has not been read before the next one arrives, the old command will be
|
||||
// overwritten by the PDEC.
|
||||
// Runs in IRQ mode, frequency does not really matter
|
||||
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
|
||||
"PDEC_HANDLER", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
||||
@ -321,7 +324,7 @@ void initmission::initTasks() {
|
||||
pdecHandlerTask->startTask();
|
||||
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */
|
||||
|
||||
sysCtrlTask->startTask();
|
||||
sysTask->startTask();
|
||||
#if OBSW_ADD_SA_DEPL == 1
|
||||
solarArrayDeplTask->startTask();
|
||||
#endif
|
||||
|
@ -127,11 +127,9 @@ enum commonObjects : uint32_t {
|
||||
SUS_BOARD_ASS = 0x73000002,
|
||||
TCS_BOARD_ASS = 0x73000003,
|
||||
RW_ASS = 0x73000004,
|
||||
PLOC_SWITCHER = 0x73000005,
|
||||
CAM_SWITCHER = 0x73000006,
|
||||
ACS_SUBSYSTEM = 0x73010001,
|
||||
PL_SUBSYSTEM = 0x73010002,
|
||||
PLOC_SUBSYSTEM = 0x73010003,
|
||||
EIVE_SYSTEM = 0x73010000,
|
||||
CFDP_HANDLER = 0x73000005,
|
||||
CFDP_DISTRIBUTOR = 0x73000006,
|
||||
|
@ -1,6 +1,7 @@
|
||||
target_sources(
|
||||
${LIB_EIVE_MISSION}
|
||||
PRIVATE EiveSystem.cpp
|
||||
CamSwitcher.cpp
|
||||
AcsSubsystem.cpp
|
||||
ComSubsystem.cpp
|
||||
PayloadSubsystem.cpp
|
||||
|
5
mission/system/objects/CamSwitcher.cpp
Normal file
5
mission/system/objects/CamSwitcher.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include "CamSwitcher.h"
|
||||
|
||||
CamSwitcher::CamSwitcher(object_id_t objectId, PowerSwitchIF *pwrSwitcher,
|
||||
power::Switch_t pwrSwitch)
|
||||
: PowerSwitcherComponent(objectId, pwrSwitcher, pwrSwitch) {}
|
13
mission/system/objects/CamSwitcher.h
Normal file
13
mission/system/objects/CamSwitcher.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef MISSION_SYSTEM_OBJECTS_CAMSWITCHER_H_
|
||||
#define MISSION_SYSTEM_OBJECTS_CAMSWITCHER_H_
|
||||
|
||||
#include <fsfw/power/PowerSwitcherComponent.h>
|
||||
|
||||
class CamSwitcher : public PowerSwitcherComponent {
|
||||
public:
|
||||
CamSwitcher(object_id_t objectId, PowerSwitchIF *pwrSwitcher, power::Switch_t pwrSwitch);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* MISSION_SYSTEM_OBJECTS_CAMSWITCHER_H_ */
|
@ -27,7 +27,8 @@ static const auto NML = DeviceHandlerIF::MODE_NORMAL;
|
||||
|
||||
auto PL_SEQUENCE_OFF = std::make_pair(OFF << 24, FixedArrayList<ModeListEntry, 2>());
|
||||
auto PL_TABLE_OFF_TGT = std::make_pair((OFF << 24) | 1, FixedArrayList<ModeListEntry, 0>());
|
||||
auto PL_TABLE_OFF_TRANS = std::make_pair((OFF << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||
auto PL_TABLE_OFF_TRANS_0 = std::make_pair((OFF << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||
auto PL_TABLE_OFF_TRANS_1 = std::make_pair((OFF << 24) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||
|
||||
auto PL_SEQUENCE_MPSOC_STREAM =
|
||||
std::make_pair(payload::Modes::MPSOC_STREAM << 24, FixedArrayList<ModeListEntry, 2>());
|
||||
@ -110,16 +111,21 @@ void initOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
check(ss->addTable(TableEntry(PL_TABLE_OFF_TGT.first, &PL_TABLE_OFF_TGT.second)), ctxc);
|
||||
|
||||
// Build OFF transition 0
|
||||
iht(objects::PLOC_SWITCHER, OFF, 0, PL_TABLE_OFF_TRANS.second);
|
||||
iht(objects::CAM_SWITCHER, OFF, 0, PL_TABLE_OFF_TRANS.second);
|
||||
iht(objects::SCEX, OFF, 0, PL_TABLE_OFF_TRANS.second);
|
||||
iht(objects::PLPCDU_HANDLER, OFF, 0, PL_TABLE_OFF_TRANS.second);
|
||||
iht(objects::PLOC_SUBSYSTEM, OFF, 0, PL_TABLE_OFF_TRANS.second);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_OFF_TRANS.first, &PL_TABLE_OFF_TRANS.second)), ctxc);
|
||||
iht(objects::PLOC_SWITCHER, OFF, 0, PL_TABLE_OFF_TRANS_0.second);
|
||||
iht(objects::CAM_SWITCHER, OFF, 0, PL_TABLE_OFF_TRANS_0.second);
|
||||
iht(objects::SCEX, OFF, 0, PL_TABLE_OFF_TRANS_0.second);
|
||||
iht(objects::PLPCDU_HANDLER, OFF, 0, PL_TABLE_OFF_TRANS_0.second);
|
||||
iht(objects::PLOC_MPSOC_HANDLER, OFF, 0, PL_TABLE_OFF_TRANS_0.second);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_OFF_TRANS_0.first, &PL_TABLE_OFF_TRANS_0.second)), ctxc);
|
||||
|
||||
// Build OFF transition 1
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, OFF, 0, PL_TABLE_OFF_TRANS_1.second);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_OFF_TRANS_1.first, &PL_TABLE_OFF_TRANS_1.second)), ctxc);
|
||||
|
||||
// Build OFF sequence
|
||||
ihs(PL_SEQUENCE_OFF.second, PL_TABLE_OFF_TGT.first, 0, false);
|
||||
ihs(PL_SEQUENCE_OFF.second, PL_TABLE_OFF_TRANS.first, 0, false);
|
||||
ihs(PL_SEQUENCE_OFF.second, PL_TABLE_OFF_TRANS_0.first, 0, false);
|
||||
ihs(PL_SEQUENCE_OFF.second, PL_TABLE_OFF_TRANS_1.first, 0, false);
|
||||
check(ss->addSequence(
|
||||
SequenceEntry(PL_SEQUENCE_OFF.first, &PL_SEQUENCE_OFF.second, PL_SEQUENCE_OFF.first)),
|
||||
ctxc);
|
||||
@ -147,24 +153,26 @@ void initPlMpsocStreamSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
|
||||
// Build MPSoC stream target
|
||||
// Camera should always be off to prevent a conflict with the MPSoC streaming
|
||||
// PL PCDU must be on and in normal mode, but this is commanded separately because of the
|
||||
// number of commands invovled
|
||||
iht(objects::PLPCDU_HANDLER, NML, plpcdu::ALL_ON_SUBMODE, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
iht(objects::PLOC_SWITCHER, ON, 0, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
iht(objects::CAM_SWITCHER, OFF, 0, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
iht(objects::PLOC_SUBSYSTEM, NML, payload::ploc::MPSOC_ON, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
iht(objects::PLOC_MPSOC_HANDLER, NML, 0, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, NML, 0, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
check(
|
||||
ss->addTable(TableEntry(PL_TABLE_MPSOC_STREAM_TGT.first, &PL_TABLE_MPSOC_STREAM_TGT.second)),
|
||||
ctxc);
|
||||
|
||||
// Build MPSoC stream transition 0
|
||||
iht(objects::PLOC_SWITCHER, ON, 0, PL_TABLE_MPSOC_STREAM_TRANS_0.second);
|
||||
iht(objects::CAM_SWITCHER, OFF, 0, PL_TABLE_MPSOC_STREAM_TRANS_0.second);
|
||||
iht(objects::SCEX, OFF, 0, PL_TABLE_MPSOC_STREAM_TRANS_0.second);
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, NML, 0, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
check(ss->addTable(
|
||||
TableEntry(PL_TABLE_MPSOC_STREAM_TRANS_0.first, &PL_TABLE_MPSOC_STREAM_TRANS_0.second)),
|
||||
ctxc);
|
||||
|
||||
// Build MPSoC stream transition 1
|
||||
iht(objects::PLOC_SUBSYSTEM, NML, payload::ploc::MPSOC_ON, PL_TABLE_MPSOC_STREAM_TRANS_1.second);
|
||||
iht(objects::PLOC_MPSOC_HANDLER, NML, 0, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
check(ss->addTable(
|
||||
TableEntry(PL_TABLE_MPSOC_STREAM_TRANS_1.first, &PL_TABLE_MPSOC_STREAM_TRANS_1.second)),
|
||||
ctxc);
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit f62c67a11e54b99fdb60dab13e55456f16450951
|
||||
Subproject commit f6fab2d44aff98174835c8446fd69c1ff589521b
|
Loading…
Reference in New Issue
Block a user