simplification
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2023-03-10 15:21:36 +01:00
parent 6452242f2f
commit 4a386ad3d1
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 8 additions and 32 deletions

View File

@ -22,6 +22,8 @@ will consitute of a breaking change warranting a new major release:
## Changed
- ACS CTRL transition to DETUBMLE is now done in CTRL internally. No
system level handling necessary anymore.
- More fixes and improvements for SD card handling. Extend SD card setup in core controller to
create full initial state for SD card manager are core controller as early as possible, turn
execution of setup file update blocking. This might solve the issue with the SD card manager
@ -47,7 +49,6 @@ eive-tmtc: v2.17.2
## Changed
- Move ACS event handling to system component.
- Persistent TM stores will now create new files on each reboot.
- Fast ACS subsystem commanding: Command SUS board consecutively with other devices now
- Star Tracker: Use ground confguration for EM and flight config for FM by default.

View File

@ -198,6 +198,7 @@ void AcsController::performSafe() {
detumbleCounter = 0;
// Triggers detumble mode transition in subsystem
triggerEvent(acs::SAFE_RATE_VIOLATION);
startTransition(mode, acs::SafeSubmode::DETUMBLE);
}
updateCtrlValData(errAng);
@ -245,6 +246,7 @@ void AcsController::performDetumble() {
detumbleCounter = 0;
// Triggers safe mode transition in subsystem
triggerEvent(acs::SAFE_RATE_RECOVERY);
startTransition(mode, acs::SafeSubmode::DEFAULT);
}
disableCtrlValData();

View File

@ -924,8 +924,8 @@ class AcsParameters : public HasParametersIF {
} magnetorquesParameter;
struct DetumbleParameter {
uint8_t detumblecounter = 75; // 30 s
double omegaDetumbleStart = 2 * M_PI / 180;
uint8_t detumblecounter = 75; // 30 s
double omegaDetumbleStart = 0; // 2 * M_PI / 180;
double omegaDetumbleEnd = 0.4 * M_PI / 180;
double gainD = pow(10.0, -3.3);
} detumbleParameter;

View File

@ -1,5 +1,6 @@
#include "EiveSystem.h"
#include <eive/objects.h>
#include <fsfw/events/EventManager.h>
#include <fsfw/ipc/QueueFactory.h>
#include <mission/acsDefs.h>
@ -65,44 +66,16 @@ ReturnValue_t EiveSystem::initialize() {
<< std::endl;
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
;
}
result =
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(acs::MULTIPLE_RW_INVALID));
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: Subscribing for acs::MULTIPLE_RW_INVALID failed" << std::endl;
}
result = manager->subscribeToEvent(eventQueue->getId(),
event::getEventId(acs::MEKF_INVALID_MODE_VIOLATION));
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: Subscribing for acs::MULTIPLE_RW_INVALID failed" << std::endl;
}
return returnvalue::OK;
return Subsystem::initialize();
}
void EiveSystem::handleEventMessages() {
EventMessage event;
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
result = eventQueue->receiveMessage(&event)) {
ReturnValue_t status;
switch (event.getMessageId()) {
case EventMessage::EVENT_MESSAGE:
if (event.getEvent() == acs::SAFE_RATE_VIOLATION) {
CommandMessage msg;
ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, acs::SafeSubmode::DETUMBLE);
status = commandQueue->sendMessage(commandQueue->getId(), &msg);
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: sending DETUMBLE mode cmd to self has failed" << std::endl;
}
}
if (event.getEvent() == acs::SAFE_RATE_RECOVERY) {
CommandMessage msg;
ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT);
status = commandQueue->sendMessage(commandQueue->getId(), &msg);
if (status != returnvalue::OK) {
sif::error << "AcsSubsystem: sending SAFE mode cmd to self has failed" << std::endl;
}
}
break;
default:
sif::debug << "AcsSubsystem::performChildOperation: Did not subscribe "