git describe support finished
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -643,24 +643,24 @@ class TcModeIdle : public TcBase {
|
||||
};
|
||||
|
||||
class TcCamcmdSend : public TcBase {
|
||||
public:
|
||||
public:
|
||||
TcCamcmdSend(uint16_t sequenceCount) : TcBase(apid::TC_CAM_CMD_SEND, sequenceCount) {}
|
||||
|
||||
protected:
|
||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
||||
if (commandDataLen > MAX_DATA_LENGTH) {
|
||||
return INVALID_LENGTH;
|
||||
}
|
||||
std::memcpy(this->getPacketData(), commandData, commandDataLen);
|
||||
*(this->getPacketData() + commandDataLen) = CARRIAGE_RETURN;
|
||||
uint16_t trueLength = commandDataLen + sizeof(CARRIAGE_RETURN) + CRC_SIZE;
|
||||
this->setPacketDataLength(trueLength - 1);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
protected:
|
||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
||||
if (commandDataLen > MAX_DATA_LENGTH) {
|
||||
return INVALID_LENGTH;
|
||||
}
|
||||
private:
|
||||
static const uint8_t MAX_DATA_LENGTH = 10;
|
||||
static const uint8_t CARRIAGE_RETURN = 0xD;
|
||||
std::memcpy(this->getPacketData(), commandData, commandDataLen);
|
||||
*(this->getPacketData() + commandDataLen) = CARRIAGE_RETURN;
|
||||
uint16_t trueLength = commandDataLen + sizeof(CARRIAGE_RETURN) + CRC_SIZE;
|
||||
this->setPacketDataLength(trueLength - 1);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
static const uint8_t MAX_DATA_LENGTH = 10;
|
||||
static const uint8_t CARRIAGE_RETURN = 0xD;
|
||||
};
|
||||
|
||||
} // namespace mpsoc
|
||||
|
Reference in New Issue
Block a user