1
0
forked from fsfw/fsfw

srv20 improvements and bugfixes

This commit is contained in:
2021-01-31 20:53:25 +01:00
parent 4522668066
commit 5ac3762dc5
4 changed files with 64 additions and 9 deletions

View File

@ -90,7 +90,7 @@ ReturnValue_t ParameterHelper::sendParameter(MessageQueueId_t to, uint32_t id,
const ParameterWrapper* description) {
size_t serializedSize = description->getSerializedSize();
uint8_t *storeElement;
uint8_t *storeElement = nullptr;
store_address_t address;
ReturnValue_t result = storage->getFreeElement(&address, serializedSize,

View File

@ -7,13 +7,13 @@ ParameterWrapper::ParameterWrapper() :
}
ParameterWrapper::ParameterWrapper(Type type, uint8_t rows, uint8_t columns,
void *data) :
void *data):
pointsToStream(false), type(type), rows(rows), columns(columns),
data(data), readonlyData(data) {
}
ParameterWrapper::ParameterWrapper(Type type, uint8_t rows, uint8_t columns,
const void *data) :
const void *data):
pointsToStream(false), type(type), rows(rows), columns(columns),
data(nullptr), readonlyData(data) {
}
@ -42,8 +42,8 @@ ReturnValue_t ParameterWrapper::serialize(uint8_t **buffer, size_t *size,
return result;
}
//serialize uses readonlyData, as it is always valid
if (readonlyData == NULL) {
/* serialize uses readonlyData, as it is always valid */
if (readonlyData == nullptr) {
return NOT_SET;
}
switch (type) {