ACS Controller Init #275

Merged
meierj merged 12 commits from mueller/acs-ctrl into develop 2022-08-16 17:34:21 +02:00
9 changed files with 41 additions and 28 deletions
Showing only changes of commit c99cb4a81e - Show all commits

View File

@ -133,6 +133,11 @@ void initmission::initTasks() {
}
#endif /* OBSW_ADD_ACS_HANDLERS */
acsTask->addComponent(objects::ACS_CONTROLLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("ACS_CTRL", objects::ACS_CONTROLLER);
}
PeriodicTaskIF* sysTask = factory->createPeriodicTask(
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
static_cast<void>(sysTask);

View File

@ -63,4 +63,5 @@ void ObjectFactory::produce(void* args) {
createMiscComponents();
createThermalController();
createAcsController();
}

View File

@ -8,6 +8,7 @@
#include <fsfw_hal/linux/spi/SpiCookie.h>
#include <linux/callbacks/gpioCallbacks.h>
#include <linux/devices/Max31865RtdLowlevelHandler.h>
#include <mission/controller/AcsController.h>
#include <mission/controller/ThermalController.h>
#include <mission/devices/Max31865EiveHandler.h>
#include <mission/devices/Max31865PT1000Handler.h>
@ -324,6 +325,8 @@ void ObjectFactory::createThermalController() {
new ThermalController(objects::THERMAL_CONTROLLER, objects::NO_OBJECT);
}
void ObjectFactory::createAcsController() { new AcsController(objects::ACS_CONTROLLER); }
void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) {
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "ObjectFactory: Adding GPIOs failed for " << output << std::endl;

View File

@ -1,7 +1,7 @@
#pragma once
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include <string>
@ -19,5 +19,6 @@ void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* p
void gpioChecker(ReturnValue_t result, std::string output);
void createThermalController();
void createAcsController();
} // namespace ObjectFactory

View File

@ -1,10 +1,22 @@
/*
* AcsController.cpp
*
* Created on: Aug 12, 2022
* Author: rmueller
*/
#include "AcsController.h"
AcsController::AcsController(object_id_t objectId)
: ExtendedControllerBase(objectId, objects::NO_OBJECT) {}
ReturnValue_t AcsController::handleCommandMessage(CommandMessage *message) {
return HasReturnvaluesIF::RETURN_OK;
}
void AcsController::performControlOperation() {}
ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
return HasReturnvaluesIF::RETURN_OK;
}
LocalPoolDataSetBase *AcsController::getDataSetHandle(sid_t sid) { return nullptr; }
ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode) {
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -3,29 +3,25 @@
#include <fsfw/controller/ExtendedControllerBase.h>
class AcsController: public ExtendedControllerBase {
public:
private:
class AcsController : public ExtendedControllerBase {
public:
AcsController(object_id_t objectId);
private:
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
void performControlOperation() override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
LocalDataPoolManager& poolManager) override;
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
// Mode abstract functions
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t* msToReachTheMode) override;
uint32_t* msToReachTheMode) override;
// MGMs
// Sun Sensors
};
#endif /* MISSION_CONTROLLER_ACSCONTROLLER_H_ */

View File

@ -1,3 +1,4 @@
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "")
target_sources(${LIB_EIVE_MISSION} PRIVATE ThermalController.cpp)
target_sources(${LIB_EIVE_MISSION} PRIVATE ThermalController.cpp
AcsController.cpp)
endif()

View File

@ -1,5 +1,2 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE
CCSDSHandler.cpp
VirtualChannel.cpp
TmFunnel.cpp
)
target_sources(${LIB_EIVE_MISSION} PRIVATE CCSDSHandler.cpp VirtualChannel.cpp
TmFunnel.cpp)

View File

@ -1,5 +1,2 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE
Timestamp.cpp
ProgressPrinter.cpp
Filenaming.cpp
)
target_sources(${LIB_EIVE_MISSION} PRIVATE Timestamp.cpp ProgressPrinter.cpp
Filenaming.cpp)