v1.15.0 #311

Merged
muellerr merged 107 commits from develop into main 2022-10-27 11:28:49 +02:00
3 changed files with 20 additions and 3 deletions
Showing only changes of commit 2b6334b9dc - Show all commits

View File

@ -100,8 +100,10 @@ ReturnValue_t ImtqHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
communicationStep = CommunicationStep::DIPOLE_ACTUATION; communicationStep = CommunicationStep::DIPOLE_ACTUATION;
break; break;
case CommunicationStep::DIPOLE_ACTUATION: { case CommunicationStep::DIPOLE_ACTUATION: {
// TODO: Set correct ID if actuation is necessary // The dipoles will be set by the ACS controller directly using the dipole local pool set.
*id = IMTQ::START_ACTUATION_DIPOLE; if (dipoleSet.newActuation) {
*id = IMTQ::START_ACTUATION_DIPOLE;
}
communicationStep = CommunicationStep::GET_ENG_HK_DATA; communicationStep = CommunicationStep::GET_ENG_HK_DATA;
break; break;
} }
@ -404,6 +406,11 @@ ReturnValue_t ImtqHandler::initializeLocalDataPool(localpool::DataPool& localDat
localDataPoolMap.emplace(IMTQ::COIL_Z_TEMPERATURE, new PoolEntry<int16_t>({0})); localDataPoolMap.emplace(IMTQ::COIL_Z_TEMPERATURE, new PoolEntry<int16_t>({0}));
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0})); localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
localDataPoolMap.emplace(IMTQ::DIPOLES_X, &dipoleXEntry);
localDataPoolMap.emplace(IMTQ::DIPOLES_Y, &dipoleYEntry);
localDataPoolMap.emplace(IMTQ::DIPOLES_Z, &dipoleZEntry);
localDataPoolMap.emplace(IMTQ::CURRENT_TORQUE_DURATION, &torqueDurationEntry);
/** Entries of calibrated MTM measurement dataset */ /** Entries of calibrated MTM measurement dataset */
localDataPoolMap.emplace(IMTQ::MGM_CAL_NT, &mgmCalEntry); localDataPoolMap.emplace(IMTQ::MGM_CAL_NT, &mgmCalEntry);
localDataPoolMap.emplace(IMTQ::ACTUATION_CAL_STATUS, new PoolEntry<uint8_t>({0})); localDataPoolMap.emplace(IMTQ::ACTUATION_CAL_STATUS, new PoolEntry<uint8_t>({0}));

View File

@ -110,6 +110,10 @@ class ImtqHandler : public DeviceHandlerBase {
NormalPollingMode pollingMode = NormalPollingMode::BOTH; NormalPollingMode pollingMode = NormalPollingMode::BOTH;
PoolEntry<int32_t> mgmCalEntry = PoolEntry<int32_t>(3); PoolEntry<int32_t> mgmCalEntry = PoolEntry<int32_t>(3);
PoolEntry<int16_t> dipoleXEntry = PoolEntry<int16_t>(0, false);
PoolEntry<int16_t> dipoleYEntry = PoolEntry<int16_t>(0, false);
PoolEntry<int16_t> dipoleZEntry = PoolEntry<int16_t>(0, false);
PoolEntry<uint16_t> torqueDurationEntry = PoolEntry<uint16_t>(0, false);
// Hardcoded to default integration time of 10 ms. // Hardcoded to default integration time of 10 ms.
// SHOULDDO: Support for other integration times // SHOULDDO: Support for other integration times
Countdown integrationTimeCd = Countdown(10); Countdown integrationTimeCd = Countdown(10);

View File

@ -4,6 +4,8 @@
#include <fsfw/datapool/PoolReadGuard.h> #include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/datapoollocal/StaticLocalDataSet.h> #include <fsfw/datapoollocal/StaticLocalDataSet.h>
class ImtqHandler;
namespace IMTQ { namespace IMTQ {
static const DeviceCommandId_t NONE = 0x0; static const DeviceCommandId_t NONE = 0x0;
@ -475,6 +477,8 @@ class CommandDipolePacket : public SerialLinkedListAdapter<SerializeIF> {
}; };
class DipoleActuationSet : public StaticLocalDataSet<4> { class DipoleActuationSet : public StaticLocalDataSet<4> {
friend class ::ImtqHandler;
public: public:
DipoleActuationSet(HasLocalDataPoolIF& owner) DipoleActuationSet(HasLocalDataPoolIF& owner)
: StaticLocalDataSet(&owner, IMTQ::SetIds::DIPOLES) {} : StaticLocalDataSet(&owner, IMTQ::SetIds::DIPOLES) {}
@ -499,15 +503,17 @@ class DipoleActuationSet : public StaticLocalDataSet<4> {
zDipole = zDipole_; zDipole = zDipole_;
currentTorqueDurationMs = currentTorqueDurationMs_; currentTorqueDurationMs = currentTorqueDurationMs_;
} }
private:
lp_var_t<uint16_t> xDipole = lp_var_t<uint16_t>(sid.objectId, DIPOLES_X, this); lp_var_t<uint16_t> xDipole = lp_var_t<uint16_t>(sid.objectId, DIPOLES_X, this);
lp_var_t<uint16_t> yDipole = lp_var_t<uint16_t>(sid.objectId, DIPOLES_Y, this); lp_var_t<uint16_t> yDipole = lp_var_t<uint16_t>(sid.objectId, DIPOLES_Y, this);
lp_var_t<uint16_t> zDipole = lp_var_t<uint16_t>(sid.objectId, DIPOLES_Z, this); lp_var_t<uint16_t> zDipole = lp_var_t<uint16_t>(sid.objectId, DIPOLES_Z, this);
lp_var_t<uint16_t> currentTorqueDurationMs = lp_var_t<uint16_t> currentTorqueDurationMs =
lp_var_t<uint16_t>(sid.objectId, CURRENT_TORQUE_DURATION, this); lp_var_t<uint16_t>(sid.objectId, CURRENT_TORQUE_DURATION, this);
private:
bool newActuation = false; bool newActuation = false;
}; };
/** /**
* @brief This dataset can be used to store the self test results of the +X self test. * @brief This dataset can be used to store the self test results of the +X self test.
* *