I am happy with this version
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-02-13 01:26:30 +01:00
parent c5a4fcd674
commit 3759b5d34a
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
21 changed files with 193 additions and 12 deletions

View File

@ -17,6 +17,42 @@ change warranting a new major release:
# [unreleased]
# [v1.27.0] 2023-02-13
Added EIVE system top mode component. Currently, only SAFE and IDLE mode are
implemented, and the system does not do more than commanding TCS and ACS
into the correct modes. It does not have a lot of mode tracking capabilities
yet because the ACS controller might alternate between SAFE and DETUMBLE.
It takes around 5-10 seconds for the EIVE system to reach the SAFE mode.
The new system is used at software boot to command the satellite into safe mode
on each reboot. This behaviour can be disabled with the
`OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP` flag.
## Added
- New EIVE system component like explained above.
## Changed
- The satellite now commands itself into SAFE mode on each reboot, which
triggers a lot of events on each SW reboot. The TCS subsystem will commanded
to NORMAL mode immediately while the ACS subsystem will be commanded to
SAFE mode. The payload subsystem will be commanded OFF.
- `RELEASE_BUILD` flag moved to `commonConfig.h`
- The ACS subsystem transitions are now staggered: The SUS board assembly
is commanded as a separate transition. This reduces the risk of long bus lockups.
- No INFO mode event translations for release builds to reduce number of
printouts.
- More granular locking inside the MAX31865 low level read handler.
## Fixed
- More DHB thermal module fixes.
- ACS PST frequency extended to 0.8 seconds in debug builds to avoid SPI
bus lockups.
- Local datapool fixes for the `PlocSupervisorHandler`
# [v1.26.4] 2023-02-10
eive-tmtc: v2.12.3

View File

@ -307,6 +307,11 @@ endif()
include(BuildType)
set_build_type()
set(FSFW_DEBUG_INFO 0)
if(RELEASE_BUILD MATCHES 0)
set(FSFW_DEBUG_INFO 1)
endif()
# Configuration files
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)

View File

@ -390,7 +390,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
#ifdef RELEASE_BUILD
static constexpr float acsPstPeriod = 0.4;
#else
static constexpr float acsPstPeriod = 0.6;
static constexpr float acsPstPeriod = 0.8;
#endif
FixedTimeslotTaskIF* acsPst = factory.createFixedTimeslotTask(
"ACS_PST", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, acsPstPeriod, missedDeadlineFunc);

View File

@ -53,7 +53,7 @@ static constexpr uint8_t VC3_QUEUE_SIZE = 50;
static constexpr uint32_t MAX_PUS_FUNNEL_QUEUE_DEPTH = 100;
static constexpr uint32_t MAX_STORED_CMDS_UDP = 120;
static constexpr uint32_t MAX_STORED_CMDS_TCP = 120;
static constexpr uint32_t MAX_STORED_CMDS_TCP = 150;
namespace acs {

2
fsfw

@ -1 +1 @@
Subproject commit 8b4f73a97b15f27e314932538d468707c57f965a
Subproject commit dac2d210b597adfaf45bd5ae6a4c027599927601

View File

@ -34,7 +34,7 @@
#if FSFW_OBJ_EVENT_TRANSLATION == 1
//! Specify whether info events are printed too.
#define FSFW_DEBUG_INFO 1
#define FSFW_DEBUG_INFO @FSFW_DEBUG_INFO@
#include "objects/translateObjects.h"
#include "events/translateEvents.h"
#else

View File

@ -8,3 +8,5 @@ add_subdirectory(system)
add_subdirectory(csp)
add_subdirectory(cfdp)
add_subdirectory(config)
target_sources(${LIB_EIVE_MISSION} PRIVATE acsDefs.cpp)

40
mission/acsDefs.cpp Normal file
View File

@ -0,0 +1,40 @@
#include "acsDefs.h"
const char* acs::getModeStr(AcsMode mode) {
static const char* modeStr = "UNKNOWN";
switch (mode) {
case (acs::AcsMode::OFF): {
modeStr = "OFF";
break;
}
case (acs::AcsMode::SAFE): {
modeStr = "SAFE";
break;
}
case (acs::AcsMode::DETUMBLE): {
modeStr = "DETUBMLE";
break;
}
case (acs::AcsMode::PTG_NADIR): {
modeStr = "POITNING NADIR";
break;
}
case (acs::AcsMode::PTG_IDLE): {
modeStr = "POINTING IDLE";
break;
}
case (acs::AcsMode::PTG_INERTIAL): {
modeStr = "POINTING INERTIAL";
break;
}
case (acs::AcsMode::PTG_TARGET): {
modeStr = "POINTING TARGET";
break;
}
case (acs::AcsMode::PTG_TARGET_GS): {
modeStr = "POINTING TARGET GS";
break;
}
}
return modeStr;
}

View File

@ -7,7 +7,7 @@
namespace acs {
// These modes are the submodes of the ACS controller and the modes of the ACS subsystem.
enum AcsMode {
enum AcsMode : Mode_t {
OFF = HasModesIF::MODE_OFF,
SAFE = 10,
DETUMBLE = 11,
@ -24,6 +24,8 @@ static const Event SAFE_RATE_VIOLATION = MAKE_EVENT(0, severity::MEDIUM);
//!< The system has recovered from a safe rate rotation violation.
static constexpr Event SAFE_RATE_RECOVERY = MAKE_EVENT(1, severity::MEDIUM);
extern const char* getModeStr(AcsMode mode);
} // namespace acs
#endif /* MISSION_ACSDEFS_H_ */

View File

@ -566,9 +566,15 @@ ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode,
return INVALID_MODE;
}
void AcsController::modeChanged(Mode_t mode, Submode_t submode) {}
void AcsController::modeChanged(Mode_t mode, Submode_t submode) {
return ExtendedControllerBase::modeChanged(mode, submode);
}
void AcsController::announceMode(bool recursive) {}
void AcsController::announceMode(bool recursive) {
const char *modeStr = acs::getModeStr(static_cast<acs::AcsMode>(mode));
sif::info << "ACS controller is now in " << modeStr << " mode" << std::endl;
return ExtendedControllerBase::announceMode(recursive);
}
void AcsController::copyMgmData() {
ACS::SensorValues sensorValues;

View File

@ -94,7 +94,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
}
{
PoolManager::LocalPoolConfig poolCfg = {{400, 32}, {350, 64}, {200, 128},
PoolManager::LocalPoolConfig poolCfg = {{400, 32}, {400, 64}, {250, 128},
{150, 512}, {150, 1024}, {150, 2048}};
tmStore = new PoolManager(objects::TM_STORE, poolCfg);
}

View File

@ -81,3 +81,9 @@ void AcsSubsystem::handleEventMessages() {
}
}
}
void AcsSubsystem::announceMode(bool recursive) {
const char* modeStr = acs::getModeStr(static_cast<acs::AcsMode>(mode));
sif::info << "ACS subsystem is now in " << modeStr << " mode" << std::endl;
return Subsystem::announceMode(recursive);
}

View File

@ -10,6 +10,7 @@ class AcsSubsystem : public Subsystem {
private:
ReturnValue_t initialize() override;
void performChildOperation() override;
void announceMode(bool recursive) override;
void handleEventMessages();

View File

@ -4,6 +4,7 @@ target_sources(
CamSwitcher.cpp
AcsSubsystem.cpp
ComSubsystem.cpp
TcsSubsystem.cpp
PayloadSubsystem.cpp
AcsBoardAssembly.cpp
Stack5VHandler.cpp

View File

@ -1,5 +1,43 @@
#include "EiveSystem.h"
#include <mission/acsDefs.h>
EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables)
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}
void EiveSystem::announceMode(bool recursive) {
const char* modeStr = "UNKNOWN";
switch (mode) {
case (acs::AcsMode::OFF): {
modeStr = "OFF";
break;
}
case (acs::AcsMode::SAFE): {
modeStr = "SAFE";
break;
}
case (acs::AcsMode::DETUMBLE): {
modeStr = "DETUBMLE";
break;
}
case (acs::AcsMode::PTG_IDLE): {
modeStr = "POINTING IDLE";
break;
}
case (acs::AcsMode::PTG_INERTIAL): {
modeStr = "POINTING INERTIAL";
break;
}
case (acs::AcsMode::PTG_TARGET): {
modeStr = "POINTING TARGET";
break;
}
case (acs::AcsMode::PTG_TARGET_GS): {
modeStr = "POINTING TARGET GS";
break;
}
}
sif::info << "EIVE system is now in " << modeStr << " mode" << std::endl;
return Subsystem::announceMode(recursive);
}

View File

@ -8,6 +8,7 @@ class EiveSystem : public Subsystem {
EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
private:
void announceMode(bool recursive) override;
};
#endif /* MISSION_SYSTEM_EIVESYSTEM_H_ */

View File

@ -0,0 +1,27 @@
#include "TcsSubsystem.h"
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
TcsSubsystem::TcsSubsystem(object_id_t objectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables)
: Subsystem(objectId, maxNumberOfSequences, maxNumberOfTables) {}
void TcsSubsystem::announceMode(bool recursive) {
const char* modeStr = "UNKNOWN";
switch (mode) {
case (HasModesIF::MODE_OFF): {
modeStr = "OFF";
break;
}
case (HasModesIF::MODE_ON): {
modeStr = "ON";
break;
}
case (DeviceHandlerIF::MODE_NORMAL): {
modeStr = "NORMAL";
break;
}
}
sif::info << "TCS subsystem is now in " << modeStr << " mode" << std::endl;
return Subsystem::announceMode(recursive);
}

View File

@ -0,0 +1,13 @@
#ifndef MISSION_SYSTEM_OBJECTS_TCSSUBSYSTEM_H_
#define MISSION_SYSTEM_OBJECTS_TCSSUBSYSTEM_H_
#include <fsfw/subsystem/Subsystem.h>
class TcsSubsystem : public Subsystem {
public:
TcsSubsystem(object_id_t objectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
private:
void announceMode(bool recursive) override;
};
#endif /* MISSION_SYSTEM_OBJECTS_TCSSUBSYSTEM_H_ */

View File

@ -76,7 +76,9 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
check(sequence.insert(eh), ctxc);
};
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TGT.second);
// Do no track ACS for now because it might jump to detumble mode and back to safe as part of
// normal operations.
// iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TGT.second);
iht(objects::PL_SUBSYSTEM, OFF, 0, EIVE_TABLE_SAFE_TGT.second);
check(ss.addTable(TableEntry(EIVE_TABLE_SAFE_TGT.first, &EIVE_TABLE_SAFE_TGT.second)), ctxc);

View File

@ -5,7 +5,7 @@
#include "fsfw/subsystem/Subsystem.h"
#include "mission/system/tree/util.h"
Subsystem satsystem::tcs::SUBSYSTEM(objects::TCS_SUBSYSTEM, 12, 24);
TcsSubsystem satsystem::tcs::SUBSYSTEM(objects::TCS_SUBSYSTEM, 12, 24);
namespace {
// Alias for checker function

View File

@ -1,11 +1,12 @@
#ifndef MISSION_SYSTEM_TREE_TCSMODETREE_H_
#define MISSION_SYSTEM_TREE_TCSMODETREE_H_
#include <fsfw/subsystem/Subsystem.h>
#include <mission/system/objects/TcsSubsystem.h>
namespace satsystem {
namespace tcs {
extern Subsystem SUBSYSTEM;
extern TcsSubsystem SUBSYSTEM;
Subsystem& init();
} // namespace tcs