fixed automatic switch between safe and detumble
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Marius Eggert 2023-03-10 12:50:18 +01:00
parent ba0bc1b98b
commit c80426309d

View File

@ -42,16 +42,6 @@ ReturnValue_t AcsSubsystem::initialize() {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: Subscribing for acs::SAFE_RATE_RECOVERY failed" << std::endl; sif::error << "AcsSubsystem: Subscribing for acs::SAFE_RATE_RECOVERY failed" << std::endl;
} }
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 Subsystem::initialize(); return Subsystem::initialize();
} }
@ -70,7 +60,7 @@ void AcsSubsystem::handleEventMessages() {
case EventMessage::EVENT_MESSAGE: case EventMessage::EVENT_MESSAGE:
if (event.getEvent() == acs::SAFE_RATE_VIOLATION) { if (event.getEvent() == acs::SAFE_RATE_VIOLATION) {
CommandMessage msg; CommandMessage msg;
ModeMessage::setCmdModeMessage(msg, acs::AcsMode::DETUMBLE, 0); ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, acs::AcsMode::DETUMBLE);
status = commandQueue->sendMessage(commandQueue->getId(), &msg); status = commandQueue->sendMessage(commandQueue->getId(), &msg);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: sending DETUMBLE mode cmd to self has failed" << std::endl; sif::error << "AcsSubsystem: sending DETUMBLE mode cmd to self has failed" << std::endl;
@ -78,7 +68,7 @@ void AcsSubsystem::handleEventMessages() {
} }
if (event.getEvent() == acs::SAFE_RATE_RECOVERY) { if (event.getEvent() == acs::SAFE_RATE_RECOVERY) {
CommandMessage msg; CommandMessage msg;
ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, 0); ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, SUBMODE_NONE);
status = commandQueue->sendMessage(commandQueue->getId(), &msg); status = commandQueue->sendMessage(commandQueue->getId(), &msg);
if (status != returnvalue::OK) { if (status != returnvalue::OK) {
sif::error << "AcsSubsystem: sending SAFE mode cmd to self has failed" << std::endl; sif::error << "AcsSubsystem: sending SAFE mode cmd to self has failed" << std::endl;