v10.7
Some checks are pending
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop Build queued...

This commit is contained in:
Robin Müller 2023-04-14 18:31:56 +02:00
parent 9a65a9f20b
commit 33d60ccf7f
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
9 changed files with 50 additions and 40 deletions

View File

@ -17,7 +17,7 @@ will consitute of a breaking change warranting a new major release:
# [unreleased]
- q7s-package: v2.5.0
- STR firmware was updated to v10.3
- STR firmware was updated to v10.7
## Fixed
@ -27,6 +27,9 @@ will consitute of a breaking change warranting a new major release:
- Bugfix for STR where an invalid reply was received for special requests
like firmware updates.
- Bugfix for shell command executors in command controller which lead to a crash.
- Important bugfix for STR solution set.
- Fix for STR image download.
- Possible fix for STR image upload.
## Changed

View File

@ -369,7 +369,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
return actionReboot(data, size);
}
case (EXECUTE_SHELL_CMD_BLOCKING): {
std::string cmdToExecute = std::string(reinterpret_cast<const char*>(data), size);
std::string cmdToExecute = std::string(reinterpret_cast<const char *>(data), size);
int result = std::system(cmdToExecute.c_str());
if (result != 0) {
// TODO: Data reply with returnalue maybe?
@ -378,7 +378,7 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
return EXECUTION_FINISHED;
}
case (EXECUTE_SHELL_CMD_NON_BLOCKING): {
std::string cmdToExecute = std::string(reinterpret_cast<const char*>(data), size);
std::string cmdToExecute = std::string(reinterpret_cast<const char *>(data), size);
if (cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING or
shellCmdIsExecuting) {
return HasActionsIF::IS_BUSY;

View File

@ -17,6 +17,10 @@
#include "mission/utility/ProgressPrinter.h"
#include "mission/utility/Timestamp.h"
extern "C" {
#include <sagitta/client/actionreq.h>
}
using namespace returnvalue;
StrComHandler::StrComHandler(object_id_t objectId) : SystemObject(objectId) {
@ -305,6 +309,7 @@ ReturnValue_t StrComHandler::performImageUpload() {
uint32_t imageSize = 0;
struct UploadActionRequest uploadReq;
uploadReq.position = 0;
size_t writtenBytes = 0;
#ifdef XIPHOS_Q7S
if (not sdcMan->getActiveSdCard()) {
return HasFileSystemIF::FILESYSTEM_INACTIVE;
@ -327,7 +332,9 @@ ReturnValue_t StrComHandler::performImageUpload() {
#if OBSW_DEBUG_STARTRACKER == 1
ProgressPrinter progressPrinter("Image upload", imageSize);
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
while ((uploadReq.position + 1) * SIZE_IMAGE_PART < imageSize) {
size_t fullChunks = imageSize / SIZE_IMAGE_PART;
size_t remainder = imageSize % SIZE_IMAGE_PART;
for (size_t idx = 0; idx < fullChunks; idx++) {
if (terminate) {
return returnvalue::OK;
}
@ -346,6 +353,7 @@ ReturnValue_t StrComHandler::performImageUpload() {
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);
#endif /* OBSW_DEBUG_STARTRACKER == 1 */
uploadReq.position++;
writtenBytes += SIZE_IMAGE_PART;
// This does a bit of delaying roughly every second
if (uploadReq.position % 50 == 0) {
@ -353,20 +361,20 @@ ReturnValue_t StrComHandler::performImageUpload() {
TaskFactory::delayTask(2);
}
}
std::memset(uploadReq.data, 0, sizeof(uploadReq.data));
uint32_t remainder = imageSize - uploadReq.position * SIZE_IMAGE_PART;
file.seekg(uploadReq.position * SIZE_IMAGE_PART, file.beg);
file.read(reinterpret_cast<char*>(uploadReq.data), remainder);
file.close();
uploadReq.position++;
arc_pack_upload_action_req(&uploadReq, cmdBuf.data(), &size);
result = sendAndRead(size, uploadReq.position);
if (result != returnvalue::OK) {
return returnvalue::FAILED;
}
result = checkActionReply(replyLen);
if (result != returnvalue::OK) {
return result;
if (remainder > 0) {
std::memset(uploadReq.data, 0, sizeof(uploadReq.data));
file.seekg(fullChunks * SIZE_IMAGE_PART, file.beg);
file.read(reinterpret_cast<char*>(uploadReq.data), remainder);
file.close();
arc_pack_upload_action_req(&uploadReq, cmdBuf.data(), &size);
result = sendAndRead(size, uploadReq.position);
if (result != returnvalue::OK) {
return returnvalue::FAILED;
}
result = checkActionReply(replyLen);
if (result != returnvalue::OK) {
return result;
}
}
#if OBSW_DEBUG_STARTRACKER == 1
progressPrinter.print((uploadReq.position + 1) * SIZE_IMAGE_PART);

View File

@ -18,10 +18,6 @@
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw_hal/linux/serial/SerialComIF.h"
extern "C" {
#include <sagitta/client/arc_client.h>
}
/**
* @brief Helper class for the star tracker handler to accelerate large data transfers.
*
@ -176,7 +172,7 @@ class StrComHandler : public SystemObject, public DeviceCommunicationIF, public
static const uint32_t FLASH_REGION_SIZE = 0x20000;
struct ImageDownload {
static const uint32_t LAST_POSITION = 4095;
static const uint32_t LAST_POSITION = 4096;
};
static const uint32_t MAX_POLLS = 10000;

View File

@ -1084,6 +1084,7 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l
localDataPoolMap.emplace(startracker::LISA_QZ, new PoolEntry<float>({0}));
localDataPoolMap.emplace(startracker::LISA_PERC_CLOSE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(startracker::LISA_NR_CLOSE, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(startracker::STR_MODE, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(startracker::TRUST_WORTHY, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(startracker::STABLE_COUNT, new PoolEntry<uint32_t>({0}));
localDataPoolMap.emplace(startracker::SOLUTION_STRATEGY, new PoolEntry<uint8_t>({0}));

View File

@ -9,7 +9,7 @@ static const char PROPERTIES[] = "properties";
static const char NAME[] = "name";
static const char VALUE[] = "value";
static const char LIMITS[] = "limits";
static const char LIMITS[] = "Limits";
static const char ACTION[] = "action";
static const char FPGA18CURRENT[] = "FPGA18Current";
static const char FPGA25CURRENT[] = "FPGA25Current";
@ -22,20 +22,20 @@ static const char CMOSVRESCURRENT[] = "CMOSVResCurrent";
static const char CMOS_TEMPERATURE[] = "CMOSTemperature";
static const char MCU_TEMPERATURE[] = "MCUTemperature";
static const char MOUNTING[] = "mounting";
static const char MOUNTING[] = "Mounting";
static const char qw[] = "qw";
static const char qx[] = "qx";
static const char qy[] = "qy";
static const char qz[] = "qz";
static const char IMAGE_PROCESSOR[] = "imageprocessor";
static const char IMAGE_PROCESSOR[] = "ImageProcessor";
static const char IMAGE_PROCESSOR_MODE[] = "mode";
static const char STORE[] = "store";
static const char SIGNAL_THRESHOLD[] = "signalThreshold";
static const char IMAGE_PROCESSOR_DARK_THRESHOLD[] = "darkThreshold";
static const char BACKGROUND_COMPENSATION[] = "backgroundcompensation";
static const char CAMERA[] = "camera";
static const char CAMERA[] = "Camera";
static const char MODE[] = "mode";
static const char FOCALLENGTH[] = "focallength";
static const char EXPOSURE[] = "exposure";
@ -77,7 +77,7 @@ static const char ENABLE_HISTOGRAM[] = "enableHistogram";
static const char ENABLE_CONTRAST[] = "enableContrast";
static const char BIN_MODE[] = "binMode";
static const char CENTROIDING[] = "centroiding";
static const char CENTROIDING[] = "Centroiding";
static const char ENABLE_FILTER[] = "enableFilter";
static const char MAX_QUALITY[] = "maxquality";
static const char DARK_THRESHOLD[] = "darkthreshold";
@ -92,7 +92,7 @@ static const char TRANSMATRIX_01[] = "transmatrix01";
static const char TRANSMATRIX_10[] = "transmatrix10";
static const char TRANSMATRIX_11[] = "transmatrix11";
static const char LISA[] = "lisa";
static const char LISA[] = "LISA";
static const char LISA_MODE[] = "mode";
static const char PREFILTER_DIST_THRESHOLD[] = "prefilterDistThreshold";
static const char PREFILTER_ANGLE_THRESHOLD[] = "prefilterAngleThreshold";
@ -108,29 +108,29 @@ static const char MAX_COMBINATIONS[] = "max_combinations";
static const char NR_STARS_STOP[] = "nr_stars_stop";
static const char FRACTION_CLOSE_STOP[] = "fraction_close_stop";
static const char MATCHING[] = "matching";
static const char MATCHING[] = "Matching";
static const char SQUARED_DISTANCE_LIMIT[] = "squaredDistanceLimit";
static const char SQUARED_SHIFT_LIMIT[] = "squaredShiftLimit";
static const char VALIDATION[] = "validation";
static const char VALIDATION[] = "Validation";
static const char STABLE_COUNT[] = "stable_count";
static const char MAX_DIFFERENCE[] = "max_difference";
static const char MIN_TRACKER_CONFIDENCE[] = "min_trackerConfidence";
static const char MIN_MATCHED_STARS[] = "min_matchedStars";
static const char TRACKING[] = "tracking";
static const char TRACKING[] = "Tracking";
static const char THIN_LIMIT[] = "thinLimit";
static const char OUTLIER_THRESHOLD[] = "outlierThreshold";
static const char OUTLIER_THRESHOLD_QUEST[] = "outlierThresholdQUEST";
static const char TRACKER_CHOICE[] = "trackerChoice";
static const char ALGO[] = "algo";
static const char ALGO[] = "Algo";
static const char L2T_MIN_CONFIDENCE[] = "l2t_minConfidence";
static const char L2T_MIN_MATCHED[] = "l2t_minMatched";
static const char T2L_MIN_CONFIDENCE[] = "t2l_minConfidence";
static const char T2L_MIN_MATCHED[] = "t2l_minMatched";
static const char LOGLEVEL[] = "loglevel";
static const char LOGLEVEL[] = "LogLevel";
static const char LOGLEVEL1[] = "loglevel1";
static const char LOGLEVEL2[] = "loglevel2";
static const char LOGLEVEL3[] = "loglevel3";
@ -148,7 +148,7 @@ static const char LOGLEVEL14[] = "loglevel14";
static const char LOGLEVEL15[] = "loglevel15";
static const char LOGLEVEL16[] = "loglevel16";
static const char SUBSCRIPTION[] = "subscription";
static const char SUBSCRIPTION[] = "Subscription";
static const char TELEMETRY_1[] = "telemetry1";
static const char TELEMETRY_2[] = "telemetry2";
static const char TELEMETRY_3[] = "telemetry3";
@ -166,13 +166,13 @@ static const char TELEMETRY_14[] = "telemetry14";
static const char TELEMETRY_15[] = "telemetry15";
static const char TELEMETRY_16[] = "telemetry16";
static const char LOG_SUBSCRIPTION[] = "logsubscription";
static const char LOG_SUBSCRIPTION[] = "LogSubscription";
static const char LEVEL1[] = "level1";
static const char MODULE1[] = "module1";
static const char LEVEL2[] = "level2";
static const char MODULE2[] = "module2";
static const char DEBUG_CAMERA[] = "debugcamera";
static const char DEBUG_CAMERA[] = "DebugCamera";
static const char TIMING[] = "timing";
static const char TEST[] = "test";

View File

@ -91,6 +91,7 @@ enum PoolIds : lp_id_t {
LISA_QZ,
LISA_PERC_CLOSE,
LISA_NR_CLOSE,
STR_MODE,
TRUST_WORTHY,
STABLE_COUNT,
SOLUTION_STRATEGY,
@ -358,7 +359,7 @@ static const uint8_t VERSION_SET_ENTRIES = 5;
static const uint8_t INTERFACE_SET_ENTRIES = 4;
static const uint8_t POWER_SET_ENTRIES = 18;
static const uint8_t TIME_SET_ENTRIES = 4;
static const uint8_t SOLUTION_SET_ENTRIES = 23;
static const uint8_t SOLUTION_SET_ENTRIES = 25;
static const uint8_t HISTOGRAM_SET_ENTRIES = 38;
static const uint8_t CHECKSUM_SET_ENTRIES = 1;
static const uint8_t CAMERA_SET_ENTRIES = 24;
@ -682,6 +683,7 @@ class SolutionSet : public StaticLocalDataSet<SOLUTION_SET_ENTRIES> {
lp_var_t<float>(sid.objectId, PoolIds::LISA_PERC_CLOSE, this);
// Number of close stars in LISA solution
lp_var_t<uint8_t> lisaNrClose = lp_var_t<uint8_t>(sid.objectId, PoolIds::LISA_NR_CLOSE, this);
lp_var_t<uint8_t> strMode = lp_var_t<uint8_t>(sid.objectId, PoolIds::STR_MODE, this);
// Gives a combined overview of the validation parameters (1 for valid solution, otherwise 0)
lp_var_t<uint8_t> isTrustWorthy = lp_var_t<uint8_t>(sid.objectId, PoolIds::TRUST_WORTHY, this);
// Number of times the validation criteria was met

@ -1 +1 @@
Subproject commit 64332216c193fa6483258060b53fc2842c08dcf4
Subproject commit 29e876671a72fcdb0b393e2f692303725f00724f

2
tmtc

@ -1 +1 @@
Subproject commit f8da9cff7c5d6d6bdd483f90ccefb67b2d1e11a4
Subproject commit f57342602da3232c0bfecaecb0c10be6d692b384