Merge branch 'develop' into refactoring_bugfixes_power_switching
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:
commit
a4ba52e76d
@ -16,6 +16,11 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- SA deployment file handling: Use exceptionless API.
|
||||||
|
- Fix deadlock in SD card manager constructor: Double lock of preferred SD card lock.
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
||||||
- Failure of Safe Mode Ctrl will now trigger an event. As this can only be caused by sensors not
|
- Failure of Safe Mode Ctrl will now trigger an event. As this can only be caused by sensors not
|
||||||
@ -28,6 +33,7 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
- I2C PST now has a polling frequency of 0.4 seconds instead of 0.2 seconds.
|
- I2C PST now has a polling frequency of 0.4 seconds instead of 0.2 seconds.
|
||||||
- GS PST now has a polling frequency of 0.5 seconds instead of 1 second.
|
- GS PST now has a polling frequency of 0.5 seconds instead of 1 second.
|
||||||
- Bump FSFW: merged upstream.
|
- Bump FSFW: merged upstream.
|
||||||
|
- Move BPX battery scheduling to ACS PST to avoid clashes with IMTQ scheduling / polling
|
||||||
|
|
||||||
# [v1.37.2] 2023-03-14
|
# [v1.37.2] 2023-03-14
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
|
|||||||
#if OBSW_ADD_I2C_TEST_CODE == 0
|
#if OBSW_ADD_I2C_TEST_CODE == 0
|
||||||
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
|
||||||
"I2C_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.4, missedDeadlineFunc);
|
"I2C_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.4, missedDeadlineFunc);
|
||||||
result = pst::pstI2c(i2cPst);
|
result = pst::pstI2cProcessingSystem(i2cPst);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "scheduling::initTasks: I2C PST is empty" << std::endl;
|
sif::warning << "scheduling::initTasks: I2C PST is empty" << std::endl;
|
||||||
|
@ -37,7 +37,6 @@ SdCardManager::SdCardManager() : SystemObject(objects::SDC_MANAGER), cmdExecutor
|
|||||||
sif::warning << "CoreController::sdCardInit: "
|
sif::warning << "CoreController::sdCardInit: "
|
||||||
"Preferred SD card not set. Setting to 0"
|
"Preferred SD card not set. Setting to 0"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
setPreferredSdCard(sd::SdCard::SLOT_0);
|
|
||||||
scratch::writeNumber(scratch::PREFERED_SDC_KEY, static_cast<uint8_t>(sd::SdCard::SLOT_0));
|
scratch::writeNumber(scratch::PREFERED_SDC_KEY, static_cast<uint8_t>(sd::SdCard::SLOT_0));
|
||||||
prefSdRaw = sd::SdCard::SLOT_0;
|
prefSdRaw = sd::SdCard::SLOT_0;
|
||||||
|
|
||||||
|
@ -180,9 +180,11 @@ void AcsController::performSafe() {
|
|||||||
safeCtrlFailureCounter++;
|
safeCtrlFailureCounter++;
|
||||||
if (safeCtrlFailureCounter > 50) {
|
if (safeCtrlFailureCounter > 50) {
|
||||||
safeCtrlFailureFlag = false;
|
safeCtrlFailureFlag = false;
|
||||||
|
safeCtrlFailureCounter = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
safeCtrlFailureFlag = false;
|
safeCtrlFailureFlag = false;
|
||||||
|
safeCtrlFailureCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
actuatorCmd.cmdDipolMtq(magMomMtq, cmdDipolMtqs,
|
actuatorCmd.cmdDipolMtq(magMomMtq, cmdDipolMtqs,
|
||||||
|
@ -36,31 +36,25 @@ ReturnValue_t pst::pstSyrlinks(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
|
|
||||||
// I don't think this needs to be in a PST because linux takes care of bus serialization, but
|
// I don't think this needs to be in a PST because linux takes care of bus serialization, but
|
||||||
// keep it like this for now, it works
|
// keep it like this for now, it works
|
||||||
ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
ReturnValue_t pst::pstI2cProcessingSystem(FixedTimeslotTaskIF *thisSequence) {
|
||||||
// Length of a communication cycle
|
// Length of a communication cycle
|
||||||
uint32_t length = thisSequence->getPeriodMs();
|
uint32_t length = thisSequence->getPeriodMs();
|
||||||
static_cast<void>(length);
|
static_cast<void>(length);
|
||||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.2,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.2, DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.3, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.3, DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
// These are actually part of another bus, but this works, so keep it like this for now
|
// These are actually part of another bus, but this works, so keep it like this for now
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.4,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.4, DeviceHandlerIF::SEND_WRITE);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.45, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.3, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.45, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.3, DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::SEND_WRITE);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4, DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::GET_WRITE);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.55, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.55, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
@ -68,9 +62,9 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.65,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.7,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.65,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.7,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
// damaged
|
// damaged
|
||||||
/*
|
/*
|
||||||
@ -90,9 +84,9 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.8,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.8,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.85,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.9,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.85,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.9,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
static_cast<void>(length);
|
static_cast<void>(length);
|
||||||
return thisSequence->checkSequence();
|
return thisSequence->checkSequence();
|
||||||
@ -562,6 +556,12 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg
|
|||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD,
|
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
|
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD, DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD, DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_9_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * config::spiSched::SCHED_BLOCK_9_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
#if OBSW_ADD_RAD_SENSORS == 1
|
#if OBSW_ADD_RAD_SENSORS == 1
|
||||||
/* Radiation sensor */
|
/* Radiation sensor */
|
||||||
|
@ -51,7 +51,7 @@ ReturnValue_t pstSyrlinks(FixedTimeslotTaskIF* thisSequence);
|
|||||||
|
|
||||||
ReturnValue_t pstTcsAndAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg);
|
ReturnValue_t pstTcsAndAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg);
|
||||||
|
|
||||||
ReturnValue_t pstI2c(FixedTimeslotTaskIF* thisSequence);
|
ReturnValue_t pstI2cProcessingSystem(FixedTimeslotTaskIF* thisSequence);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic test PST
|
* Generic test PST
|
||||||
|
@ -157,10 +157,14 @@ ReturnValue_t SolarArrayDeploymentHandler::performAutonomousDepl(sd::SdCard sdCa
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const char* filename,
|
bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const char* infoFile,
|
||||||
bool dryRun) {
|
bool dryRun) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
ifstream file(filename);
|
std::error_code e;
|
||||||
|
ifstream file(infoFile);
|
||||||
|
if (file.bad()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
string line;
|
string line;
|
||||||
string word;
|
string word;
|
||||||
unsigned int lineNum = 0;
|
unsigned int lineNum = 0;
|
||||||
@ -240,15 +244,18 @@ bool SolarArrayDeploymentHandler::autonomousDeplForFile(sd::SdCard sdCard, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (deplState == AutonomousDeplState::DONE) {
|
if (deplState == AutonomousDeplState::DONE) {
|
||||||
remove(filename);
|
std::filesystem::remove(infoFile, e);
|
||||||
if (sdCard == sd::SdCard::SLOT_0) {
|
if (sdCard == sd::SdCard::SLOT_0) {
|
||||||
remove(SD_0_DEPL_FILE);
|
std::filesystem::remove(SD_0_DEPL_FILE, e);
|
||||||
} else {
|
} else {
|
||||||
remove(SD_1_DEPL_FILE);
|
std::filesystem::remove(SD_1_DEPL_FILE, e);
|
||||||
}
|
}
|
||||||
triggerEvent(AUTONOMOUS_DEPLOYMENT_COMPLETED);
|
triggerEvent(AUTONOMOUS_DEPLOYMENT_COMPLETED);
|
||||||
} else {
|
} else {
|
||||||
std::ofstream of(filename);
|
std::ofstream of(infoFile);
|
||||||
|
if (of.bad()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
of << "phase: ";
|
of << "phase: ";
|
||||||
if (deplState == AutonomousDeplState::INIT) {
|
if (deplState == AutonomousDeplState::INIT) {
|
||||||
of << PHASE_INIT_STR << "\n";
|
of << PHASE_INIT_STR << "\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user