combining those is acutally problematic..
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2024-05-08 11:11:21 +02:00
parent 73279a0bf3
commit 0b3c928886
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 7 additions and 4 deletions

View File

@ -179,9 +179,12 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashWrite() {
ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
std::error_code e;
std::ofstream ofile(flashReadAndWrite.obcFile,
std::ios::trunc | std::ios::binary | std::ios::app);
if (ofile.bad()) {
if (std::filesystem::exists(flashReadAndWrite.obcFile)) {
// Truncate the file first.
std::ofstream ofile(flashReadAndWrite.obcFile, std::ios::binary | std::ios::trunc);
}
std::ofstream ofile(flashReadAndWrite.obcFile, std::ios::binary | std::ios::app);
if (ofile.bad() or not ofile.is_open()) {
return returnvalue::FAILED;
}
ReturnValue_t result = flashfopen(mpsoc::FileAccessModes::READ);

2
tmtc

@ -1 +1 @@
Subproject commit dccbf89da1e2b441a8fc3edc247550ca5dfbd68b
Subproject commit 067a0160405bcf53659072749eddbb7ad7f1d41c