2022-10-20 15:08:33 +02:00
|
|
|
#ifndef MISSION_DEVICES_TOQUER_H_
|
|
|
|
#define MISSION_DEVICES_TOQUER_H_
|
|
|
|
|
|
|
|
#include <fsfw/ipc/MutexIF.h>
|
|
|
|
#include <fsfw/timemanager/Countdown.h>
|
|
|
|
|
|
|
|
namespace torquer {
|
|
|
|
|
|
|
|
// Additional buffer time to accont for time until I2C command arrives and ramp up / ramp down
|
|
|
|
// time of the MGT
|
|
|
|
static constexpr dur_millis_t TORQUE_BUFFER_TIME_MS = 20;
|
2023-03-02 15:21:45 +01:00
|
|
|
static constexpr MutexIF::TimeoutType LOCK_TYPE = MutexIF::TimeoutType::WAITING;
|
|
|
|
static constexpr uint32_t LOCK_TIMEOUT = 20;
|
2022-10-20 15:08:33 +02:00
|
|
|
|
|
|
|
MutexIF* lazyLock();
|
|
|
|
extern bool TORQUEING;
|
|
|
|
extern bool NEW_ACTUATION_FLAG;
|
|
|
|
extern Countdown TORQUE_COUNTDOWN;
|
|
|
|
|
|
|
|
bool mgtIsTorqueing(dur_millis_t* remainingTorqueDuration);
|
|
|
|
|
|
|
|
} // namespace torquer
|
|
|
|
|
|
|
|
#endif /* MISSION_DEVICES_TOQUER_H_ */
|