checked FS usage
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
#include "StrHelper.h"
|
||||
|
||||
#include <fsfw/filesystem/HasFileSystemIF.h>
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
|
||||
@ -176,6 +178,11 @@ void StrHelper::disableTimestamping() { timestamping = false; }
|
||||
void StrHelper::enableTimestamping() { timestamping = true; }
|
||||
|
||||
ReturnValue_t StrHelper::performImageDownload() {
|
||||
#ifdef XIPHOS_Q7S
|
||||
if (not sdcMan->getActiveSdCard()) {
|
||||
return HasFileSystemIF::FILESYSTEM_INACTIVE;
|
||||
}
|
||||
#endif
|
||||
ReturnValue_t result;
|
||||
#if OBSW_DEBUG_STARTRACKER == 1
|
||||
ProgressPrinter progressPrinter("Image download", ImageDownload::LAST_POSITION);
|
||||
@ -244,6 +251,11 @@ ReturnValue_t StrHelper::performImageUpload() {
|
||||
uint32_t imageSize = 0;
|
||||
struct UploadActionRequest uploadReq;
|
||||
uploadReq.position = 0;
|
||||
#ifdef XIPHOS_Q7S
|
||||
if (not sdcMan->getActiveSdCard()) {
|
||||
return HasFileSystemIF::FILESYSTEM_INACTIVE;
|
||||
}
|
||||
#endif
|
||||
std::memset(&uploadReq.data, 0, sizeof(uploadReq.data));
|
||||
if (not std::filesystem::exists(uploadImage.uploadFile)) {
|
||||
triggerEvent(STR_HELPER_FILE_NOT_EXISTS, static_cast<uint32_t>(internalState));
|
||||
@ -315,6 +327,11 @@ ReturnValue_t StrHelper::performFirmwareUpdate() {
|
||||
}
|
||||
|
||||
ReturnValue_t StrHelper::performFlashWrite() {
|
||||
#ifdef XIPHOS_Q7S
|
||||
if (not sdcMan->getActiveSdCard()) {
|
||||
return HasFileSystemIF::FILESYSTEM_INACTIVE;
|
||||
}
|
||||
#endif
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
uint32_t size = 0;
|
||||
uint32_t bytesWritten = 0;
|
||||
@ -394,6 +411,11 @@ ReturnValue_t StrHelper::performFlashWrite() {
|
||||
}
|
||||
|
||||
ReturnValue_t StrHelper::performFlashRead() {
|
||||
#ifdef XIPHOS_Q7S
|
||||
if (not sdcMan->getActiveSdCard()) {
|
||||
return HasFileSystemIF::FILESYSTEM_INACTIVE;
|
||||
}
|
||||
#endif
|
||||
ReturnValue_t result;
|
||||
#if OBSW_DEBUG_STARTRACKER == 1
|
||||
ProgressPrinter progressPrinter("Flash read", flashRead.size);
|
||||
|
Reference in New Issue
Block a user