Unlock STR secondary slot #864

Merged
meggert merged 11 commits from str-secondary-fw-slot-update into main 2024-02-28 09:21:30 +01:00
Owner

I still hate this handler but this went better than expected. Requires eive/eive-tmtc#276

I still hate this handler but this went better than expected. Requires https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/276
muellerr changed title from these changes allow working with the secondary slot to WIP: Unlock STR secondary slot 2024-02-19 11:15:41 +01:00
meggert added this to the v7.7.0 milestone 2024-02-19 11:23:45 +01:00
muellerr force-pushed str-secondary-fw-slot-update from 07d3ec3695 to 9a1d91c261 2024-02-19 17:17:21 +01:00 Compare
muellerr changed title from WIP: Unlock STR secondary slot to Unlock STR secondary slot 2024-02-19 17:17:27 +01:00
muellerr added 1 commit 2024-02-19 17:23:12 +01:00
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details
2d92368240
small bugfix
muellerr requested review from meggert 2024-02-19 17:24:00 +01:00
meggert added 1 commit 2024-02-26 13:14:59 +01:00
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details
c04be384a1
Merge branch 'main' into str-secondary-fw-slot-update
meggert added 2 commits 2024-02-26 14:06:36 +01:00
meggert added 1 commit 2024-02-26 14:07:11 +01:00
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details
386430b9f2
changelog
meggert reviewed 2024-02-26 15:56:16 +01:00
@ -375,3 +381,3 @@
return returnvalue::FAILED;
}
result = checkActionReply(replyLen);
result = checkActionReply(replyLen, "sky image upload");
Owner

is this a copy pasta mistake or why do we have "sky image upload" twice? (one is read the other one write?)

is this a copy pasta mistake or why do we have "sky image upload" twice? (one is read the other one write?)
Author
Owner

it's part of the same algorithm.

it's part of the same algorithm.
meggert marked this conversation as resolved
@ -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);
Owner

what if the file does not exist

what if the file does not exist
Author
Owner

it will just use the main slot. But a check is missing..

it will just use the main slot. But a check is missing..
meggert marked this conversation as resolved
@ -168,0 +181,4 @@
std::string targetStr;
std::getline(ifile, targetStr);
if (targetStr == "backup") {
firmwareTargetRaw = static_cast<uint8_t>(startracker::FirmwareTarget::BACKUP);
Owner

what if it is on BACKUP and we want to change it back to MAIN

what if it is on `BACKUP` and we want to change it back to `MAIN`
Author
Owner

this is manipulated using parameters

this is manipulated using parameters
meggert marked this conversation as resolved
@ -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;
Owner

using c casts in c++ GASP

using c casts in c++ *GASP*
Author
Owner

how dare he (angy emoji here)

how dare he (angy emoji here)
meggert marked this conversation as resolved
@ -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) {
Owner

what is with FIRMWARE_BACKUP

what is with `FIRMWARE_BACKUP`
meggert marked this conversation as resolved
@ -2886,0 +2941,4 @@
}
} else {
sif::warning << "SD card not usable" << std::endl;
return returnvalue::FAILED;
Owner

maybe a custom rtval here

maybe a custom rtval here
meggert marked this conversation as resolved
@ -489,7 +496,8 @@ static constexpr uint8_t MATCHED_CENTROIDS = 40;
namespace Program {
static const uint8_t BOOTLOADER = 1;
Owner

submodes are already defined in line 14. why are they again defined here? why not of type submode?

submodes are already defined in line 14. why are they again defined here? why not of type submode?
Author
Owner

these parameters actually display/model the program numbers received from the STR software.

these parameters actually display/model the program numbers received from the STR software.
meggert marked this conversation as resolved
muellerr added 1 commit 2024-02-27 10:55:02 +01:00
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details
c434882e37
code review
muellerr added 1 commit 2024-02-27 10:56:27 +01:00
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details
69f4b6de06
I LOVE STATIC_CAST. I LOVE TYPING A LOT
muellerr added 1 commit 2024-02-27 10:58:37 +01:00
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details
2ac9f972da
remove debug printout
meggert added 1 commit 2024-02-28 09:12:28 +01:00
EIVE/eive-obsw/pipeline/pr-main Build started... Details
a7b05f60a7
Merge branch 'main' into str-secondary-fw-slot-update
meggert approved these changes 2024-02-28 09:21:08 +01:00
meggert merged commit 61555aa5cf into main 2024-02-28 09:21:30 +01:00
meggert deleted branch str-secondary-fw-slot-update 2024-02-28 09:21:30 +01:00
Sign in to join this conversation.
No description provided.