|
|
|
@ -109,7 +109,7 @@ void Factory::setStaticFrameworkObjectIds() {
|
|
|
|
|
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::produce(void* args){
|
|
|
|
|
void ObjectFactory::produce(void* args) {
|
|
|
|
|
ObjectFactory::setStatics();
|
|
|
|
|
ObjectFactory::produceGenericObjects();
|
|
|
|
|
LinuxLibgpioIF* gpioComIF = nullptr;
|
|
|
|
@ -137,8 +137,8 @@ void ObjectFactory::produce(void* args){
|
|
|
|
|
createRtdComponents();
|
|
|
|
|
#endif /* Q7S_ADD_RTD_DEVICES == 1 */
|
|
|
|
|
|
|
|
|
|
I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ,
|
|
|
|
|
IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV);
|
|
|
|
|
I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE,
|
|
|
|
|
q7s::I2C_DEFAULT_DEV);
|
|
|
|
|
new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie);
|
|
|
|
|
createReactionWheelComponents(gpioComIF);
|
|
|
|
|
|
|
|
|
@ -175,13 +175,13 @@ void ObjectFactory::produce(void* args){
|
|
|
|
|
auto udpBridge = new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
|
|
|
|
|
new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
|
|
|
|
|
sif::info << "Created UDP server for TMTC commanding with listener port " <<
|
|
|
|
|
udpBridge->getUdpPort() << std::endl;
|
|
|
|
|
udpBridge->getUdpPort() << std::endl;
|
|
|
|
|
#else
|
|
|
|
|
auto tmtcBridge = new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
|
|
|
|
|
tmtcBridge->setMaxNumberOfPacketsStored(50);
|
|
|
|
|
auto tcpServer = new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
|
|
|
|
|
sif::info << "Created TCP server for TMTC commanding with listener port " <<
|
|
|
|
|
tcpServer->getTcpPort() << std::endl;
|
|
|
|
|
sif::info << "Created TCP server for TMTC commanding with listener port "
|
|
|
|
|
<< tcpServer->getTcpPort() << std::endl;
|
|
|
|
|
#endif /* OBSW_USE_TMTC_TCP_BRIDGE == 0 */
|
|
|
|
|
|
|
|
|
|
/* Test Task */
|
|
|
|
@ -207,19 +207,17 @@ void ObjectFactory::createTmpComponents() {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Temperature sensors */
|
|
|
|
|
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
|
|
|
|
objects::TMP1075_HANDLER_1, objects::I2C_COM_IF,
|
|
|
|
|
i2cCookieTmp1075tcs1);
|
|
|
|
|
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(objects::TMP1075_HANDLER_1,
|
|
|
|
|
objects::I2C_COM_IF, i2cCookieTmp1075tcs1);
|
|
|
|
|
(void) tmp1075Handler_1;
|
|
|
|
|
Tmp1075Handler* tmp1075Handler_2 = new Tmp1075Handler(
|
|
|
|
|
objects::TMP1075_HANDLER_2, objects::I2C_COM_IF,
|
|
|
|
|
i2cCookieTmp1075tcs2);
|
|
|
|
|
Tmp1075Handler* tmp1075Handler_2 = new Tmp1075Handler(objects::TMP1075_HANDLER_2,
|
|
|
|
|
objects::I2C_COM_IF, i2cCookieTmp1075tcs2);
|
|
|
|
|
(void) tmp1075Handler_2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF **gpioComIF,
|
|
|
|
|
UartComIF** uartComIF, SpiComIF** spiComIF) {
|
|
|
|
|
if(gpioComIF == nullptr or uartComIF == nullptr or spiComIF == nullptr) {
|
|
|
|
|
void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF **gpioComIF, UartComIF** uartComIF,
|
|
|
|
|
SpiComIF** spiComIF) {
|
|
|
|
|
if (gpioComIF == nullptr or uartComIF == nullptr or spiComIF == nullptr) {
|
|
|
|
|
sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer"
|
|
|
|
|
<< std::endl;
|
|
|
|
|
}
|
|
|
|
@ -240,23 +238,19 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF **gpioComIF,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createPcduComponents() {
|
|
|
|
|
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_LENGTH,
|
|
|
|
|
addresses::P60DOCK);
|
|
|
|
|
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH,
|
|
|
|
|
addresses::PDU1);
|
|
|
|
|
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH,
|
|
|
|
|
addresses::PDU2);
|
|
|
|
|
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_LENGTH,
|
|
|
|
|
addresses::ACU);
|
|
|
|
|
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_LENGTH, addresses::P60DOCK);
|
|
|
|
|
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU1);
|
|
|
|
|
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU2);
|
|
|
|
|
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_LENGTH, addresses::ACU);
|
|
|
|
|
/* Device Handler */
|
|
|
|
|
P60DockHandler* p60dockhandler = new P60DockHandler(objects::P60DOCK_HANDLER,
|
|
|
|
|
objects::CSP_COM_IF, p60DockCspCookie);
|
|
|
|
|
PDU1Handler* pdu1handler = new PDU1Handler(objects::PDU1_HANDLER,
|
|
|
|
|
objects::CSP_COM_IF, pdu1CspCookie);
|
|
|
|
|
PDU2Handler* pdu2handler = new PDU2Handler(objects::PDU2_HANDLER,
|
|
|
|
|
objects::CSP_COM_IF, pdu2CspCookie);
|
|
|
|
|
ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER,
|
|
|
|
|
objects::CSP_COM_IF, acuCspCookie);
|
|
|
|
|
PDU1Handler* pdu1handler = new PDU1Handler(objects::PDU1_HANDLER, objects::CSP_COM_IF,
|
|
|
|
|
pdu1CspCookie);
|
|
|
|
|
PDU2Handler* pdu2handler = new PDU2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF,
|
|
|
|
|
pdu2CspCookie);
|
|
|
|
|
ACUHandler* acuhandler = new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF,
|
|
|
|
|
acuCspCookie);
|
|
|
|
|
new PCDUHandler(objects::PCDU_HANDLER, 50);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -271,8 +265,8 @@ void ObjectFactory::createPcduComponents() {
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
|
GpioCookie* gpioCookieRadSensor = new GpioCookie;
|
|
|
|
|
GpiodRegular* chipSelectRadSensor = new GpiodRegular(q7s::GPIO_RAD_SENSOR_CHIP,
|
|
|
|
|
q7s::GPIO_RAD_SENSOR_CS, "Chip Select Radiation Sensor", gpio::OUT, 1);
|
|
|
|
|
GpiodRegular* chipSelectRadSensor = new GpiodRegular("Chip Select Radiation Sensor", gpio::OUT,
|
|
|
|
|
1, q7s::GPIO_RAD_SENSOR_LABEL, q7s::GPIO_RAD_SENSOR_CS);
|
|
|
|
|
gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, chipSelectRadSensor);
|
|
|
|
|
gpioComIF->addGpios(gpioCookieRadSensor);
|
|
|
|
|
|
|
|
|
@ -282,8 +276,7 @@ void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
|
new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_COM_IF, spiCookieRadSensor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF,
|
|
|
|
|
SpiComIF* spiComIF) {
|
|
|
|
|
void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF, SpiComIF* spiComIF) {
|
|
|
|
|
GpioCookie* gpioCookieSus = new GpioCookie();
|
|
|
|
|
GpioCallback* susgpio = nullptr;
|
|
|
|
|
|
|
|
|
@ -400,46 +393,46 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF,
|
|
|
|
|
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComIF* uartComIF) {
|
|
|
|
|
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
|
|
|
|
GpiodRegular* gpio = nullptr;
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_GYRO_ADIS_CHIP, q7s::GPIO_GYRO_0_ADIS_CS,
|
|
|
|
|
"CS_GYRO_0_ADIS", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("CS_GYRO_0_ADIS", gpio::OUT, gpio::HIGH, q7s::GPIO_GYRO_ADIS_LABEL,
|
|
|
|
|
q7s::GPIO_GYRO_0_ADIS_CS);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio);
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_1_L3G_CS,
|
|
|
|
|
"CS_GYRO_1_L3G", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("CS_GYRO_1_L3G", gpio::OUT, gpio::HIGH,
|
|
|
|
|
q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_GYRO_1_L3G_CS);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio);
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_GYRO_ADIS_CHIP, q7s::GPIO_GYRO_2_ADIS_CS,
|
|
|
|
|
"CS_GYRO_2_ADIS", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("CS_GYRO_2_ADIS", gpio::OUT, gpio::HIGH, q7s::GPIO_GYRO_ADIS_LABEL,
|
|
|
|
|
q7s::GPIO_GYRO_2_ADIS_CS);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ADIS_CS, gpio);
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_3_L3G_CS,
|
|
|
|
|
"CS_GYRO_3_L3G", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("CS_GYRO_3_L3G", gpio::OUT, gpio::HIGH,
|
|
|
|
|
q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_GYRO_3_L3G_CS);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_3_L3G_CS, gpio);
|
|
|
|
|
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_MGM_0_LIS3_CS,
|
|
|
|
|
"CS_MGM_0_LIS3_A", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("CS_MGM_0_LIS3_A", gpio::OUT, gpio::HIGH,
|
|
|
|
|
q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_MGM_0_LIS3_CS);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpio);
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_MGM_1_RM3100_CS,
|
|
|
|
|
"CS_MGM_1_RM3100_A", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("CS_MGM_1_RM3100_A", gpio::OUT, gpio::HIGH,
|
|
|
|
|
q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_MGM_1_RM3100_CS);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpio);
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_MGM2_LIS3_CHIP, q7s::GPIO_MGM_2_LIS3_CS,
|
|
|
|
|
"CS_MGM_2_LIS3_B", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("CS_MGM_2_LIS3_B", gpio::OUT, gpio::HIGH, q7s::GPIO_MGM2_LIS3_LABEL,
|
|
|
|
|
q7s::GPIO_MGM_2_LIS3_CS);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpio);
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_MGM_3_RM3100_CS,
|
|
|
|
|
"CS_MGM_3_RM3100_B", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("CS_MGM_3_RM3100_B", gpio::OUT, gpio::HIGH,
|
|
|
|
|
q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_MGM_3_RM3100_CS);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio);
|
|
|
|
|
|
|
|
|
|
// GNSS reset pins are active low
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_RESET_GNSS_0,
|
|
|
|
|
"GNSS_0_NRESET", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("GNSS_0_NRESET", gpio::OUT, gpio::HIGH,
|
|
|
|
|
q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_RESET_GNSS_0);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_NRESET, gpio);
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_RESET_GNSS_1,
|
|
|
|
|
"GNSS_1_NRESET", gpio::OUT, gpio::HIGH);
|
|
|
|
|
gpio = new GpiodRegular("GNSS_1_NRESET", gpio::OUT, gpio::HIGH,
|
|
|
|
|
q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_RESET_GNSS_1);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_NRESET, gpio);
|
|
|
|
|
|
|
|
|
|
// Enable pins must be pulled low for regular operations
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_FLEX_OBC1F_B0, q7s::GPIO_GYRO_0_ENABLE,
|
|
|
|
|
"GYRO_0_ENABLE", gpio::OUT, gpio::LOW);
|
|
|
|
|
gpio = new GpiodRegular("GYRO_0_ENABLE", gpio::OUT, gpio::LOW, q7s::GPIO_FLEX_OBC1F_B0,
|
|
|
|
|
q7s::GPIO_GYRO_0_ENABLE);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ENABLE, gpio);
|
|
|
|
|
gpio = new GpiodRegular(q7s::GPIO_3V3_OBC1C, q7s::GPIO_GYRO_2_ENABLE,
|
|
|
|
|
"GYRO_2_ENABLE", gpio::OUT, gpio::LOW);
|
|
|
|
|
gpio = new GpiodRegular("GYRO_2_ENABLE", gpio::OUT, gpio::LOW, q7s::GPIO_3V3_OBC1C,
|
|
|
|
|
q7s::GPIO_GYRO_2_ENABLE);
|
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ENABLE, gpio);
|
|
|
|
|
|
|
|
|
|
// TODO: Add enable pins for GPS as soon as new interface board design is finished
|
|
|
|
@ -448,8 +441,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
|
|
|
|
|
std::string spiDev = q7s::SPI_DEFAULT_DEV;
|
|
|
|
|
SpiCookie* spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
|
|
|
|
|
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
|
|
|
|
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER,
|
|
|
|
|
objects::SPI_COM_IF, spiCookie, 0);
|
|
|
|
|
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_COM_IF,
|
|
|
|
|
spiCookie, 0);
|
|
|
|
|
mgmLis3Handler->setStartUpImmediately();
|
|
|
|
|
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
|
|
|
|
|
mgmLis3Handler->setToGoToNormalMode(true);
|
|
|
|
@ -457,8 +450,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
|
|
|
|
|
|
|
|
|
|
spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
|
|
|
|
|
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
|
|
|
|
auto mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER,
|
|
|
|
|
objects::SPI_COM_IF, spiCookie, pcduSwitches::SwitcherList::ACS_BOARD_SIDE_A);
|
|
|
|
|
auto mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_COM_IF,
|
|
|
|
|
spiCookie, pcduSwitches::SwitcherList::ACS_BOARD_SIDE_A);
|
|
|
|
|
mgmRm3100Handler->setStartUpImmediately();
|
|
|
|
|
#if FSFW_HAL_RM3100_MGM_DEBUG == 1
|
|
|
|
|
mgmRm3100Handler->setToGoToNormalMode(true);
|
|
|
|
@ -466,8 +459,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
|
|
|
|
|
|
|
|
|
|
spiCookie = new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
|
|
|
|
|
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
|
|
|
|
|
auto mgmLis3Handler2 = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER,
|
|
|
|
|
objects::SPI_COM_IF, spiCookie, 0);
|
|
|
|
|
auto mgmLis3Handler2 = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_COM_IF,
|
|
|
|
|
spiCookie, 0);
|
|
|
|
|
mgmLis3Handler2->setStartUpImmediately();
|
|
|
|
|
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
|
|
|
|
|
mgmLis3Handler2->setToGoToNormalMode(true);
|
|
|
|
@ -475,8 +468,8 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
|
|
|
|
|
|
|
|
|
|
spiCookie = new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev,
|
|
|
|
|
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
|
|
|
|
|
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER,
|
|
|
|
|
objects::SPI_COM_IF, spiCookie, pcduSwitches::SwitcherList::ACS_BOARD_SIDE_B);
|
|
|
|
|
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_COM_IF,
|
|
|
|
|
spiCookie, pcduSwitches::SwitcherList::ACS_BOARD_SIDE_B);
|
|
|
|
|
mgmRm3100Handler->setStartUpImmediately();
|
|
|
|
|
#if FSFW_HAL_RM3100_MGM_DEBUG == 1
|
|
|
|
|
mgmRm3100Handler->setToGoToNormalMode(true);
|
|
|
|
@ -487,14 +480,14 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
|
|
|
|
|
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
|
|
|
|
|
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
|
|
|
|
|
spi::DEFAULT_ADIS16507_SPEED);
|
|
|
|
|
auto adisHandler = new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER,
|
|
|
|
|
objects::SPI_COM_IF, spiCookie);
|
|
|
|
|
auto adisHandler = new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF,
|
|
|
|
|
spiCookie);
|
|
|
|
|
adisHandler->setStartUpImmediately();
|
|
|
|
|
// Gyro 1 Side A
|
|
|
|
|
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev,
|
|
|
|
|
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
|
|
|
|
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER,
|
|
|
|
|
objects::SPI_COM_IF, spiCookie, 0);
|
|
|
|
|
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
|
|
|
|
|
spiCookie, 0);
|
|
|
|
|
gyroL3gHandler->setStartUpImmediately();
|
|
|
|
|
#if FSFW_HAL_L3GD20_GYRO_DEBUG == 1
|
|
|
|
|
gyroL3gHandler->setGoNormalModeAtStartup();
|
|
|
|
@ -503,14 +496,14 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI
|
|
|
|
|
spiCookie = new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, spiDev,
|
|
|
|
|
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
|
|
|
|
|
spi::DEFAULT_ADIS16507_SPEED);
|
|
|
|
|
adisHandler = new GyroADIS16507Handler(objects::GYRO_2_ADIS_HANDLER,
|
|
|
|
|
objects::SPI_COM_IF, spiCookie);
|
|
|
|
|
adisHandler = new GyroADIS16507Handler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_COM_IF,
|
|
|
|
|
spiCookie);
|
|
|
|
|
adisHandler->setStartUpImmediately();
|
|
|
|
|
// Gyro 3 Side B
|
|
|
|
|
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev,
|
|
|
|
|
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
|
|
|
|
|
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER,
|
|
|
|
|
objects::SPI_COM_IF, spiCookie, 0);
|
|
|
|
|
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_COM_IF,
|
|
|
|
|
spiCookie, 0);
|
|
|
|
|
gyroL3gHandler->setStartUpImmediately();
|
|
|
|
|
#if FSFW_HAL_L3GD20_GYRO_DEBUG == 1
|
|
|
|
|
gyroL3gHandler->setGoNormalModeAtStartup();
|
|
|
|
@ -549,40 +542,37 @@ void ObjectFactory::createHeaterComponents() {
|
|
|
|
|
GpioCookie* heaterGpiosCookie = new GpioCookie;
|
|
|
|
|
|
|
|
|
|
/* Pin H2-11 on stack connector */
|
|
|
|
|
GpiodRegular* gpioConfigHeater0 = new GpiodRegular("Heater0", gpio::OUT, 0, "axi_gpio_q7_3v3",
|
|
|
|
|
q7s::GPIO_HEATER_0_PIN);
|
|
|
|
|
// GpiodRegular* gpioConfigHeater0 = new GpiodRegular(q7s::GPIO_HEATER_CHIP,
|
|
|
|
|
// q7s::GPIO_HEATER_0_PIN, "Heater0", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigHeater0 = new GpiodRegular("Heater0", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_0_PIN);
|
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpioConfigHeater0);
|
|
|
|
|
|
|
|
|
|
/* Pin H2-12 on stack connector */
|
|
|
|
|
GpiodRegular* gpioConfigHeater1 = new GpiodRegular(q7s::GPIO_HEATER_CHIP,
|
|
|
|
|
q7s::GPIO_HEATER_1_PIN, "Heater1", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigHeater1 = new GpiodRegular("Heater1", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_1_PIN);
|
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpioConfigHeater1);
|
|
|
|
|
|
|
|
|
|
/* Pin H2-13 on stack connector */
|
|
|
|
|
GpiodRegular* gpioConfigHeater2 = new GpiodRegular(q7s::GPIO_HEATER_CHIP,
|
|
|
|
|
q7s::GPIO_HEATER_2_PIN, "Heater2", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigHeater2 = new GpiodRegular("Heater2", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_2_PIN);
|
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpioConfigHeater2);
|
|
|
|
|
|
|
|
|
|
GpiodRegular* gpioConfigHeater3 = new GpiodRegular(q7s::GPIO_HEATER_CHIP,
|
|
|
|
|
q7s::GPIO_HEATER_3_PIN, "Heater3", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigHeater3 = new GpiodRegular("Heater3", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_3_PIN);
|
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpioConfigHeater3);
|
|
|
|
|
|
|
|
|
|
GpiodRegular* gpioConfigHeater4 = new GpiodRegular(q7s::GPIO_HEATER_CHIP,
|
|
|
|
|
q7s::GPIO_HEATER_4_PIN, "Heater4", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigHeater4 = new GpiodRegular("Heater4", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_4_PIN);
|
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpioConfigHeater4);
|
|
|
|
|
|
|
|
|
|
GpiodRegular* gpioConfigHeater5 = new GpiodRegular(q7s::GPIO_HEATER_CHIP,
|
|
|
|
|
q7s::GPIO_HEATER_5_PIN, "Heater5", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigHeater5 = new GpiodRegular("Heater5", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_5_PIN);
|
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpioConfigHeater5);
|
|
|
|
|
|
|
|
|
|
GpiodRegular* gpioConfigHeater6 = new GpiodRegular(q7s::GPIO_HEATER_CHIP,
|
|
|
|
|
q7s::GPIO_HEATER_6_PIN, "Heater6", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigHeater6 = new GpiodRegular("Heater6", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_6_PIN);
|
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpioConfigHeater6);
|
|
|
|
|
|
|
|
|
|
GpiodRegular* gpioConfigHeater7 = new GpiodRegular(q7s::GPIO_HEATER_CHIP,
|
|
|
|
|
q7s::GPIO_HEATER_7_PIN, "Heater7", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigHeater7 = new GpiodRegular("Heater7", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_7_PIN);
|
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpioConfigHeater7);
|
|
|
|
|
|
|
|
|
|
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie,
|
|
|
|
@ -592,11 +582,11 @@ void ObjectFactory::createHeaterComponents() {
|
|
|
|
|
void ObjectFactory::createSolarArrayDeploymentComponents() {
|
|
|
|
|
GpioCookie* solarArrayDeplCookie = new GpioCookie;
|
|
|
|
|
|
|
|
|
|
GpiodRegular* gpioConfigDeplSA0 = new GpiodRegular(q7s::GPIO_SOLAR_ARR_DEPL_CHIP,
|
|
|
|
|
q7s::GPIO_SOL_DEPL_SA_0_PIN, "DeplSA0", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigDeplSA0 = new GpiodRegular("DeplSA0", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_SOLAR_ARR_DEPL_LABEL, q7s::GPIO_SOL_DEPL_SA_0_PIN);
|
|
|
|
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpioConfigDeplSA0);
|
|
|
|
|
GpiodRegular* gpioConfigDeplSA1 = new GpiodRegular(q7s::GPIO_SOLAR_ARR_DEPL_CHIP,
|
|
|
|
|
q7s::GPIO_SOL_DEPL_SA_1_PIN, "DeplSA1", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* gpioConfigDeplSA1 = new GpiodRegular("DeplSA1", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_SOLAR_ARR_DEPL_LABEL, q7s::GPIO_SOL_DEPL_SA_1_PIN);
|
|
|
|
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpioConfigDeplSA1);
|
|
|
|
|
|
|
|
|
|
//TODO: Find out burn time. For now set to 1000 ms.
|
|
|
|
@ -668,69 +658,62 @@ void ObjectFactory::createRtdComponents(LinuxLibgpioIF *gpioComIF) {
|
|
|
|
|
|
|
|
|
|
gpioComIF->addGpios(rtdGpioCookie);
|
|
|
|
|
|
|
|
|
|
SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC3, gpioIds::RTD_IC3,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC4, gpioIds::RTD_IC4,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc5 = new SpiCookie(addresses::RTD_IC5, gpioIds::RTD_IC5,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc6 = new SpiCookie(addresses::RTD_IC6, gpioIds::RTD_IC6,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc7 = new SpiCookie(addresses::RTD_IC7, gpioIds::RTD_IC7,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc8 = new SpiCookie(addresses::RTD_IC8, gpioIds::RTD_IC8,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc9 = new SpiCookie(addresses::RTD_IC9, gpioIds::RTD_IC9,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC3, gpioIds::RTD_IC3, q7s::SPI_DEFAULT_DEV,
|
|
|
|
|
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC4, gpioIds::RTD_IC4, q7s::SPI_DEFAULT_DEV,
|
|
|
|
|
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc5 = new SpiCookie(addresses::RTD_IC5, gpioIds::RTD_IC5, q7s::SPI_DEFAULT_DEV,
|
|
|
|
|
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc6 = new SpiCookie(addresses::RTD_IC6, gpioIds::RTD_IC6, q7s::SPI_DEFAULT_DEV,
|
|
|
|
|
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc7 = new SpiCookie(addresses::RTD_IC7, gpioIds::RTD_IC7, q7s::SPI_DEFAULT_DEV,
|
|
|
|
|
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc8 = new SpiCookie(addresses::RTD_IC8, gpioIds::RTD_IC8, q7s::SPI_DEFAULT_DEV,
|
|
|
|
|
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc9 = new SpiCookie(addresses::RTD_IC9, gpioIds::RTD_IC9, q7s::SPI_DEFAULT_DEV,
|
|
|
|
|
Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc10 = new SpiCookie(addresses::RTD_IC10, gpioIds::RTD_IC10,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1,
|
|
|
|
|
spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc11 = new SpiCookie(addresses::RTD_IC11, gpioIds::RTD_IC11,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1,
|
|
|
|
|
spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc12 = new SpiCookie(addresses::RTD_IC12, gpioIds::RTD_IC12,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1,
|
|
|
|
|
spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc13 = new SpiCookie(addresses::RTD_IC13, gpioIds::RTD_IC13,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1,
|
|
|
|
|
spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc14 = new SpiCookie(addresses::RTD_IC14, gpioIds::RTD_IC14,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1,
|
|
|
|
|
spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc15 = new SpiCookie(addresses::RTD_IC15, gpioIds::RTD_IC15,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1,
|
|
|
|
|
spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc16 = new SpiCookie(addresses::RTD_IC16, gpioIds::RTD_IC16,
|
|
|
|
|
std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc17 = new SpiCookie(addresses::RTD_IC17, gpioIds::RTD_IC17,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1,
|
|
|
|
|
spi::RTD_SPEED);
|
|
|
|
|
SpiCookie* spiRtdIc18 = new SpiCookie(addresses::RTD_IC18, gpioIds::RTD_IC18,
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE,
|
|
|
|
|
spi::SpiModes::MODE_1, spi::RTD_SPEED);
|
|
|
|
|
q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, spi::SpiModes::MODE_1,
|
|
|
|
|
spi::RTD_SPEED);
|
|
|
|
|
|
|
|
|
|
Max31865PT1000Handler* rtdIc3 = new Max31865PT1000Handler(objects::RTD_IC3,
|
|
|
|
|
objects::SPI_COM_IF, spiRtdIc3, 0); // 0 is switchId
|
|
|
|
|
Max31865PT1000Handler* rtdIc4 = new Max31865PT1000Handler(objects::RTD_IC4,
|
|
|
|
|
objects::SPI_COM_IF, spiRtdIc4, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc5 = new Max31865PT1000Handler(objects::RTD_IC5,
|
|
|
|
|
objects::SPI_COM_IF, spiRtdIc5, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc6 = new Max31865PT1000Handler(objects::RTD_IC6,
|
|
|
|
|
objects::SPI_COM_IF, spiRtdIc6, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc7 = new Max31865PT1000Handler(objects::RTD_IC7,
|
|
|
|
|
objects::SPI_COM_IF, spiRtdIc7, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc8 = new Max31865PT1000Handler(objects::RTD_IC8,
|
|
|
|
|
objects::SPI_COM_IF, spiRtdIc8, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc9 = new Max31865PT1000Handler(objects::RTD_IC9,
|
|
|
|
|
objects::SPI_COM_IF, spiRtdIc9, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc3 = new Max31865PT1000Handler(objects::RTD_IC3, objects::SPI_COM_IF,
|
|
|
|
|
spiRtdIc3, 0); // 0 is switchId
|
|
|
|
|
Max31865PT1000Handler* rtdIc4 = new Max31865PT1000Handler(objects::RTD_IC4, objects::SPI_COM_IF,
|
|
|
|
|
spiRtdIc4, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc5 = new Max31865PT1000Handler(objects::RTD_IC5, objects::SPI_COM_IF,
|
|
|
|
|
spiRtdIc5, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc6 = new Max31865PT1000Handler(objects::RTD_IC6, objects::SPI_COM_IF,
|
|
|
|
|
spiRtdIc6, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc7 = new Max31865PT1000Handler(objects::RTD_IC7, objects::SPI_COM_IF,
|
|
|
|
|
spiRtdIc7, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc8 = new Max31865PT1000Handler(objects::RTD_IC8, objects::SPI_COM_IF,
|
|
|
|
|
spiRtdIc8, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc9 = new Max31865PT1000Handler(objects::RTD_IC9, objects::SPI_COM_IF,
|
|
|
|
|
spiRtdIc9, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc10 = new Max31865PT1000Handler(objects::RTD_IC10,
|
|
|
|
|
objects::SPI_COM_IF, spiRtdIc10, 0);
|
|
|
|
|
Max31865PT1000Handler* rtdIc11 = new Max31865PT1000Handler(objects::RTD_IC11,
|
|
|
|
@ -770,30 +753,30 @@ void ObjectFactory::createRtdComponents(LinuxLibgpioIF *gpioComIF) {
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
|
GpioCookie* gpioCookieRw = new GpioCookie;
|
|
|
|
|
GpioCallback* csRw1 = new GpioCallback("Chip select reaction wheel 1", gpio::OUT,
|
|
|
|
|
gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
|
GpioCallback* csRw1 = new GpioCallback("Chip select reaction wheel 1", gpio::OUT, gpio::HIGH,
|
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW1, csRw1);
|
|
|
|
|
GpioCallback* csRw2 = new GpioCallback("Chip select reaction wheel 2", gpio::OUT,
|
|
|
|
|
gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
|
GpioCallback* csRw2 = new GpioCallback("Chip select reaction wheel 2", gpio::OUT, gpio::HIGH,
|
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW2, csRw2);
|
|
|
|
|
GpioCallback* csRw3 = new GpioCallback("Chip select reaction wheel 3", gpio::OUT,
|
|
|
|
|
gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
|
GpioCallback* csRw3 = new GpioCallback("Chip select reaction wheel 3", gpio::OUT, gpio::HIGH,
|
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW3, csRw3);
|
|
|
|
|
GpioCallback* csRw4 = new GpioCallback("Chip select reaction wheel 4", gpio::OUT,
|
|
|
|
|
gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
|
GpioCallback* csRw4 = new GpioCallback("Chip select reaction wheel 4", gpio::OUT, gpio::HIGH,
|
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW4, csRw4);
|
|
|
|
|
|
|
|
|
|
GpiodRegular* enRw1 = new GpiodRegular(q7s::GPIO_RW_DEFAULT_CHIP, q7s::GPIO_RW_0_CS,
|
|
|
|
|
"Enable reaction wheel 1", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* enRw1 = new GpiodRegular("Enable reaction wheel 1", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_0_CS);
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW1, enRw1);
|
|
|
|
|
GpiodRegular* enRw2 = new GpiodRegular(q7s::GPIO_RW_DEFAULT_CHIP, q7s::GPIO_RW_1_CS,
|
|
|
|
|
"Enable reaction wheel 2", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* enRw2 = new GpiodRegular("Enable reaction wheel 2", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_1_CS);
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW2, enRw2);
|
|
|
|
|
GpiodRegular* enRw3 = new GpiodRegular(q7s::GPIO_RW_DEFAULT_CHIP, q7s::GPIO_RW_2_CS,
|
|
|
|
|
"Enable reaction wheel 3", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* enRw3 = new GpiodRegular("Enable reaction wheel 3", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_2_CS);
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW3, enRw3);
|
|
|
|
|
GpiodRegular* enRw4 = new GpiodRegular(q7s::GPIO_RW_DEFAULT_CHIP, q7s::GPIO_RW_3_CS,
|
|
|
|
|
"Enable reaction wheel 4", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* enRw4 = new GpiodRegular("Enable reaction wheel 4", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_3_CS);
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW4, enRw4);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -801,8 +784,8 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
|
* the PS SPI peripheral from the SPI interface and route out the SPI lines of the AXI SPI core.
|
|
|
|
|
* Per default the PS SPI is selected (EMIO = 0).
|
|
|
|
|
*/
|
|
|
|
|
GpiodRegular* spiMux = new GpiodRegular(q7s::GPIO_RW_SPI_MUX_CHIP, q7s::GPIO_RW_SPI_MUX_CS,
|
|
|
|
|
"EMIO 0 SPI Mux", gpio::OUT, 0);
|
|
|
|
|
GpiodRegular* spiMux = new GpiodRegular("EMIO 0 SPI Mux", gpio::OUT, 0,
|
|
|
|
|
q7s::GPIO_RW_SPI_MUX_LABEL, q7s::GPIO_RW_SPI_MUX_CS);
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::SPI_MUX, spiMux);
|
|
|
|
|
|
|
|
|
|
gpioComIF->addGpios(gpioCookieRw);
|
|
|
|
|