PLOC MPSoC read file, fix write file #633

Merged
meggert merged 43 commits from ploc_mpsoc_read_file_2 into v2.1.0-dev 2023-05-19 10:05:41 +02:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit f9e8dc6e60 - Show all commits

View File

@ -199,7 +199,7 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
if (terminate) {
std::filesystem::remove(flashReadAndWrite.obcFile, e);
// TODO: Might not be needed
flashfclose();
// flashfclose();
return returnvalue::OK;
}
nextReadSize = mpsoc::MAX_FLASH_READ_DATA_SIZE;
@ -210,7 +210,7 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
if (ofile.bad() or not ofile.is_open()) {
std::filesystem::remove(flashReadAndWrite.obcFile, e);
// TODO: Might not be needed
flashfclose();
// flashfclose();
return FILE_READ_ERROR;
}
mpsoc::TcFlashRead flashReadRequest(spParams, *sequenceCount);
@ -218,14 +218,14 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
if (result != returnvalue::OK) {
std::filesystem::remove(flashReadAndWrite.obcFile, e);
// TODO: Might not be needed
flashfclose();
// flashfclose();
return result;
}
result = flashReadRequest.finishPacket();
if (result != returnvalue::OK) {
std::filesystem::remove(flashReadAndWrite.obcFile, e);
// TODO: Might not be needed
flashfclose();
// flashfclose();
return result;
}
(*sequenceCount)++;
@ -233,7 +233,7 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
if (result != returnvalue::OK) {
std::filesystem::remove(flashReadAndWrite.obcFile, e);
// TODO: Might not be needed
flashfclose();
// flashfclose();
return result;
}
readSoFar += nextReadSize;

View File

@ -439,7 +439,7 @@ class TcFlashWrite : public TcBase {
class TcFlashRead : public TcBase {
public:
TcFlashRead(ploc::SpTcParams params, uint16_t sequenceCount)
: TcBase(params, apid::TC_FLASHWRITE, sequenceCount) {}
: TcBase(params, apid::TC_FLASHREAD, sequenceCount) {}
ReturnValue_t setPayload(uint32_t readLen) {
if (readLen > MAX_FLASH_READ_DATA_SIZE) {