doc improved, new returnvalue

This commit is contained in:
2020-10-19 00:43:10 +02:00
parent 75e67ce5f8
commit 22e4e464c7
4 changed files with 15 additions and 7 deletions

View File

@ -202,6 +202,8 @@ ReturnValue_t ParameterWrapper::set(const uint8_t *stream, size_t streamSize,
ReturnValue_t ParameterWrapper::copyFrom(const ParameterWrapper *from,
uint16_t startWritingAtIndex) {
// TODO: Optional diagnostic output (which can be disabled in FSFWConfig)
// to determined faulty implementations and configuration errors quickly.
if (data == nullptr) {
return READONLY;
}
@ -214,6 +216,11 @@ ReturnValue_t ParameterWrapper::copyFrom(const ParameterWrapper *from,
return DATATYPE_MISSMATCH;
}
// The smallest allowed value for rows and columns is one.
if(rows == 0 or columns == 0) {
return COLUMN_OR_ROWS_ZERO;
}
//check if from fits into this
uint8_t startingRow = 0;
uint8_t startingColumn = 0;