More System Modes #612

Merged
muellerr merged 8 commits from more-system-modes into main 2023-04-28 15:32:04 +02:00
3 changed files with 22 additions and 15 deletions
Showing only changes of commit 14baa3563c - Show all commits

View File

@ -21,10 +21,11 @@ will consitute of a breaking change warranting a new major release:
- Event Manager queue depth is configurable now. - Event Manager queue depth is configurable now.
- Do not construct and schedule broken TMP1075 device anymore. - Do not construct and schedule broken TMP1075 device anymore.
- Do not track payload modes in system mode tables. - Do not track payload modes in system mode tables.
- ACS modes derived from system modes.
## Added ## Added
- Add the remaining system modes derived from the ACS modes. - Add the remaining system modes.
## Fixed ## Fixed

View File

@ -3,6 +3,7 @@
#include <eive/eventSubsystemIds.h> #include <eive/eventSubsystemIds.h>
#include <fsfw/modes/HasModesIF.h> #include <fsfw/modes/HasModesIF.h>
#include <mission/sysDefs.h>
namespace acs { 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. // These modes are the modes of the ACS controller and of the ACS subsystem.
enum AcsMode : Mode_t { enum AcsMode : Mode_t {
OFF = HasModesIF::MODE_OFF, OFF = HasModesIF::MODE_OFF,
SAFE = 10, SAFE = satsystem::Mode::SAFE,
PTG_IDLE = 11, PTG_IDLE = satsystem::Mode::PTG_IDLE,
PTG_NADIR = 12, PTG_NADIR = satsystem::Mode::PTG_NADIR,
PTG_TARGET = 13, PTG_TARGET = satsystem::Mode::PTG_TARGET,
PTG_TARGET_GS = 14, PTG_TARGET_GS = satsystem::Mode::PTG_TARGET_GS,
PTG_INERTIAL = 15, PTG_INERTIAL = satsystem::Mode::PTG_INERTIAL,
}; };
enum SafeSubmode : Submode_t { DEFAULT = 0, DETUMBLE = 1 }; enum SafeSubmode : Submode_t { DEFAULT = 0, DETUMBLE = 1 };

View File

@ -1,9 +1,13 @@
#ifndef MISSION_SYSDEFS_H_ #ifndef MISSION_SYSDEFS_H_
#define MISSION_SYSDEFS_H_ #define MISSION_SYSDEFS_H_
#include <atomic> #include <fsfw/action/ActionMessage.h>
#include <fsfw/action/HasActionsIF.h>
#include <fsfw/modes/ModeMessage.h>
#include <fsfw/serialize/SerializeIF.h>
#include "acs/defs.h" #include <atomic>
#include <cstring>
extern std::atomic_uint16_t I2C_FATAL_ERRORS; extern std::atomic_uint16_t I2C_FATAL_ERRORS;
@ -11,12 +15,13 @@ namespace satsystem {
enum Mode : Mode_t { enum Mode : Mode_t {
BOOT = 5, BOOT = 5,
SAFE = acs::AcsMode::SAFE, // DO NOT CHANGE THE ORDER starting from here, breaks ACS mode checks.
PTG_IDLE = acs::AcsMode::PTG_IDLE, SAFE = 10,
PTG_NADIR = acs::AcsMode::PTG_NADIR, PTG_IDLE = 11,
PTG_TARGET = acs::AcsMode::PTG_TARGET, PTG_NADIR = 12,
PTG_TARGET_GS = acs::AcsMode::PTG_TARGET_GS, PTG_TARGET = 13,
PTG_INERTIAL = acs::AcsMode::PTG_INERTIAL, PTG_TARGET_GS = 14,
PTG_INERTIAL = 15,
}; };
} }