v1.12.0 #269

Merged
muellerr merged 493 commits from develop into main 2022-07-04 11:19:05 +02:00
3 changed files with 6 additions and 16 deletions
Showing only changes of commit 036024db7e - Show all commits

View File

@ -155,7 +155,7 @@ void initmission::initTasks() {
#endif #endif
PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask( PeriodicTaskIF* tcsPollingTask = factory->createPeriodicTask(
"TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc); "TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF); result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF); initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
@ -181,6 +181,7 @@ void initmission::initTasks() {
objects::RTD_15_IC18_IMTQ, objects::RTD_15_IC18_IMTQ,
}; };
#if OBSW_ADD_RTD_DEVICES == 1 #if OBSW_ADD_RTD_DEVICES == 1
tcsTask->addComponent(objects::TCS_BOARD_ASS);
for (const auto& rtd : rtdIds) { for (const auto& rtd : rtdIds) {
tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION); tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION);
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE); tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE);
@ -188,7 +189,6 @@ void initmission::initTasks() {
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ); tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ);
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ); tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ);
} }
tcsTask->addComponent(objects::TCS_BOARD_ASS);
#endif /* OBSW_ADD_RTD_DEVICES */ #endif /* OBSW_ADD_RTD_DEVICES */
// FS task, task interval does not matter because it runs in permanent loop, priority low // FS task, task interval does not matter because it runs in permanent loop, priority low

View File

@ -10,15 +10,6 @@ Max31865RtdReader::Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelCom
} }
ReturnValue_t Max31865RtdReader::performOperation(uint8_t operationCode) { ReturnValue_t Max31865RtdReader::performOperation(uint8_t operationCode) {
using namespace MAX31865;
while (true) {
rtdMainLoop();
// Read all RTDs at once every 500 ms for now
TaskFactory::delayTask(500);
}
}
void Max31865RtdReader::rtdMainLoop() {
using namespace MAX31865; using namespace MAX31865;
ReturnValue_t result = RETURN_OK; ReturnValue_t result = RETURN_OK;
// Stopwatch watch; // Stopwatch watch;
@ -27,17 +18,17 @@ void Max31865RtdReader::rtdMainLoop() {
TaskFactory::delayTask(10); TaskFactory::delayTask(10);
} else { } else {
// No devices usable (e.g. TCS board off) // No devices usable (e.g. TCS board off)
return; return RETURN_OK;
} }
result = periodicReadReqHandling(); result = periodicReadReqHandling();
if (result != RETURN_OK) { if (result != RETURN_OK) {
return; return result;
} }
// After requesting, 65 milliseconds delay required // After requesting, 65 milliseconds delay required
TaskFactory::delayTask(65); TaskFactory::delayTask(65);
periodicReadHandling(); return periodicReadHandling();
} }
bool Max31865RtdReader::rtdIsActive(uint8_t idx) { bool Max31865RtdReader::rtdIsActive(uint8_t idx) {

View File

@ -44,7 +44,7 @@ class Max31865RtdReader : public SystemObject,
public: public:
Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelComIF, GpioIF* gpioIF); Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelComIF, GpioIF* gpioIF);
[[noreturn]] ReturnValue_t performOperation(uint8_t operationCode) override; ReturnValue_t performOperation(uint8_t operationCode) override;
ReturnValue_t initialize() override; ReturnValue_t initialize() override;
private: private:
@ -59,7 +59,6 @@ class Max31865RtdReader : public SystemObject,
uint32_t csTimeoutMs = 0; uint32_t csTimeoutMs = 0;
MutexIF* csLock = nullptr; MutexIF* csLock = nullptr;
void rtdMainLoop();
bool periodicInitHandling(); bool periodicInitHandling();
ReturnValue_t periodicReadReqHandling(); ReturnValue_t periodicReadReqHandling();
ReturnValue_t periodicReadHandling(); ReturnValue_t periodicReadHandling();