parameter upstream taken over
This commit is contained in:
parent
c174c9ecb8
commit
f6e7e232f5
6
parameters/CMakeLists.txt
Normal file
6
parameters/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
ParameterHelper.cpp
|
||||||
|
ParameterMessage.cpp
|
||||||
|
ParameterWrapper.cpp
|
||||||
|
)
|
@ -123,7 +123,8 @@ ReturnValue_t ParameterWrapper::deSerializeData(uint8_t startingRow,
|
|||||||
for (uint8_t fromRow = 0; fromRow < fromRows; fromRow++) {
|
for (uint8_t fromRow = 0; fromRow < fromRows; fromRow++) {
|
||||||
|
|
||||||
//get the start element of this row in data
|
//get the start element of this row in data
|
||||||
uint16_t offset = (((startingRow + fromRow) * columns) + startingColumn);
|
uint16_t offset = (((startingRow + fromRow) *
|
||||||
|
static_cast<uint16_t>(columns)) + startingColumn);
|
||||||
T *dataWithDataType = static_cast<T*>(data) + offset;
|
T *dataWithDataType = static_cast<T*>(data) + offset;
|
||||||
|
|
||||||
for (uint8_t fromColumn = 0; fromColumn < fromColumns; fromColumn++) {
|
for (uint8_t fromColumn = 0; fromColumn < fromColumns; fromColumn++) {
|
||||||
@ -296,8 +297,8 @@ ReturnValue_t ParameterWrapper::copyFrom(const ParameterWrapper *from,
|
|||||||
//need a type to do arithmetic
|
//need a type to do arithmetic
|
||||||
uint8_t* typedData = static_cast<uint8_t*>(data);
|
uint8_t* typedData = static_cast<uint8_t*>(data);
|
||||||
for (uint8_t fromRow = 0; fromRow < from->rows; fromRow++) {
|
for (uint8_t fromRow = 0; fromRow < from->rows; fromRow++) {
|
||||||
size_t offset = (((startingRow + fromRow) * columns) +
|
size_t offset = (((startingRow + fromRow) * static_cast<uint16_t>(
|
||||||
startingColumn) * typeSize;
|
columns)) + startingColumn) * typeSize;
|
||||||
std::memcpy(typedData + offset, from->readonlyData,
|
std::memcpy(typedData + offset, from->readonlyData,
|
||||||
typeSize * from->columns);
|
typeSize * from->columns);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user