v1.16.0 #323

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

View File

@ -36,15 +36,12 @@
#include "linux/obc/PdecHandler.h"
#include "linux/obc/Ptme.h"
#include "linux/obc/PtmeConfig.h"
#include "mission/system/objects/RwAssembly.h"
#include "mission/system/fdir/AcsBoardFdir.h"
#include "mission/system/fdir/GomspacePowerFdir.h"
#include "mission/system/fdir/RtdFdir.h"
#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/system.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#if OBSW_TEST_LIBGPIOD == 1
@ -96,10 +93,8 @@
#include "mission/tmtc/VirtualChannel.h"
#include "mission/utility/TmFunnel.h"
ResetArgs RESET_ARGS_GNSS_0;
ResetArgs RESET_ARGS_GNSS_1;
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
ResetArgs resetArgsGnss0;
ResetArgs resetArgsGnss1;
void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
@ -124,90 +119,7 @@ void Factory::setStaticFrameworkObjectIds() {
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
}
void ObjectFactory::produce(void* args) {
ObjectFactory::setStatics();
ObjectFactory::produceGenericObjects();
LinuxLibgpioIF* gpioComIF = nullptr;
UartComIF* uartComIF = nullptr;
SpiComIF* spiComIF = nullptr;
I2cComIF* i2cComIF = nullptr;
PowerSwitchIF* pwrSwitcher = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF, &i2cComIF);
createTmpComponents();
new CoreController(objects::CORE_CONTROLLER);
gpioCallbacks::disableAllDecoder(gpioComIF);
createPcduComponents(gpioComIF, &pwrSwitcher);
createRadSensorComponent(gpioComIF);
createSunSensorComponents(gpioComIF, spiComIF, pwrSwitcher, q7s::SPI_DEFAULT_DEV);
#if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(gpioComIF, uartComIF, pwrSwitcher);
#endif
createHeaterComponents();
createSolarArrayDeploymentComponents();
createPlPcduComponents(gpioComIF, spiComIF, pwrSwitcher);
#if OBSW_ADD_SYRLINKS == 1
createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_ADD_SYRLINKS == 1 */
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher);
createPayloadComponents(gpioComIF);
#if OBSW_ADD_MGT == 1
I2cCookie* imtqI2cCookie =
new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV);
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie,
pcdu::Switches::PDU1_CH3_MGT_5V);
imtqHandler->setPowerSwitcher(pwrSwitcher);
static_cast<void>(imtqHandler);
#if OBSW_TEST_IMTQ == 1
imtqHandler->setStartUpImmediately();
imtqHandler->setToGoToNormal(true);
#endif
#if OBSW_DEBUG_IMTQ == 1
imtqHandler->setDebugMode(true);
#endif
#endif
createReactionWheelComponents(gpioComIF);
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
BpxBatteryHandler* bpxHandler =
new BpxBatteryHandler(objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie);
bpxHandler->setStartUpImmediately();
bpxHandler->setToGoToNormalMode(true);
#if OBSW_DEBUG_BPX_BATT == 1
bpxHandler->setDebugMode(true);
#endif
#endif
new FileSystemHandler(objects::FILE_SYSTEM_HANDLER);
#if OBSW_ADD_STAR_TRACKER == 1
UartCookie* starTrackerCookie =
new UartCookie(objects::STAR_TRACKER, q7s::UART_STAR_TRACKER_DEV, uart::STAR_TRACKER_BAUD,
startracker::MAX_FRAME_SIZE * 2 + 2, UartModes::NON_CANONICAL);
starTrackerCookie->setNoFixedSizeReply();
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
auto starTracker =
new StarTrackerHandler(objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie,
strHelper, pcdu::PDU1_CH2_STAR_TRACKER_5V);
starTracker->setPowerSwitcher(pwrSwitcher);
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#if OBSW_USE_CCSDS_IP_CORE == 1
createCcsdsComponents(gpioComIF);
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
/* Test Task */
#if OBSW_ADD_TEST_CODE == 1
createTestComponents(gpioComIF);
#endif /* OBSW_ADD_TEST_CODE == 1 */
new PlocUpdater(objects::PLOC_UPDATER);
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
satsystem::init();
}
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
void ObjectFactory::createTmpComponents() {
I2cCookie* i2cCookieTmp1075tcs1 =
@ -550,15 +462,15 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
#if OBSW_DEBUG_GPS == 1
debugGps = true;
#endif
RESET_ARGS_GNSS_1.gnss1 = true;
RESET_ARGS_GNSS_1.gpioComIF = gpioComIF;
RESET_ARGS_GNSS_1.waitPeriodMs = 100;
RESET_ARGS_GNSS_0.gnss1 = false;
RESET_ARGS_GNSS_0.gpioComIF = gpioComIF;
RESET_ARGS_GNSS_0.waitPeriodMs = 100;
resetArgsGnss1.gnss1 = true;
resetArgsGnss1.gpioComIF = gpioComIF;
resetArgsGnss1.waitPeriodMs = 100;
resetArgsGnss0.gnss1 = false;
resetArgsGnss0.gpioComIF = gpioComIF;
resetArgsGnss0.waitPeriodMs = 100;
auto gpsHandler0 =
new GPSHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS_0);
gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0);
AcsBoardHelper acsBoardHelper = AcsBoardHelper(
objects::MGM_0_LIS3_HANDLER, objects::MGM_1_RM3100_HANDLER, objects::MGM_2_LIS3_HANDLER,

View File

@ -8,7 +8,7 @@
#include "linux/ObjectFactory.h"
#include "linux/callbacks/gpioCallbacks.h"
#include "mission/core/GenericFactory.h"
#include "mission/system/tree/acsModeTree.h"
#include "mission/system/tree/system.h"
void ObjectFactory::produce(void* args) {
ObjectFactory::setStatics();
@ -63,5 +63,5 @@ void ObjectFactory::produce(void* args) {
#endif /* OBSW_ADD_TEST_CODE == 1 */
createMiscComponents();
satsystem::initAcsSubsystem();
satsystem::init();
}

View File

@ -57,6 +57,7 @@ enum commonObjects : uint32_t {
PLOC_MPSOC_HANDLER = 0x44330015,
PLOC_SUPERVISOR_HANDLER = 0x44330016,
PLOC_SUPERVISOR_HELPER = 0x44330017,
SCEX_HANDLER = 0x44400000,
SOLAR_ARRAY_DEPL_HANDLER = 0x444100A2,
HEATER_HANDLER = 0x444100A4,