Update FSFW from upstream #71

Closed
muellerr wants to merge 1112 commits from development into eive/develop
5 changed files with 5 additions and 13 deletions
Showing only changes of commit 1e395dc402 - Show all commits

View File

@ -119,14 +119,7 @@ const uint8_t* SerialBufferAdapter<count_t>::getConstBuffer() const {
} }
template <typename count_t> template <typename count_t>
void SerialBufferAdapter<count_t>::setBuffer(uint8_t* buffer, count_t bufferLength) { void SerialBufferAdapter<count_t>::setBuffer(const uint8_t* buf, count_t bufLen) {
this->buffer = buffer;
this->constBuffer = buffer;
this->bufferLength = bufferLength;
}
template <typename count_t>
void SerialBufferAdapter<count_t>::setConstBuffer(const uint8_t* buf, count_t bufLen) {
this->buffer = nullptr; this->buffer = nullptr;
this->bufferLength = bufLen; this->bufferLength = bufLen;
this->constBuffer = buf; this->constBuffer = buf;

View File

@ -65,8 +65,7 @@ class SerialBufferAdapter : public SerializeIF {
uint8_t* getBuffer(); uint8_t* getBuffer();
[[nodiscard]] const uint8_t* getConstBuffer() const; [[nodiscard]] const uint8_t* getConstBuffer() const;
void setBuffer(uint8_t* buffer, count_t bufferLength); void setBuffer(const uint8_t* buf, count_t bufLen);
void setConstBuffer(const uint8_t* buf, count_t bufLen);
private: private:
bool serializeLength = false; bool serializeLength = false;

View File

@ -84,7 +84,7 @@ SpacePacketParams &PusTcCreator::getSpParams() { return spCreator.getParams(); }
ReturnValue_t PusTcCreator::setRawUserData(const uint8_t *data, size_t len) { ReturnValue_t PusTcCreator::setRawUserData(const uint8_t *data, size_t len) {
// TODO: Check length field? // TODO: Check length field?
pusParams.bufAdapter.setConstBuffer(data, len); pusParams.bufAdapter.setBuffer(data, len);
pusParams.appData = &pusParams.bufAdapter; pusParams.appData = &pusParams.bufAdapter;
updateSpLengthField(); updateSpLengthField();
return returnvalue::OK; return returnvalue::OK;

View File

@ -13,7 +13,7 @@ struct PusTcParams {
PusTcParams(uint8_t service_, uint8_t subservice_) : service(service_), subservice(subservice_) {} PusTcParams(uint8_t service_, uint8_t subservice_) : service(service_), subservice(subservice_) {}
void setRawAppData(const uint8_t *data, size_t len) { void setRawAppData(const uint8_t *data, size_t len) {
bufAdapter.setConstBuffer(data, len); bufAdapter.setBuffer(data, len);
appData = &bufAdapter; appData = &bufAdapter;
} }

View File

@ -131,7 +131,7 @@ ReturnValue_t PusTmCreator::setRawUserData(const uint8_t* data, size_t len) {
if (data == nullptr or len == 0) { if (data == nullptr or len == 0) {
pusParams.sourceData = nullptr; pusParams.sourceData = nullptr;
} else { } else {
pusParams.adapter.setConstBuffer(data, len); pusParams.adapter.setBuffer(data, len);
pusParams.sourceData = &pusParams.adapter; pusParams.sourceData = &pusParams.adapter;
} }
updateSpLengthField(); updateSpLengthField();