Merge pull request 'STR tests' (#739) from startracker-tests into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

Reviewed-on: #739
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
This commit is contained in:
Marius Eggert 2023-07-13 09:33:03 +02:00
commit 546053f95a
5 changed files with 14 additions and 15 deletions

View File

@ -47,6 +47,7 @@ will consitute of a breaking change warranting a new major release:
maximum size of 255 bytes. maximum size of 255 bytes.
- TCS CTRL: Limit number of heater handler messages sent in case there are not sensors available - TCS CTRL: Limit number of heater handler messages sent in case there are not sensors available
anymore. anymore.
- Fix to allow adding real STR device for EM.
# Added # Added

View File

@ -82,6 +82,9 @@ void ObjectFactory::produce(void* args) {
// The ACU broke. // The ACU broke.
dummyCfg.addOnlyAcuDummy = true; dummyCfg.addOnlyAcuDummy = true;
#endif #endif
#if OBSW_ADD_STAR_TRACKER == 1
dummyCfg.addStrDummy = false;
#endif
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1 #if OBSW_ADD_BPX_BATTERY_HANDLER == 1
dummyCfg.addBpxBattDummy = false; dummyCfg.addBpxBattDummy = false;
#endif #endif

View File

@ -937,16 +937,7 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
starTrackerCookie->setNoFixedSizeReply(); starTrackerCookie->setNoFixedSizeReply();
StrComHandler* strComIF = new StrComHandler(objects::STR_COM_IF); StrComHandler* strComIF = new StrComHandler(objects::STR_COM_IF);
const char* paramJsonFile = nullptr; const char* paramJsonFile = "/mnt/sd0/startracker/flight-config.json";
#ifdef EGSE
paramJsonFile = "/home/pi/arcsec/json/flight-config.json";
#else
#if OBSW_STAR_TRACKER_GROUND_CONFIG == 1
paramJsonFile = "/mnt/sd0/startracker/ground-config.json";
#else
paramJsonFile = "/mnt/sd0/startracker/flight-config.json";
#endif
#endif
if (paramJsonFile == nullptr) { if (paramJsonFile == nullptr) {
sif::error << "No valid Star Tracker parameter JSON file" << std::endl; sif::error << "No valid Star Tracker parameter JSON file" << std::endl;
} }

View File

@ -63,11 +63,14 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
rws[3] = new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy); rws[3] = new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy);
ObjectFactory::createRwAssy(pwrSwitcher, power::Switches::PDU2_CH2_RW_5V, rws, rwIds); ObjectFactory::createRwAssy(pwrSwitcher, power::Switches::PDU2_CH2_RW_5V, rws, rwIds);
new SaDeplDummy(objects::SOLAR_ARRAY_DEPL_HANDLER); new SaDeplDummy(objects::SOLAR_ARRAY_DEPL_HANDLER);
auto* strAssy = new StrAssembly(objects::STR_ASSY);
strAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM); if (cfg.addStrDummy) {
auto* strDummy = auto* strAssy = new StrAssembly(objects::STR_ASSY);
new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy); strAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
strDummy->connectModeTreeParent(*strAssy); auto* strDummy =
new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy);
strDummy->connectModeTreeParent(*strAssy);
}
if (cfg.addSyrlinksDummies) { if (cfg.addSyrlinksDummies) {
auto* syrlinksDummy = auto* syrlinksDummy =
new SyrlinksDummy(objects::SYRLINKS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); new SyrlinksDummy(objects::SYRLINKS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);

View File

@ -27,6 +27,7 @@ struct DummyCfg {
bool addTempSensorDummies = true; bool addTempSensorDummies = true;
bool addRtdComIFDummy = true; bool addRtdComIFDummy = true;
bool addPlocDummies = true; bool addPlocDummies = true;
bool addStrDummy = true;
bool addTmpDummies = true; bool addTmpDummies = true;
Tmp1075Cfg tmp1075Cfg; Tmp1075Cfg tmp1075Cfg;
bool addCamSwitcherDummy = false; bool addCamSwitcherDummy = false;