v1.17.0 #327

Merged
muellerr merged 131 commits from develop into main 2022-11-28 18:29:31 +01:00
6 changed files with 34 additions and 10 deletions
Showing only changes of commit f327bdcd91 - Show all commits

View File

@ -141,7 +141,7 @@ set(OBSW_ADD_TMP_DEVICES
${INIT_VAL}
CACHE STRING "Add TMP devices")
set(OBSW_ADD_GOMSPACE_PCDU
${INIT_VAL}
1
CACHE STRING "Add GomSpace PCDU modules")
set(OBSW_ADD_RW
${INIT_VAL}

View File

@ -1,6 +1,7 @@
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
#include <fsfw/health/HealthTableIF.h>
#include <fsfw/power/DummyPowerSwitcher.h>
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
#include "OBSWConfig.h"
#include "bsp_q7s/core/CoreController.h"
@ -38,13 +39,21 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_SYRLINKS == 1
dummyCfg.addSyrlinksDummies = false;
#endif
dummy::createDummies(dummyCfg);
#if OBSW_ADD_GOMSPACE_PCDU == 1
dummyCfg.addPowerDummies = false;
#endif
PowerSwitchIF* pwrSwitcher = nullptr;
#if OBSW_ADD_GOMSPACE_PCDU == 0
pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
#else
createPcduComponents(gpioComIF, &pwrSwitcher);
#endif
dummy::createDummies(dummyCfg, *pwrSwitcher);
new CoreController(objects::CORE_CONTROLLER);
PowerSwitchIF* pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
static_cast<void>(pwrSwitcher);
// Regular FM code, does not work for EM if the hardware is not connected
// createPcduComponents(gpioComIF, &pwrSwitcher);
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
@ -95,8 +104,8 @@ void ObjectFactory::produce(void* args) {
createTestComponents(gpioComIF);
#endif /* OBSW_ADD_TEST_CODE == 1 */
#if OBSW_ADD_SCEX_DEVICE == 1
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), true,
std::nullopt);
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
#endif
createAcsController(true);
}

View File

@ -57,7 +57,7 @@ namespace uart {
static constexpr size_t HYPERION_GPS_REPLY_MAX_BUFFER = 1024;
static constexpr UartBaudRate SYRLINKS_BAUD = UartBaudRate::RATE_38400;
static constexpr UartBaudRate SCEX_BAUD = UartBaudRate::RATE_38400;
static constexpr UartBaudRate SCEX_BAUD = UartBaudRate::RATE_115200;
static constexpr UartBaudRate GNSS_BAUD = UartBaudRate::RATE_9600;
static constexpr UartBaudRate PLOC_MPSOC_BAUD = UartBaudRate::RATE_115200;
static constexpr UartBaudRate PLOC_SUPV_BAUD = UartBaudRate::RATE_115200;

View File

@ -19,10 +19,11 @@
#include <dummies/SusDummy.h>
#include <dummies/SyrlinksDummy.h>
#include <dummies/TemperatureSensorsDummy.h>
#include <mission/system/objects/CamSwitcher.h>
using namespace dummy;
void dummy::createDummies(DummyCfg cfg) {
void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
new ComIFDummy(objects::DUMMY_COM_IF);
ComCookieDummy* comCookieDummy = new ComCookieDummy();
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
@ -67,5 +68,6 @@ void dummy::createDummies(DummyCfg cfg) {
if (cfg.addTempSensorDummies) {
new TemperatureSensorsDummy();
}
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::NO_SWITCH);
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
}

View File

@ -1,5 +1,7 @@
#pragma once
#include <fsfw/power/PowerSwitchIF.h>
namespace dummy {
struct DummyCfg {
@ -12,6 +14,6 @@ struct DummyCfg {
bool addRtdComIFDummy = true;
};
void createDummies(DummyCfg cfg);
void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch);
} // namespace dummy

View File

@ -37,6 +37,17 @@ void scheduling::schedulingScex(TaskFactory& factory, PeriodicTaskIF*& scexDevHa
printAddObjectError("SCEX_DEV", objects::SCEX);
}
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_READ);
if (result != returnvalue::OK) {
printAddObjectError("SCEX_DEV", objects::SCEX);
}
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::SEND_READ);
if (result != returnvalue::OK) {
printAddObjectError("SCEX_DEV", objects::SCEX);
}
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_READ);
if (result != returnvalue::OK) {
printAddObjectError("SCEX_DEV", objects::SCEX);
}
result = returnvalue::OK;
scexReaderTask = factory.createPeriodicTask(