some tweaks for busy handling #500

Merged
muellerr merged 28 commits from tweak_papb_busy_polling into develop 2023-03-24 14:15:01 +01:00
5 changed files with 15 additions and 9 deletions
Showing only changes of commit d226726a27 - Show all commits

View File

@ -68,12 +68,14 @@ void scheduling::initTasks() {
#else #else
void (*missedDeadlineFunc)(void) = nullptr; void (*missedDeadlineFunc)(void) = nullptr;
#endif #endif
RR_SCHEDULING.policy = SchedulingPolicy::RR;
#if OBSW_ADD_SA_DEPL == 1 #if OBSW_ADD_SA_DEPL == 1
// Could add this to the core controller but the core controller does so many thing that I would // Could add this to the core controller but the core controller does so many thing that I would
// prefer to have the solar array deployment in a seprate task. // prefer to have the solar array deployment in a seprate task.
PeriodicTaskIF* solarArrayDeplTask = factory->createPeriodicTask( PeriodicTaskIF* solarArrayDeplTask =
"SOLAR_ARRAY_DEPL", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc); factory->createPeriodicTask("SOLAR_ARRAY_DEPL", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4,
missedDeadlineFunc, &RR_SCHEDULING);
result = solarArrayDeplTask->addComponent(objects::SOLAR_ARRAY_DEPL_HANDLER); result = solarArrayDeplTask->addComponent(objects::SOLAR_ARRAY_DEPL_HANDLER);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
scheduling::printAddObjectError("SOLAR_ARRAY_DEPL", objects::SOLAR_ARRAY_DEPL_HANDLER); scheduling::printAddObjectError("SOLAR_ARRAY_DEPL", objects::SOLAR_ARRAY_DEPL_HANDLER);
@ -81,7 +83,7 @@ void scheduling::initTasks() {
#endif #endif
PeriodicTaskIF* coreCtrlTask = factory->createPeriodicTask( PeriodicTaskIF* coreCtrlTask = factory->createPeriodicTask(
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc); "CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc, &RR_SCHEDULING);
result = coreCtrlTask->addComponent(objects::CORE_CONTROLLER); result = coreCtrlTask->addComponent(objects::CORE_CONTROLLER);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
scheduling::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER); scheduling::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);

2
fsfw

@ -1 +1 @@
Subproject commit 7ed75ea87b81ac071c1e2ec0f16633487b8300fd Subproject commit e704295cce76048d65bbb8893840b9ecedb05c94

View File

@ -155,9 +155,7 @@ ReturnValue_t StrComHandler::startImageDownload(std::string path) {
return returnvalue::OK; return returnvalue::OK;
} }
void StrComHandler::stopProcess() { void StrComHandler::stopProcess() { terminate = true; }
terminate = true;
}
void StrComHandler::setDownloadImageName(std::string filename) { void StrComHandler::setDownloadImageName(std::string filename) {
downloadImage.filename = filename; downloadImage.filename = filename;

View File

@ -18,8 +18,9 @@ void scheduling::scheduleScexReader(TaskFactory& factory, PeriodicTaskIF*& scexR
#endif #endif
result = returnvalue::OK; result = returnvalue::OK;
scexReaderTask = factory.createPeriodicTask( scexReaderTask =
"SCEX_UART_READER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc); factory.createPeriodicTask("SCEX_UART_READER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0,
missedDeadlineFunc, &NORMAL_SCHEDULING);
result = scexReaderTask->addComponent(objects::SCEX_UART_READER); result = scexReaderTask->addComponent(objects::SCEX_UART_READER);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
printAddObjectError("SCEX_UART_READER", objects::SCEX_UART_READER); printAddObjectError("SCEX_UART_READER", objects::SCEX_UART_READER);

View File

@ -1,8 +1,13 @@
#pragma once #pragma once
#include <fsfw/osal/linux/PosixThread.h>
#include <fsfw/tasks/TaskFactory.h> #include <fsfw/tasks/TaskFactory.h>
namespace scheduling { namespace scheduling {
extern PosixThreadArgs RR_SCHEDULING;
extern PosixThreadArgs NORMAL_SCHEDULING;
void scheduleScexDev(PeriodicTaskIF*& scexDevHandler); void scheduleScexDev(PeriodicTaskIF*& scexDevHandler);
void scheduleScexReader(TaskFactory& factory, PeriodicTaskIF*& scexReaderTask); void scheduleScexReader(TaskFactory& factory, PeriodicTaskIF*& scexReaderTask);
void addMpsocSupvHandlers(PeriodicTaskIF* task); void addMpsocSupvHandlers(PeriodicTaskIF* task);