this should do the job
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
parent
d10ff4efa6
commit
dcd0a650f0
@ -43,7 +43,6 @@
|
||||
#include "mission/system/fdir/SusFdir.h"
|
||||
#include "mission/system/fdir/SyrlinksFdir.h"
|
||||
#include "mission/system/objects/RwAssembly.h"
|
||||
#include "mission/system/objects/SusAssembly.h"
|
||||
#include "mission/system/objects/TcsBoardAssembly.h"
|
||||
#include "mission/system/tree/acsModeTree.h"
|
||||
#include "tmtc/pusIds.h"
|
||||
@ -341,11 +340,11 @@ 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 mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
|
||||
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);
|
||||
mgmLis3Handler->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*mgmLis3Handler);
|
||||
mgmLis3Handler0->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*mgmLis3Handler0);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
mgmLis3Handler->setStartUpImmediately();
|
||||
mgmLis3Handler->setToGoToNormalMode(true);
|
||||
@ -356,12 +355,12 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
spiCookie =
|
||||
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, RM3100::MAX_BUFFER_SIZE,
|
||||
spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
||||
auto mgmRm3100Handler =
|
||||
auto mgmRm3100Handler1 =
|
||||
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
|
||||
spi::RM3100_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::MGM_1_RM3100_HANDLER);
|
||||
mgmRm3100Handler->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*mgmRm3100Handler);
|
||||
mgmRm3100Handler1->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*mgmRm3100Handler1);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
mgmRm3100Handler->setStartUpImmediately();
|
||||
mgmRm3100Handler->setToGoToNormalMode(true);
|
||||
@ -372,11 +371,11 @@ 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);
|
||||
mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_MAIN_COM_IF,
|
||||
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);
|
||||
mgmLis3Handler->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*mgmLis3Handler);
|
||||
mgmLis3Handler2->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*mgmLis3Handler2);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
mgmLis3Handler->setStartUpImmediately();
|
||||
mgmLis3Handler->setToGoToNormalMode(true);
|
||||
@ -387,11 +386,11 @@ 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);
|
||||
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_MAIN_COM_IF,
|
||||
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);
|
||||
mgmRm3100Handler->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*mgmRm3100Handler);
|
||||
mgmRm3100Handler3->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*mgmRm3100Handler3);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
mgmRm3100Handler->setStartUpImmediately();
|
||||
mgmRm3100Handler->setToGoToNormalMode(true);
|
||||
@ -420,12 +419,11 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
// Gyro 1 Side A
|
||||
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, L3GD20H::MAX_BUFFER_SIZE,
|
||||
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
||||
auto gyroL3gHandler = new GyroHandlerL3GD20H(
|
||||
auto gyroL3gHandler1 = new GyroHandlerL3GD20H(
|
||||
objects::GYRO_1_L3G_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie, spi::L3G_TRANSITION_DELAY);
|
||||
fdir = new AcsBoardFdir(objects::GYRO_1_L3G_HANDLER);
|
||||
gyroL3gHandler->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*gyroL3gHandler);
|
||||
static_cast<void>(gyroL3gHandler);
|
||||
gyroL3gHandler1->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*gyroL3gHandler1);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
gyroL3gHandler->setStartUpImmediately();
|
||||
gyroL3gHandler->setToGoToNormalMode(true);
|
||||
@ -449,11 +447,11 @@ 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);
|
||||
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_MAIN_COM_IF,
|
||||
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);
|
||||
gyroL3gHandler->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*gyroL3gHandler);
|
||||
gyroL3gHandler3->setCustomFdir(fdir);
|
||||
assemblyChildren.push_back(*gyroL3gHandler3);
|
||||
#if OBSW_TEST_ACS == 1
|
||||
gyroL3gHandler->setStartUpImmediately();
|
||||
gyroL3gHandler->setToGoToNormalMode(true);
|
||||
@ -478,9 +476,12 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
||||
new AcsBoardAssembly(objects::ACS_BOARD_ASS, pwrSwitcher, acsBoardHelper, gpioComIF);
|
||||
acsAss->connectModeTreeParent(satsystem::ACS_SUBSYSTEM);
|
||||
static_cast<void>(acsAss);
|
||||
auto assQueueId = acsAss->getCommandQueue();
|
||||
for (auto& assChild : assemblyChildren) {
|
||||
assChild.get().setParentQueue(assQueueId);
|
||||
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;
|
||||
}
|
||||
}
|
||||
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
|
||||
}
|
||||
@ -693,7 +694,13 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
|
||||
RwHelper rwHelper(rwIds);
|
||||
auto* rwAss = new RwAssembly(objects::RW_ASS, objects::NO_OBJECT, pwrSwitcher,
|
||||
pcdu::Switches::PDU2_CH2_RW_5V, rwHelper);
|
||||
static_cast<void>(rwAss);
|
||||
for (uint8_t idx = 0; idx < rws.size(); idx++) {
|
||||
ReturnValue_t result = rws[idx]->connectModeTreeParent(*rwAss);
|
||||
if(result != returnvalue::OK) {
|
||||
sif::error << "Connecting RW " << static_cast<int>(idx) << " to RW assembly failed"
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
#endif /* OBSW_ADD_RW == 1 */
|
||||
}
|
||||
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit f824004897e29bf90c2b02578625ba3d51786fdf
|
||||
Subproject commit 10dd8552446e409e40d830e25fb0eed927995764
|
@ -167,7 +167,11 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
static_cast<void>(susAss);
|
||||
for (auto& sus : susHandlers) {
|
||||
if (sus != nullptr) {
|
||||
sus->setParentQueue(susAss->getCommandQueue());
|
||||
ReturnValue_t result = sus->connectModeTreeParent(*susAss);
|
||||
if(result != returnvalue::OK) {
|
||||
sif::error << "Connecting SUS " << sus->getObjectId() <<
|
||||
" to SUS assembly failed" << std::endl;
|
||||
}
|
||||
#if OBSW_TEST_SUS == 1
|
||||
sus->setStartUpImmediately();
|
||||
sus->setToGoToNormalMode(true);
|
||||
@ -294,7 +298,11 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
rtds[idx] =
|
||||
new Max31865EiveHandler(rtdInfos[idx].first, objects::SPI_RTD_COM_IF, rtdLowLevelCookie);
|
||||
rtds[idx]->setDeviceInfo(idx, rtdInfos[idx].second);
|
||||
rtds[idx]->setParentQueue(tcsBoardAss->getCommandQueue());
|
||||
ReturnValue_t result = rtds[idx]->connectModeTreeParent(*tcsBoardAss);
|
||||
if(result != returnvalue::OK) {
|
||||
sif::error << "Connecting RTD " << static_cast<int>(idx) << " to RTD Assembly failed"
|
||||
<< std::endl;
|
||||
}
|
||||
rtdFdir = new RtdFdir(rtdInfos[idx].first);
|
||||
rtds[idx]->setCustomFdir(rtdFdir);
|
||||
#if OBSW_DEBUG_RTD == 1
|
||||
|
@ -275,42 +275,5 @@ void AcsBoardAssembly::refreshHelperModes() {
|
||||
}
|
||||
|
||||
ReturnValue_t AcsBoardAssembly::initialize() {
|
||||
// TODO: Fix this
|
||||
// ReturnValue_t result = registerChild(helper.gyro0AdisIdSideA);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// result = registerChild(helper.gyro1L3gIdSideA);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// result = registerChild(helper.gyro2AdisIdSideB);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// result = registerChild(helper.gyro3L3gIdSideB);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// result = registerChild(helper.mgm0Lis3IdSideA);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// result = registerChild(helper.mgm1Rm3100IdSideA);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// result = registerChild(helper.mgm2Lis3IdSideB);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// result = registerChild(helper.mgm3Rm3100IdSideB);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// result = registerChild(helper.gpsId);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
return AssemblyBase::initialize();
|
||||
}
|
||||
|
@ -168,14 +168,6 @@ bool RwAssembly::isUseable(object_id_t object, Mode_t mode) {
|
||||
}
|
||||
|
||||
ReturnValue_t RwAssembly::initialize() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
// TODO: Fix this
|
||||
// for (const auto& obj : helper.rwIds) {
|
||||
// result = registerChild(obj);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
return SubsystemBase::initialize();
|
||||
}
|
||||
|
||||
|
@ -121,14 +121,6 @@ ReturnValue_t SusAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_t wan
|
||||
}
|
||||
|
||||
ReturnValue_t SusAssembly::initialize() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
// TODO: Fix this
|
||||
// for (const auto& id : helper.susIds) {
|
||||
// result = registerChild(id);
|
||||
// if (result != returnvalue::OK) {
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
return AssemblyBase::initialize();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user