This commit is contained in:
parent
0179c04472
commit
f9e8dc6e60
@ -199,7 +199,7 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
|
|||||||
if (terminate) {
|
if (terminate) {
|
||||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||||
// TODO: Might not be needed
|
// TODO: Might not be needed
|
||||||
flashfclose();
|
// flashfclose();
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
nextReadSize = mpsoc::MAX_FLASH_READ_DATA_SIZE;
|
nextReadSize = mpsoc::MAX_FLASH_READ_DATA_SIZE;
|
||||||
@ -210,7 +210,7 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
|
|||||||
if (ofile.bad() or not ofile.is_open()) {
|
if (ofile.bad() or not ofile.is_open()) {
|
||||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||||
// TODO: Might not be needed
|
// TODO: Might not be needed
|
||||||
flashfclose();
|
// flashfclose();
|
||||||
return FILE_READ_ERROR;
|
return FILE_READ_ERROR;
|
||||||
}
|
}
|
||||||
mpsoc::TcFlashRead flashReadRequest(spParams, *sequenceCount);
|
mpsoc::TcFlashRead flashReadRequest(spParams, *sequenceCount);
|
||||||
@ -218,14 +218,14 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||||
// TODO: Might not be needed
|
// TODO: Might not be needed
|
||||||
flashfclose();
|
// flashfclose();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = flashReadRequest.finishPacket();
|
result = flashReadRequest.finishPacket();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||||
// TODO: Might not be needed
|
// TODO: Might not be needed
|
||||||
flashfclose();
|
// flashfclose();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
(*sequenceCount)++;
|
(*sequenceCount)++;
|
||||||
@ -233,7 +233,7 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
std::filesystem::remove(flashReadAndWrite.obcFile, e);
|
||||||
// TODO: Might not be needed
|
// TODO: Might not be needed
|
||||||
flashfclose();
|
// flashfclose();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
readSoFar += nextReadSize;
|
readSoFar += nextReadSize;
|
||||||
|
@ -439,7 +439,7 @@ class TcFlashWrite : public TcBase {
|
|||||||
class TcFlashRead : public TcBase {
|
class TcFlashRead : public TcBase {
|
||||||
public:
|
public:
|
||||||
TcFlashRead(ploc::SpTcParams params, uint16_t sequenceCount)
|
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) {
|
ReturnValue_t setPayload(uint32_t readLen) {
|
||||||
if (readLen > MAX_FLASH_READ_DATA_SIZE) {
|
if (readLen > MAX_FLASH_READ_DATA_SIZE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user