Merge branch 'develop' into eggert/rw-cmd-acs-ctrl

This commit is contained in:
Marius Eggert 2023-02-13 16:06:46 +01:00
commit f864d73253
7 changed files with 21 additions and 27 deletions

View File

@ -24,10 +24,19 @@ change warranting a new major release:
## Changed ## Changed
- Remove 2 TCS threads.
- Move low level polling into ACS PST, move high level device handlers into TCS system task.
- ActCmds now returns command vectors as integers as required by the actuators - ActCmds now returns command vectors as integers as required by the actuators
and scales them to the appropriate range and scales them to the appropriate range
- All RwHandler are now polled five times per ACS cycle - All RwHandler are now polled five times per ACS cycle
# [v1.27.1] 2023-02-13
## Fixed
- Fix for SPI ComIF: Set transfer size to 0 for failed transfers
- Fix shadowing issue with locks in MAX31865 low level handler
# [v1.27.0] 2023-02-13 # [v1.27.0] 2023-02-13
eive-tmtc: v2.12.5 eive-tmtc: v2.12.5

View File

@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 1) set(OBSW_VERSION_MAJOR 1)
set(OBSW_VERSION_MINOR 27) set(OBSW_VERSION_MINOR 27)
set(OBSW_VERSION_REVISION 0) set(OBSW_VERSION_REVISION 1)
# set(CMAKE_VERBOSE TRUE) # set(CMAKE_VERBOSE TRUE)

View File

@ -214,21 +214,9 @@ void scheduling::initTasks() {
} }
#endif #endif
#if OBSW_ADD_RTD_DEVICES == 1
PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask(
"TCS_POLLING_TASK", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF);
if (result != returnvalue::OK) {
scheduling::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
}
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
"TCS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
scheduling::scheduleRtdSensors(tcsTask);
#endif
PeriodicTaskIF* tcsSystemTask = factory->createPeriodicTask( PeriodicTaskIF* tcsSystemTask = factory->createPeriodicTask(
"TCS_TASK", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc); "TCS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc);
scheduling::scheduleRtdSensors(tcsSystemTask);
result = tcsSystemTask->addComponent(objects::TCS_SUBSYSTEM); result = tcsSystemTask->addComponent(objects::TCS_SUBSYSTEM);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
scheduling::printAddObjectError("TCS_SUBSYSTEM", objects::TCS_SUBSYSTEM); scheduling::printAddObjectError("TCS_SUBSYSTEM", objects::TCS_SUBSYSTEM);
@ -364,10 +352,6 @@ void scheduling::initTasks() {
gpsTask->startTask(); gpsTask->startTask();
#endif #endif
acsSysTask->startTask(); acsSysTask->startTask();
#if OBSW_ADD_RTD_DEVICES == 1
tcsPollingTask->startTask();
tcsTask->startTask();
#endif /* OBSW_ADD_RTD_DEVICES == 1 */
if (not tcsSystemTask->isEmpty()) { if (not tcsSystemTask->isEmpty()) {
tcsSystemTask->startTask(); tcsSystemTask->startTask();
} }
@ -394,7 +378,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
#endif #endif
FixedTimeslotTaskIF* acsPst = factory.createFixedTimeslotTask( FixedTimeslotTaskIF* acsPst = factory.createFixedTimeslotTask(
"ACS_PST", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, acsPstPeriod, missedDeadlineFunc); "ACS_PST", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, acsPstPeriod, missedDeadlineFunc);
result = pst::pstAcs(acsPst, cfg); result = pst::pstTcsAndAcs(acsPst, cfg);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) { if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "scheduling::initTasks: ACS PST is empty" << std::endl; sif::warning << "scheduling::initTasks: ACS PST is empty" << std::endl;

2
fsfw

@ -1 +1 @@
Subproject commit dac2d210b597adfaf45bd5ae6a4c027599927601 Subproject commit f0b8457ba2d9a34a42b10314c3cdccfd46ebf168

View File

@ -70,8 +70,8 @@ bool Max31865RtdReader::periodicInitHandling() {
return false; return false;
} }
if ((rtd->on or rtd->db.active) and not rtd->db.configured and rtd->cd.hasTimedOut()) { if ((rtd->on or rtd->db.active) and not rtd->db.configured and rtd->cd.hasTimedOut()) {
ManualCsLockWrapper mg(csLock, gpioIF, rtd->spiCookie, csTimeoutType, csTimeoutMs); ManualCsLockWrapper mg1(csLock, gpioIF, rtd->spiCookie, csTimeoutType, csTimeoutMs);
if (mg.lockResult != returnvalue::OK or mg.gpioResult != returnvalue::OK) { if (mg1.lockResult != returnvalue::OK or mg1.gpioResult != returnvalue::OK) {
sif::error << "Max31865RtdReader::periodicInitHandling: Manual CS lock failed" << std::endl; sif::error << "Max31865RtdReader::periodicInitHandling: Manual CS lock failed" << std::endl;
continue; continue;
} }
@ -153,8 +153,8 @@ ReturnValue_t Max31865RtdReader::periodicReadHandling() {
return returnvalue::FAILED; return returnvalue::FAILED;
} }
if (rtdIsActive(rtd->idx)) { if (rtdIsActive(rtd->idx)) {
ManualCsLockWrapper mg(csLock, gpioIF, rtd->spiCookie, csTimeoutType, csTimeoutMs); ManualCsLockWrapper mg1(csLock, gpioIF, rtd->spiCookie, csTimeoutType, csTimeoutMs);
if (mg.lockResult != returnvalue::OK or mg.gpioResult != returnvalue::OK) { if (mg1.lockResult != returnvalue::OK or mg1.gpioResult != returnvalue::OK) {
sif::error << "Max31865RtdReader::periodicInitHandling: Manual CS lock failed" << std::endl; sif::error << "Max31865RtdReader::periodicInitHandling: Manual CS lock failed" << std::endl;
continue; continue;
} }

View File

@ -184,7 +184,7 @@ ReturnValue_t pst::pstTest(FixedTimeslotTaskIF *thisSequence) {
return returnvalue::OK; return returnvalue::OK;
} }
ReturnValue_t pst::pstAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg) { ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg) {
/* Length of a communication cycle */ /* Length of a communication cycle */
uint32_t length = thisSequence->getPeriodMs(); uint32_t length = thisSequence->getPeriodMs();
bool enableAside = true; bool enableAside = true;
@ -807,5 +807,6 @@ ReturnValue_t pst::pstAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg) {
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_2_PERIOD, thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_2_PERIOD,
DeviceHandlerIF::GET_READ); DeviceHandlerIF::GET_READ);
} }
thisSequence->addSlot(objects::SPI_RTD_COM_IF, length * 0.5, 0);
return returnvalue::OK; return returnvalue::OK;
} }

View File

@ -49,7 +49,7 @@ ReturnValue_t pstGompaceCan(FixedTimeslotTaskIF* thisSequence);
ReturnValue_t pstSpiAndSyrlinks(FixedTimeslotTaskIF* thisSequence); ReturnValue_t pstSpiAndSyrlinks(FixedTimeslotTaskIF* thisSequence);
ReturnValue_t pstAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg); ReturnValue_t pstTcsAndAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg);
ReturnValue_t pstI2c(FixedTimeslotTaskIF* thisSequence); ReturnValue_t pstI2c(FixedTimeslotTaskIF* thisSequence);