some more robustness tweaks

This commit is contained in:
2022-11-28 11:21:12 +01:00
parent bd3350c28a
commit 2338d951c7
5 changed files with 55 additions and 28 deletions

View File

@ -379,6 +379,11 @@ ReturnValue_t PlocSupvUartManager::writeUpdatePackets() {
ProgressPrinter::HALF_PERCENT);
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
uint8_t tempData[supv::WriteMemory::CHUNK_MAX + 1]{};
if (not std::filesystem::exists(update.file)) {
sif::error << "PlocSupvUartManager::writeUpdatePackets: File "
<< update.file << " does not exist" << std::endl;
return HasFileSystemIF::FILE_DOES_NOT_EXIST;
}
std::ifstream file(update.file, std::ifstream::binary);
uint16_t dataLength = 0;
ccsds::SequenceFlags seqFlags;

View File

@ -253,7 +253,7 @@ class PlocSupvUartManager : public DeviceCommunicationIF,
std::array<uint8_t, supv::MAX_COMMAND_SIZE> tmBuf{};
bool printTc = false;
bool printTc = true;
bool debugMode = false;
bool timestamping = true;