diff --git a/CHANGELOG.md b/CHANGELOG.md index 5caaf84b..e872810d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,10 +25,11 @@ will consitute of a breaking change warranting a new major release: - Event Manager queue depth is configurable now. - Do not construct and schedule broken TMP1075 device anymore. - Do not track payload modes in system mode tables. +- ACS modes derived from system modes. ## Added -- Add the remaining system modes derived from the ACS modes. +- Add the remaining system modes. ## Fixed diff --git a/mission/acs/defs.h b/mission/acs/defs.h index 7748562d..41d09976 100644 --- a/mission/acs/defs.h +++ b/mission/acs/defs.h @@ -3,6 +3,7 @@ #include #include +#include namespace acs { @@ -11,12 +12,12 @@ enum class SimpleSensorMode { NORMAL = 0, OFF = 1 }; // These modes are the modes of the ACS controller and of the ACS subsystem. enum AcsMode : Mode_t { OFF = HasModesIF::MODE_OFF, - SAFE = 10, - PTG_IDLE = 11, - PTG_NADIR = 12, - PTG_TARGET = 13, - PTG_TARGET_GS = 14, - PTG_INERTIAL = 15, + SAFE = satsystem::Mode::SAFE, + PTG_IDLE = satsystem::Mode::PTG_IDLE, + PTG_NADIR = satsystem::Mode::PTG_NADIR, + PTG_TARGET = satsystem::Mode::PTG_TARGET, + PTG_TARGET_GS = satsystem::Mode::PTG_TARGET_GS, + PTG_INERTIAL = satsystem::Mode::PTG_INERTIAL, }; enum SafeSubmode : Submode_t { DEFAULT = 0, DETUMBLE = 1 }; diff --git a/mission/sysDefs.h b/mission/sysDefs.h index a74cf369..c84c237f 100644 --- a/mission/sysDefs.h +++ b/mission/sysDefs.h @@ -1,9 +1,13 @@ #ifndef MISSION_SYSDEFS_H_ #define MISSION_SYSDEFS_H_ -#include +#include +#include +#include +#include -#include "acs/defs.h" +#include +#include extern std::atomic_uint16_t I2C_FATAL_ERRORS; @@ -11,12 +15,13 @@ namespace satsystem { enum Mode : Mode_t { BOOT = 5, - SAFE = acs::AcsMode::SAFE, - PTG_IDLE = acs::AcsMode::PTG_IDLE, - PTG_NADIR = acs::AcsMode::PTG_NADIR, - PTG_TARGET = acs::AcsMode::PTG_TARGET, - PTG_TARGET_GS = acs::AcsMode::PTG_TARGET_GS, - PTG_INERTIAL = acs::AcsMode::PTG_INERTIAL, + // DO NOT CHANGE THE ORDER starting from here, breaks ACS mode checks. + SAFE = 10, + PTG_IDLE = 11, + PTG_NADIR = 12, + PTG_TARGET = 13, + PTG_TARGET_GS = 14, + PTG_INERTIAL = 15, }; }