STR tests #739

Merged
meggert merged 4 commits from startracker-tests into main 2023-07-13 09:33:07 +02:00
5 changed files with 14 additions and 15 deletions
Showing only changes of commit d14e256901 - Show all commits

View File

@ -932,16 +932,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

@ -339,6 +339,7 @@ void scheduling::initTasks() {
#endif #endif
#if OBSW_ADD_STAR_TRACKER == 1 #if OBSW_ADD_STAR_TRACKER == 1
sif::debug << "scheduling STR helper" << std::endl;
// Relatively high priority to make sure STR COM works well. // Relatively high priority to make sure STR COM works well.
PeriodicTaskIF* strHelperTask = PeriodicTaskIF* strHelperTask =
factory->createPeriodicTask("STR_HELPER", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, factory->createPeriodicTask("STR_HELPER", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2,

View File

@ -65,6 +65,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

@ -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

@ -19,6 +19,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 addCamSwitcherDummy = false; bool addCamSwitcherDummy = false;
}; };