v1.16.0 #323

Merged
muellerr merged 223 commits from develop into main 2022-11-18 14:23:24 +01:00
10 changed files with 40 additions and 43 deletions
Showing only changes of commit 66c6f08447 - Show all commits

View File

@ -340,8 +340,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
SpiCookie* spiCookie =
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler0 = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, spi::LIS3_TRANSITION_DELAY);
auto mgmLis3Handler0 = new MgmLIS3MDLHandler(
objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_0_LIS3_HANDLER);
mgmLis3Handler0->setCustomFdir(fdir);
assemblyChildren.push_back(*mgmLis3Handler0);
@ -371,8 +371,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
spiCookie =
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, MGMLIS3MDL::MAX_BUFFER_SIZE,
spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto* mgmLis3Handler2 = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, spi::LIS3_TRANSITION_DELAY);
auto* mgmLis3Handler2 = new MgmLIS3MDLHandler(
objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::LIS3_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_2_LIS3_HANDLER);
mgmLis3Handler2->setCustomFdir(fdir);
assemblyChildren.push_back(*mgmLis3Handler2);
@ -386,8 +386,9 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
spiCookie =
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto* mgmRm3100Handler3 = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, spi::RM3100_TRANSITION_DELAY);
auto* mgmRm3100Handler3 =
new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
spi::RM3100_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::MGM_3_RM3100_HANDLER);
mgmRm3100Handler3->setCustomFdir(fdir);
assemblyChildren.push_back(*mgmRm3100Handler3);
@ -447,8 +448,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
// Gyro 3 Side B
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler3 = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF,
spiCookie, spi::L3G_TRANSITION_DELAY);
auto gyroL3gHandler3 = new GyroHandlerL3GD20H(
objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
fdir = new AcsBoardFdir(objects::GYRO_3_L3G_HANDLER);
gyroL3gHandler3->setCustomFdir(fdir);
assemblyChildren.push_back(*gyroL3gHandler3);
@ -477,9 +478,9 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
static_cast<void>(acsAss);
for (auto& assChild : assemblyChildren) {
ReturnValue_t result = assChild.get().connectModeTreeParent(*acsAss);
if(result != returnvalue::OK) {
sif::error << "Connecting assembly for ACS board component " <<
assChild.get().getObjectId() << " failed" << std::endl;
if (result != returnvalue::OK) {
sif::error << "Connecting assembly for ACS board component " << assChild.get().getObjectId()
<< " failed" << std::endl;
}
}
gpsCtrl->connectModeTreeParent(*acsAss);
@ -693,11 +694,11 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
}
RwHelper rwHelper(rwIds);
auto* rwAss = new RwAssembly(objects::RW_ASS, pwrSwitcher,
pcdu::Switches::PDU2_CH2_RW_5V, rwHelper);
auto* rwAss =
new RwAssembly(objects::RW_ASS, pwrSwitcher, pcdu::Switches::PDU2_CH2_RW_5V, rwHelper);
for (uint8_t idx = 0; idx < rws.size(); idx++) {
ReturnValue_t result = rws[idx]->connectModeTreeParent(*rwAss);
if(result != returnvalue::OK) {
if (result != returnvalue::OK) {
sif::error << "Connecting RW " << static_cast<int>(idx) << " to RW assembly failed"
<< std::endl;
}

View File

@ -64,6 +64,6 @@ void ObjectFactory::produce(void* args) {
createMiscComponents();
createThermalController();
createAcsController();
createAcsController(true);
satsystem::initAcsSubsystem(objects::NO_OBJECT);
}

View File

@ -1,6 +1,7 @@
#include "ObjectFactory.h"
#include <fsfw/power/PowerSwitchIF.h>
#include <fsfw/subsystem/Subsystem.h>
#include <fsfw_hal/common/gpio/GpioCookie.h>
#include <fsfw_hal/common/gpio/GpioIF.h>
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
@ -22,6 +23,7 @@
#include "devConf.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "mission/system/tree/acsModeTree.h"
void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF,
PowerSwitchIF* pwrSwitcher, std::string spiDev) {
@ -168,9 +170,9 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
for (auto& sus : susHandlers) {
if (sus != nullptr) {
ReturnValue_t result = sus->connectModeTreeParent(*susAss);
if(result != returnvalue::OK) {
sif::error << "Connecting SUS " << sus->getObjectId() <<
" to SUS assembly failed" << std::endl;
if (result != returnvalue::OK) {
sif::error << "Connecting SUS " << sus->getObjectId() << " to SUS assembly failed"
<< std::endl;
}
#if OBSW_TEST_SUS == 1
sus->setStartUpImmediately();
@ -299,7 +301,7 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
new Max31865EiveHandler(rtdInfos[idx].first, objects::SPI_RTD_COM_IF, rtdLowLevelCookie);
rtds[idx]->setDeviceInfo(idx, rtdInfos[idx].second);
ReturnValue_t result = rtds[idx]->connectModeTreeParent(*tcsBoardAss);
if(result != returnvalue::OK) {
if (result != returnvalue::OK) {
sif::error << "Connecting RTD " << static_cast<int>(idx) << " to RTD Assembly failed"
<< std::endl;
}
@ -321,8 +323,12 @@ void ObjectFactory::createThermalController() {
new ThermalController(objects::THERMAL_CONTROLLER);
}
AcsController* ObjectFactory::createAcsController() {
return new AcsController(objects::ACS_CONTROLLER);
AcsController* ObjectFactory::createAcsController(bool connectSubsystem) {
auto acsCtrl = new AcsController(objects::ACS_CONTROLLER);
if (connectSubsystem) {
acsCtrl->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
}
return acsCtrl;
}
void ObjectFactory::gpioChecker(ReturnValue_t result, std::string output) {

View File

@ -20,6 +20,6 @@ void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* p
void gpioChecker(ReturnValue_t result, std::string output);
void createThermalController();
AcsController* createAcsController();
AcsController* createAcsController(bool connectSubsystem);
} // namespace ObjectFactory

View File

@ -18,9 +18,7 @@
GPSHyperionLinuxController::GPSHyperionLinuxController(object_id_t objectId, object_id_t parentId,
bool debugHyperionGps)
: ExtendedControllerBase(objectId),
gpsSet(this),
debugHyperionGps(debugHyperionGps) {
: ExtendedControllerBase(objectId), gpsSet(this), debugHyperionGps(debugHyperionGps) {
timeUpdateCd.resetTimer();
}

View File

@ -274,6 +274,4 @@ void AcsBoardAssembly::refreshHelperModes() {
}
}
ReturnValue_t AcsBoardAssembly::initialize() {
return AssemblyBase::initialize();
}
ReturnValue_t AcsBoardAssembly::initialize() { return AssemblyBase::initialize(); }

View File

@ -1,7 +1,7 @@
#include "RwAssembly.h"
RwAssembly::RwAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher,
power::Switch_t switcher, RwHelper helper)
RwAssembly::RwAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, power::Switch_t switcher,
RwHelper helper)
: AssemblyBase(objectId), helper(helper), switcher(pwrSwitcher, switcher) {
ModeListEntry entry;
for (uint8_t idx = 0; idx < NUMBER_RWS; idx++) {
@ -167,9 +167,7 @@ bool RwAssembly::isUseable(object_id_t object, Mode_t mode) {
return false;
}
ReturnValue_t RwAssembly::initialize() {
return SubsystemBase::initialize();
}
ReturnValue_t RwAssembly::initialize() { return SubsystemBase::initialize(); }
void RwAssembly::handleModeTransitionFailed(ReturnValue_t result) {
if (targetMode == MODE_OFF) {

View File

@ -12,8 +12,8 @@ struct RwHelper {
class RwAssembly : public AssemblyBase {
public:
RwAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher,
power::Switch_t switcher, RwHelper helper);
RwAssembly(object_id_t objectId, PowerSwitchIF* pwrSwitcher, power::Switch_t switcher,
RwHelper helper);
private:
static constexpr uint8_t NUMBER_RWS = 4;

View File

@ -120,9 +120,7 @@ ReturnValue_t SusAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_t wan
return returnvalue::OK;
}
ReturnValue_t SusAssembly::initialize() {
return AssemblyBase::initialize();
}
ReturnValue_t SusAssembly::initialize() { return AssemblyBase::initialize(); }
bool SusAssembly::isUseable(object_id_t object, Mode_t mode) {
if (healthHelper.healthTable->isFaulty(object)) {

View File

@ -89,9 +89,7 @@ ReturnValue_t TcsBoardAssembly::isModeCombinationValid(Mode_t mode, Submode_t su
return HasModesIF::INVALID_MODE;
}
ReturnValue_t TcsBoardAssembly::initialize() {
return AssemblyBase::initialize();
}
ReturnValue_t TcsBoardAssembly::initialize() { return AssemblyBase::initialize(); }
void TcsBoardAssembly::startTransition(Mode_t mode, Submode_t submode) {
if (mode != MODE_OFF) {