re-enabled some commands
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2022-11-09 19:24:48 +01:00
parent 2118c0691c
commit c42eae9c17
3 changed files with 57 additions and 59 deletions

View File

@ -882,6 +882,37 @@ class RunAutoEmTests : public TcBase {
void initPacket(uint8_t test) { payloadStart[0] = test; }
};
/**
* @brief This class packages the space packet to enable or disable ADC channels.
*/
class SetAdcEnabledChannels : public TcBase {
public:
/**
* @brief Constructor
*
* @param ch Defines channels to be enabled or disabled.
*/
SetAdcEnabledChannels(TcParams params)
: TcBase(params, Apid::ADC_MON, static_cast<uint8_t>(tc::AdcMonId::SET_ENABLED_CHANNELS), 2) {
}
ReturnValue_t buildPacket(uint16_t ch) {
auto res = checkSizeAndSerializeHeader();
if (res != returnvalue::OK) {
return res;
}
initPacket(ch);
return calcAndSetCrc();
}
private:
void initPacket(uint16_t ch) {
size_t serializedSize = 0;
SerializeAdapter::serialize(&ch, &payloadStart, &serializedSize, sizeof(ch),
SerializeIF::Endianness::BIG);
}
};
/**
* @brief This class packages the space packet change the state of a GPIO. This command is only
* required for ground testing.
@ -2000,37 +2031,6 @@ class DisableAutoTm : public TcBase {
static const uint8_t DISABLE = 0;
};
/**
* @brief This class packages the space packet to enable or disable ADC channels.
*/
class SetAdcEnabledChannels : public TcBase {
public:
/**
* @brief Constructor
*
* @param ch Defines channels to be enabled or disabled.
*/
SetAdcEnabledChannels(TcParams params)
: TcBase(params, Apid::ADC_MON, static_cast<uint8_t>(tc::AdcMonId::SET_ENABLED_CHANNELS), 2) {
}
ReturnValue_t buildPacket(uint16_t ch) {
auto res = checkSizeAndSerializeHeader();
if (res != returnvalue::OK) {
return res;
}
initPacket(ch);
return calcAndSetCrc();
}
private:
void initPacket(uint16_t ch) {
size_t serializedSize = 0;
SerializeAdapter::serialize(&ch, &payloadStart, &serializedSize, sizeof(ch),
SerializeIF::Endianness::BIG);
}
};
/**
* @brief This class creates the space packet to request the logging data from the supervisor
*/