Host SW bugfixes #618

Merged
muellerr merged 8 commits from try_fix_host_obsw into main 2023-04-28 09:37:56 +02:00
9 changed files with 42 additions and 22 deletions

View File

@ -16,6 +16,16 @@ will consitute of a breaking change warranting a new major release:
# [unreleased]
## Changed
- Event Manager queue depth is configurable now.
- Do not construct and schedule broken TMP1075 device anymore.
## Fixed
- Host build is working again. Added reduced live TM helper which schedules the PUS and CFDP
funnel.
# [v2.0.4] 2023-04-19
## Fixed

View File

@ -64,8 +64,9 @@ void ObjectFactory::produce(void* args) {
PersistentTmStores persistentStores;
auto sdcMan = new DummySdCardManager("/tmp");
ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel, *sdcMan, &ipcStore,
&tmStore, persistentStores);
&tmStore, persistentStores, 120);
new TmFunnelHandler(objects::LIVE_TM_TASK, *pusFunnel, *cfdpFunnel);
auto* dummyGpioIF = new DummyGpioIF();
auto* dummySwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
std::vector<ReturnValue_t> switcherList;

View File

@ -59,19 +59,15 @@ void scheduling::initTasks() {
"DIST", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
ReturnValue_t result = tmtcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
if (result != returnvalue::OK) {
sif::error << "adding CCSDS distributor failed" << std::endl;
sif::error << "Adding CCSDS distributor failed" << std::endl;
}
result = tmtcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
if (result != returnvalue::OK) {
sif::error << "adding PUS distributor failed" << std::endl;
}
result = tmtcDistributor->addComponent(objects::TM_FUNNEL);
if (result != returnvalue::OK) {
sif::error << "adding TM funnel failed" << std::endl;
sif::error << "Adding PUS distributor failed" << std::endl;
}
result = tmtcDistributor->addComponent(objects::CFDP_DISTRIBUTOR);
if (result != returnvalue::OK) {
sif::error << "adding CFDP distributor failed" << std::endl;
sif::error << "Adding CFDP distributor failed" << std::endl;
}
result = tmtcDistributor->addComponent(objects::UDP_TMTC_SERVER);
if (result != returnvalue::OK) {
@ -95,6 +91,13 @@ void scheduling::initTasks() {
sif::error << "Add component UDP Polling failed" << std::endl;
}
PeriodicTaskIF* liveTmTask = factory->createPeriodicTask(
"LIVE_TM", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, nullptr, &RR_SCHEDULING);
result = liveTmTask->addComponent(objects::LIVE_TM_TASK);
if (result != returnvalue::OK) {
scheduling::printAddObjectError("LIVE_TM", objects::LIVE_TM_TASK);
}
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
"PUS_HIGH_PRIO", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusHighPrio->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
@ -149,7 +152,7 @@ void scheduling::initTasks() {
"THERMAL_CTL_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
result = thermalTask->addComponent(objects::CORE_CONTROLLER);
if (result != returnvalue::OK) {
scheduling::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER);
scheduling::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
}
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
if (result != returnvalue::OK) {
@ -217,6 +220,7 @@ void scheduling::initTasks() {
tmtcDistributor->startTask();
udpPollingTask->startTask();
tcpPollingTask->startTask();
liveTmTask->startTask();
pusHighPrio->startTask();
pusMedPrio->startTask();

View File

@ -36,7 +36,8 @@ void ObjectFactory::produce(void* args) {
PersistentTmStores stores;
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
*SdCardManager::instance(), &ipcStore, &tmStore, stores);
*SdCardManager::instance(), &ipcStore, &tmStore, stores,
200);
LinuxLibgpioIF* gpioComIF = nullptr;
SerialComIF* uartComIF = nullptr;

View File

@ -32,7 +32,8 @@ void ObjectFactory::produce(void* args) {
PersistentTmStores stores;
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
*SdCardManager::instance(), &ipcStore, &tmStore, stores);
*SdCardManager::instance(), &ipcStore, &tmStore, stores,
200);
LinuxLibgpioIF* gpioComIF = nullptr;
SerialComIF* uartComIF = nullptr;

View File

@ -96,9 +96,10 @@ std::atomic_bool tcs::TCS_BOARD_SHORTLY_UNAVAILABLE = false;
void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFunnel** pusFunnel,
CfdpTmFunnel** cfdpFunnel, SdCardMountedIF& sdcMan,
StorageManagerIF** ipcStore, StorageManagerIF** tmStore,
PersistentTmStores& stores) {
PersistentTmStores& stores,
uint32_t eventManagerQueueDepth) {
// Framework objects
new EventManager(objects::EVENT_MANAGER, 160);
new EventManager(objects::EVENT_MANAGER, eventManagerQueueDepth);
auto healthTable = new HealthTable(objects::HEALTH_TABLE);
if (healthTable_ != nullptr) {
*healthTable_ = healthTable;

View File

@ -45,7 +45,7 @@ namespace ObjectFactory {
void produceGenericObjects(HealthTableIF** healthTable, PusTmFunnel** pusFunnel,
CfdpTmFunnel** cfdpFunnel, SdCardMountedIF& sdcMan,
StorageManagerIF** ipcStore, StorageManagerIF** tmStore,
PersistentTmStores& stores);
PersistentTmStores& stores, uint32_t eventManagerQueueDepth);
void createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF& pwrSwitcher,
HeaterHandler*& heaterHandler);

View File

@ -5,9 +5,11 @@
#include "fsfw/tasks/PeriodicTaskIF.h"
void scheduling::scheduleTmpTempSensors(PeriodicTaskIF* tmpTask) {
const std::array<object_id_t, 5> tmpIds = {
objects::TMP1075_HANDLER_TCS_0, objects::TMP1075_HANDLER_TCS_1,
objects::TMP1075_HANDLER_PLPCDU_0, objects::TMP1075_HANDLER_PLPCDU_1,
const std::array<object_id_t, 4> tmpIds = {objects::TMP1075_HANDLER_TCS_0,
objects::TMP1075_HANDLER_TCS_1,
objects::TMP1075_HANDLER_PLPCDU_0,
// damaged.
// objects::TMP1075_HANDLER_PLPCDU_1,
objects::TMP1075_HANDLER_IF_BOARD};
for (const auto& tmpId : tmpIds) {
tmpTask->addComponent(tmpId, DeviceHandlerIF::PERFORM_OPERATION);