Update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

- COM Subsystem now handles datarate config
- torquer config and comCfg moved to mission/config folder
- CCSDS Handler: Added default rate submode
This commit is contained in:
2023-01-27 18:38:36 +01:00
parent 54e6c4826f
commit 13f3963f69
19 changed files with 145 additions and 53 deletions

View File

@ -0,0 +1,27 @@
#include "torquer.h"
#include <fsfw/ipc/MutexGuard.h>
MutexIF* TORQUE_LOCK = nullptr;
namespace torquer {
bool TORQUEING = false;
bool NEW_ACTUATION_FLAG = false;
Countdown TORQUE_COUNTDOWN = Countdown();
bool mgtIsTorqueing(dur_millis_t* remainingTorqueDuration) {
if (TORQUEING and remainingTorqueDuration != nullptr) {
*remainingTorqueDuration = TORQUE_COUNTDOWN.getRemainingMillis() + TORQUE_BUFFER_TIME_MS;
}
return TORQUEING;
}
MutexIF* lazyLock() {
if (TORQUE_LOCK == nullptr) {
TORQUE_LOCK = MutexFactory::instance()->createMutex();
}
return TORQUE_LOCK;
}
} // namespace torquer