some remaining low-level issue..
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details

This commit is contained in:
Robin Müller 2024-04-29 13:35:31 +02:00
parent 083b4e61ad
commit e3dc1c9a74
Signed by: muellerr
GPG Key ID: A649FB78196E3849
1 changed files with 3 additions and 13 deletions

View File

@ -463,15 +463,14 @@ class TcFlashFopen : public mpsoc::TcBase {
ReturnValue_t setPayload(std::string filename, uint8_t mode) {
accessMode = mode;
size_t nameSize = filename.size();
spParams.setFullPayloadLen(FILENAME_FIELD_SIZE + CRC_SIZE);
ReturnValue_t result = checkPayloadLen();
if (result != returnvalue::OK) {
return result;
}
std::memset(payloadStart, 0, FILENAME_FIELD_SIZE);
std::memcpy(payloadStart, filename.c_str(), nameSize);
payloadStart[256] = accessMode;
std::memcpy(payloadStart, filename.c_str(), filename.size());
payloadStart[FILENAME_FIELD_SIZE] = accessMode;
spParams.setFullPayloadLen(FILENAME_FIELD_SIZE + 1 + CRC_SIZE);
return returnvalue::OK;
}
@ -581,15 +580,6 @@ class TcFlashRead : public TcBase {
if (result != returnvalue::OK) {
return result;
}
updateSpFields();
result = checkSizeAndSerializeHeader();
if (result != returnvalue::OK) {
return result;
}
result = calcAndSetCrc();
if (result != returnvalue::OK) {
return result;
}
readSize = readLen;
return result;
}