perm loop not necessary anymore
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-05-14 17:22:57 +02:00
parent e040f6b218
commit 036024db7e
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
3 changed files with 6 additions and 16 deletions

View File

@ -155,7 +155,7 @@ void initmission::initTasks() {
#endif
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);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
@ -181,6 +181,7 @@ void initmission::initTasks() {
objects::RTD_15_IC18_IMTQ,
};
#if OBSW_ADD_RTD_DEVICES == 1
tcsTask->addComponent(objects::TCS_BOARD_ASS);
for (const auto& rtd : rtdIds) {
tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION);
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE);
@ -188,7 +189,6 @@ void initmission::initTasks() {
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ);
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ);
}
tcsTask->addComponent(objects::TCS_BOARD_ASS);
#endif /* OBSW_ADD_RTD_DEVICES */
// 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) {
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;
ReturnValue_t result = RETURN_OK;
// Stopwatch watch;
@ -27,17 +18,17 @@ void Max31865RtdReader::rtdMainLoop() {
TaskFactory::delayTask(10);
} else {
// No devices usable (e.g. TCS board off)
return;
return RETURN_OK;
}
result = periodicReadReqHandling();
if (result != RETURN_OK) {
return;
return result;
}
// After requesting, 65 milliseconds delay required
TaskFactory::delayTask(65);
periodicReadHandling();
return periodicReadHandling();
}
bool Max31865RtdReader::rtdIsActive(uint8_t idx) {

View File

@ -44,7 +44,7 @@ class Max31865RtdReader : public SystemObject,
public:
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;
private:
@ -59,7 +59,6 @@ class Max31865RtdReader : public SystemObject,
uint32_t csTimeoutMs = 0;
MutexIF* csLock = nullptr;
void rtdMainLoop();
bool periodicInitHandling();
ReturnValue_t periodicReadReqHandling();
ReturnValue_t periodicReadHandling();