Unlock STR secondary slot #864
No reviewers
Labels
No Label
OPS TODO
api change
breaking api change
bug
documentation
duplicate
feature
help wanted
invalid
question
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: eive/eive-obsw#864
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "str-secondary-fw-slot-update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I still hate this handler but this went better than expected. Requires eive/eive-tmtc#276
these changes allow working with the secondary slotto WIP: Unlock STR secondary slot07d3ec3695
to9a1d91c261
WIP: Unlock STR secondary slotto Unlock STR secondary slot@ -375,3 +381,3 @@
return returnvalue::FAILED;
}
result = checkActionReply(replyLen);
result = checkActionReply(replyLen, "sky image upload");
is this a copy pasta mistake or why do we have "sky image upload" twice? (one is read the other one write?)
it's part of the same algorithm.
@ -168,0 +176,4 @@
void StarTrackerHandler::loadTargetFirmwareFromPersistentCfg() {
const char* prefix = sdCardIF.getCurrentMountPrefix();
std::filesystem::path path = std::filesystem::path(prefix) / startracker::FW_TARGET_CFG_PATH;
std::ifstream ifile(path);
what if the file does not exist
it will just use the main slot. But a check is missing..
@ -168,0 +181,4 @@
std::string targetStr;
std::getline(ifile, targetStr);
if (targetStr == "backup") {
firmwareTargetRaw = static_cast<uint8_t>(startracker::FirmwareTarget::BACKUP);
what if it is on
BACKUP
and we want to change it back toMAIN
this is manipulated using parameters
@ -2404,2 +2435,2 @@
sif::warning << "StarTrackerHandler::checkProgram: Version set has invalid program ID"
<< std::endl;
sif::warning << "StarTrackerHandler::checkProgram: Version set has invalid program ID "
<< (int)versionSet.program.value << std::endl;
using c casts in c++ GASP
how dare he (angy emoji here)
@ -2866,3 +2897,3 @@
case startracker::REQ_CENTROIDS:
case startracker::REQ_CONTRAST: {
if (getMode() == MODE_ON and getSubmode() != startracker::Program::FIRMWARE) {
if (getMode() == MODE_ON and getSubmode() != startracker::Program::FIRMWARE_MAIN) {
what is with
FIRMWARE_BACKUP
@ -2886,0 +2941,4 @@
}
} else {
sif::warning << "SD card not usable" << std::endl;
return returnvalue::FAILED;
maybe a custom rtval here
@ -489,7 +496,8 @@ static constexpr uint8_t MATCHED_CENTROIDS = 40;
namespace Program {
static const uint8_t BOOTLOADER = 1;
submodes are already defined in line 14. why are they again defined here? why not of type submode?
these parameters actually display/model the program numbers received from the STR software.