This commit is contained in:
parent
386430b9f2
commit
c434882e37
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "fsfw/filesystem/HasFileSystemIF.h"
|
||||||
#include "fsfw/ipc/MessageQueueIF.h"
|
#include "fsfw/ipc/MessageQueueIF.h"
|
||||||
#include "fsfw/returnvalues/returnvalue.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "mission/memory/SdCardMountedIF.h"
|
#include "mission/memory/SdCardMountedIF.h"
|
||||||
@ -177,7 +178,7 @@ void StarTrackerHandler::loadTargetFirmwareFromPersistentCfg() {
|
|||||||
const char* prefix = sdCardIF.getCurrentMountPrefix();
|
const char* prefix = sdCardIF.getCurrentMountPrefix();
|
||||||
std::filesystem::path path = std::filesystem::path(prefix) / startracker::FW_TARGET_CFG_PATH;
|
std::filesystem::path path = std::filesystem::path(prefix) / startracker::FW_TARGET_CFG_PATH;
|
||||||
std::ifstream ifile(path);
|
std::ifstream ifile(path);
|
||||||
if (ifile.is_open()) {
|
if (ifile.is_open() and !ifile.bad()) {
|
||||||
std::string targetStr;
|
std::string targetStr;
|
||||||
std::getline(ifile, targetStr);
|
std::getline(ifile, targetStr);
|
||||||
if (targetStr == "backup") {
|
if (targetStr == "backup") {
|
||||||
@ -2896,7 +2897,7 @@ ReturnValue_t StarTrackerHandler::checkCommand(ActionId_t actionId) {
|
|||||||
case startracker::REQ_CENTROID:
|
case startracker::REQ_CENTROID:
|
||||||
case startracker::REQ_CENTROIDS:
|
case startracker::REQ_CENTROIDS:
|
||||||
case startracker::REQ_CONTRAST: {
|
case startracker::REQ_CONTRAST: {
|
||||||
if (getMode() == MODE_ON and getSubmode() != startracker::Program::FIRMWARE_MAIN) {
|
if (getMode() == MODE_ON and getSubmode() != startracker::SUBMODE_FIRMWARE) {
|
||||||
return STARTRACKER_NOT_RUNNING_FIRMWARE;
|
return STARTRACKER_NOT_RUNNING_FIRMWARE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2904,7 +2905,7 @@ ReturnValue_t StarTrackerHandler::checkCommand(ActionId_t actionId) {
|
|||||||
case startracker::FIRMWARE_UPDATE_MAIN:
|
case startracker::FIRMWARE_UPDATE_MAIN:
|
||||||
case startracker::FIRMWARE_UPDATE_BACKUP:
|
case startracker::FIRMWARE_UPDATE_BACKUP:
|
||||||
case startracker::FLASH_READ:
|
case startracker::FLASH_READ:
|
||||||
if (getMode() != MODE_ON or getSubmode() != startracker::Program::BOOTLOADER) {
|
if (getMode() != MODE_ON or getSubmode() != startracker::SUBMODE_BOOTLOADER) {
|
||||||
return STARTRACKER_NOT_RUNNING_BOOTLOADER;
|
return STARTRACKER_NOT_RUNNING_BOOTLOADER;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2940,8 +2941,7 @@ ReturnValue_t StarTrackerHandler::getParameter(uint8_t domainId, uint8_t uniqueI
|
|||||||
of << "backup\n";
|
of << "backup\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sif::warning << "SD card not usable" << std::endl;
|
return HasFileSystemIF::FILESYSTEM_INACTIVE;
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
|
@ -253,7 +253,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
|
|||||||
|
|
||||||
auto psbParamsService5 =
|
auto psbParamsService5 =
|
||||||
PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, config::EIVE_PUS_APID, pus::PUS_SERVICE_5);
|
PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, config::EIVE_PUS_APID, pus::PUS_SERVICE_5);
|
||||||
psbParamsService5.requestQueueDepth = 50;
|
psbParamsService5.requestQueueDepth = 50;
|
||||||
psbParamsService5.maxPacketsPerCycle = 50;
|
psbParamsService5.maxPacketsPerCycle = 50;
|
||||||
new Service5EventReporting(psbParamsService5, 80, 160);
|
new Service5EventReporting(psbParamsService5, 80, 160);
|
||||||
new Service8FunctionManagement(objects::PUS_SERVICE_8_FUNCTION_MGMT, config::EIVE_PUS_APID,
|
new Service8FunctionManagement(objects::PUS_SERVICE_8_FUNCTION_MGMT, config::EIVE_PUS_APID,
|
||||||
|
Loading…
Reference in New Issue
Block a user