diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index 7977deed..df857d59 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -117,6 +117,13 @@ void initmission::initTasks() { } #endif /* OBSW_USE_CCSDS_IP_CORE == 1 */ + PeriodicTaskIF* acsCtrl = factory->createPeriodicTask( + "ACS_CTRL", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc); + result = acsCtrl->addComponent(objects::GPS_CONTROLLER); + if(result != HasReturnvaluesIF::RETURN_OK) { + initmission::printAddObjectError("ACS_CTRL", objects::GPS_CONTROLLER); + } + # if BOARD_TE0720 == 0 // FS task, task interval does not matter because it runs in permanent loop, priority low // because it is a non-essential background task @@ -202,6 +209,8 @@ void initmission::initTasks() { #endif /* OBSW_ADD_STAR_TRACKER == 1 */ #endif + acsCtrl->startTask(); + sif::info << "Tasks started.." << std::endl; } diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 42665293..c93ed507 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -449,14 +449,14 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio); consumer.str(""); - consumer << "0x" << std::hex << objects::GPS0_HANDLER; + consumer << "0x" << std::hex << objects::GPS_CONTROLLER; // GNSS reset pins are active low gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_0, consumer.str(), gpio::DIR_OUT, gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_NRESET, gpio); consumer.str(""); - consumer << "0x" << std::hex << objects::GPS1_HANDLER; + consumer << "0x" << std::hex << objects::GPS_CONTROLLER; gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_1, consumer.str(), gpio::DIR_OUT, gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_NRESET, gpio); @@ -476,13 +476,13 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI // Enable pins for GNSS consumer.str(""); - consumer << "0x" << std::hex << objects::GPS0_HANDLER; + consumer << "0x" << std::hex << objects::GPS_CONTROLLER; gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_0_ENABLE, consumer.str(), gpio::DIR_OUT, gpio::LOW); gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_ENABLE, gpio); consumer.str(""); - consumer << "0x" << std::hex << objects::GPS1_HANDLER; + consumer << "0x" << std::hex << objects::GPS_CONTROLLER; gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_1_ENABLE, consumer.str(), gpio::DIR_OUT, gpio::LOW); gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_ENABLE, gpio); @@ -570,7 +570,7 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI resetArgsGnss0.gnss1 = false; resetArgsGnss0.gpioComIF = gpioComIF; resetArgsGnss0.waitPeriodMs = 100; - auto gpsHandler0 = new GPSHyperionHandler(objects::GPS0_HANDLER, objects::NO_OBJECT, + auto gpsHandler0 = new GPSHyperionHandler(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps); gpsHandler0->setResetPinTriggerFunction(gps::triggerGpioResetPin, &resetArgsGnss0); } diff --git a/common/config/commonObjects.h b/common/config/commonObjects.h index cce3616f..135259d6 100644 --- a/common/config/commonObjects.h +++ b/common/config/commonObjects.h @@ -79,8 +79,7 @@ enum commonObjects: uint32_t { SUS_12 = 0x44120043, SUS_13 = 0x44120044, - GPS0_HANDLER = 0x44130045, - GPS1_HANDLER = 0x44130146, + GPS_CONTROLLER = 0x44130045, RW1 = 0x44120047, RW2 = 0x44120148,