rtd handler improvements
This commit is contained in:
parent
5bdd4dad28
commit
df723b26a1
@ -140,51 +140,51 @@ void ObjectFactory::produce(){
|
||||
GpioCookie* heaterGpiosCookie = new GpioCookie;
|
||||
#if TE0720 == 0
|
||||
/* Pin H2-11 on stack connector */
|
||||
GpiodRegular gpioConfigHeater0(std::string("gpiochip7"), 16, std::string("Heater0"), gpio::OUT,
|
||||
0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_0, &gpioConfigHeater0);
|
||||
GpiodRegular* gpioConfigHeater0 = new GpiodRegular(std::string("gpiochip7"), 6,
|
||||
std::string("Heater0"), gpio::OUT, 0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpioConfigHeater0);
|
||||
|
||||
/* Pin H2-12 on stack connector */
|
||||
GpiodRegular gpioConfigHeater1(std::string("gpiochip7"), 12,
|
||||
std::string("Heater1"), gpio::OUT, 0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_1, &gpioConfigHeater1);
|
||||
GpiodRegular* gpioConfigHeater1 = new GpiodRegular(std::string("gpiochip7"), 12,
|
||||
std::string("Heater1"), gpio::OUT, 0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpioConfigHeater1);
|
||||
|
||||
/* Pin H2-13 on stack connector */
|
||||
GpiodRegular gpioConfigHeater2(std::string("gpiochip7"), 7,
|
||||
GpiodRegular* gpioConfigHeater2 = new GpiodRegular(std::string("gpiochip7"), 7,
|
||||
std::string("Heater2"), gpio::OUT, 0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_2, &gpioConfigHeater2);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpioConfigHeater2);
|
||||
|
||||
GpiodRegular gpioConfigHeater3(std::string("gpiochip7"), 5, std::string("Heater3"), gpio::OUT,
|
||||
0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_3, &gpioConfigHeater3);
|
||||
GpiodRegular* gpioConfigHeater3 = new GpiodRegular(std::string("gpiochip7"), 5,
|
||||
std::string("Heater3"), gpio::OUT, 0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpioConfigHeater3);
|
||||
|
||||
GpiodRegular gpioConfigHeater4(std::string("gpiochip7"), 3, std::string("Heater4"), gpio::OUT,
|
||||
0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_4, &gpioConfigHeater4);
|
||||
GpiodRegular* gpioConfigHeater4 = new GpiodRegular(std::string("gpiochip7"), 3,
|
||||
std::string("Heater4"), gpio::OUT, 0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpioConfigHeater4);
|
||||
|
||||
GpiodRegular gpioConfigHeater5(std::string("gpiochip7"), 0, std::string("Heater5"), gpio::OUT,
|
||||
0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_5, &gpioConfigHeater5);
|
||||
GpiodRegular* gpioConfigHeater5 = new GpiodRegular(std::string("gpiochip7"), 0,
|
||||
std::string("Heater5"), gpio::OUT, 0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpioConfigHeater5);
|
||||
|
||||
GpiodRegular gpioConfigHeater6(std::string("gpiochip7"), 1, std::string("Heater6"), gpio::OUT,
|
||||
0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_6, &gpioConfigHeater6);
|
||||
GpiodRegular* gpioConfigHeater6 = new GpiodRegular(std::string("gpiochip7"), 1,
|
||||
std::string("Heater6"), gpio::OUT, 0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpioConfigHeater6);
|
||||
|
||||
GpiodRegular gpioConfigHeater7(std::string("gpiochip7"), 11, std::string("Heater7"), gpio::OUT,
|
||||
0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_7, &gpioConfigHeater7);
|
||||
GpiodRegular* gpioConfigHeater7 = new GpiodRegular(std::string("gpiochip7"), 11,
|
||||
std::string("Heater7"), gpio::OUT, 0);
|
||||
heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpioConfigHeater7);
|
||||
|
||||
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie, objects::PCDU_HANDLER,
|
||||
pcduSwitches::TCS_BOARD_8V_HEATER_IN);
|
||||
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie,
|
||||
objects::PCDU_HANDLER, pcduSwitches::TCS_BOARD_8V_HEATER_IN);
|
||||
|
||||
GpioCookie* solarArrayDeplCookie = new GpioCookie;
|
||||
|
||||
GpiodRegular gpioConfigDeplSA0(std::string("gpiochip7"), 4,
|
||||
GpiodRegular* gpioConfigDeplSA0 = new GpiodRegular(std::string("gpiochip7"), 4,
|
||||
std::string("DeplSA1"), gpio::OUT, 0);
|
||||
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, &gpioConfigDeplSA0);
|
||||
GpiodRegular gpioConfigDeplSA1(std::string("gpiochip7"), 2,
|
||||
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpioConfigDeplSA0);
|
||||
GpiodRegular* gpioConfigDeplSA1 = new GpiodRegular(std::string("gpiochip7"), 2,
|
||||
std::string("DeplSA2"), gpio::OUT, 0);
|
||||
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, &gpioConfigDeplSA1);
|
||||
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpioConfigDeplSA1);
|
||||
|
||||
//TODO: Find out burn time. For now set to 1000 ms.
|
||||
new SolarArrayDeploymentHandler(objects::SOLAR_ARRAY_DEPL_HANDLER, objects::GPIO_IF,
|
||||
@ -202,12 +202,14 @@ void ObjectFactory::produce(){
|
||||
GpioCookie* rtdGpioCookie = new GpioCookie;
|
||||
|
||||
gpioCallbacks::initTcsBoardDecoder(gpioComIF);
|
||||
GpioCallback gpioRtdIc3(std::string("Chip select RTD IC3"), gpio::OUT, 1,
|
||||
GpioCallback* gpioRtdIc3 = new GpioCallback(std::string("Chip select RTD IC3"), gpio::OUT, 1,
|
||||
&gpioCallbacks::tcsBoardDecoderCallback, gpioComIF);
|
||||
rtdGpioCookie->addGpio(gpioIds::RTD_IC3, &gpioRtdIc3);
|
||||
GpioCallback gpioRtdIc4(std::string("Chip select RTD IC4"), gpio::OUT, 1,
|
||||
rtdGpioCookie->addGpio(gpioIds::RTD_IC3, gpioRtdIc3);
|
||||
GpioCallback* gpioRtdIc4 = new GpioCallback(std::string("Chip select RTD IC4"), gpio::OUT, 1,
|
||||
&gpioCallbacks::tcsBoardDecoderCallback, gpioComIF);
|
||||
rtdGpioCookie->addGpio(gpioIds::RTD_IC4, &gpioRtdIc4);
|
||||
rtdGpioCookie->addGpio(gpioIds::RTD_IC4, gpioRtdIc4);
|
||||
|
||||
gpioComIF->addGpios(rtdGpioCookie);
|
||||
|
||||
SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC3, gpioIds::RTD_IC3,
|
||||
std::string("/dev/spidev2.0"), Max31865Definitions::MAX_REPLY_SIZE,
|
||||
@ -215,9 +217,10 @@ void ObjectFactory::produce(){
|
||||
SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC4, gpioIds::RTD_IC4,
|
||||
std::string("/dev/spidev2.0"), Max31865Definitions::MAX_REPLY_SIZE,
|
||||
spi::SpiModes::MODE_1, 2000000);
|
||||
new Max31865PT1000Handler(objects::RTD_IC3, objects::SPI_COM_IF, spiRtdIc3, 0); // 0 is switchId
|
||||
new Max31865PT1000Handler(objects::RTD_IC4, objects::SPI_COM_IF, spiRtdIc4, 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);
|
||||
rtdIc3->setStartUpImmediately();
|
||||
// rtdIc4->setStartUpImmediately();
|
||||
#endif
|
||||
|
||||
new TmTcUnixUdpBridge(objects::UDP_BRIDGE,
|
||||
|
@ -25,24 +25,24 @@ void initTcsBoardDecoder(GpioIF* gpioComIF) {
|
||||
* Initial values of the spi mux gpios can all be set to an arbitrary value expect for spi mux
|
||||
* bit 1. Setting spi mux bit 1 to high will pull all decoder outputs to high voltage level.
|
||||
*/
|
||||
GpiodRegular spiMuxBit1(std::string("gpiochip7"), 13, std::string("SPI Mux Bit 1"), gpio::OUT,
|
||||
1);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, &spiMuxBit1);
|
||||
GpiodRegular spiMuxBit2(std::string("gpiochip7"), 14, std::string("SPI Mux Bit 2"), gpio::OUT,
|
||||
0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, &spiMuxBit2);
|
||||
GpiodRegular spiMuxBit3(std::string("gpiochip7"), 15, std::string("SPI Mux Bit 3"), gpio::OUT,
|
||||
0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, &spiMuxBit3);
|
||||
GpiodRegular spiMuxBit4(std::string("gpiochip7"), 16, std::string("SPI Mux Bit 4"), gpio::OUT,
|
||||
0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, &spiMuxBit4);
|
||||
GpiodRegular spiMuxBit5(std::string("gpiochip7"), 17, std::string("SPI Mux Bit 5"), gpio::OUT,
|
||||
0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, &spiMuxBit5);
|
||||
GpiodRegular spiMuxBit6(std::string("gpiochip7"), 18, std::string("SPI Mux Bit 6"), gpio::OUT,
|
||||
0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, &spiMuxBit6);
|
||||
GpiodRegular* spiMuxBit1 = new GpiodRegular(std::string("gpiochip7"), 13,
|
||||
std::string("SPI Mux Bit 1"), gpio::OUT, 1);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit1);
|
||||
GpiodRegular* spiMuxBit2 = new GpiodRegular(std::string("gpiochip7"), 14,
|
||||
std::string("SPI Mux Bit 2"), gpio::OUT, 0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit2);
|
||||
GpiodRegular* spiMuxBit3 = new GpiodRegular(std::string("gpiochip7"), 15,
|
||||
std::string("SPI Mux Bit 3"), gpio::OUT, 0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit3);
|
||||
GpiodRegular* spiMuxBit4 = new GpiodRegular(std::string("gpiochip7"), 16,
|
||||
std::string("SPI Mux Bit 4"), gpio::OUT, 0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit4);
|
||||
GpiodRegular* spiMuxBit5 = new GpiodRegular(std::string("gpiochip7"), 17,
|
||||
std::string("SPI Mux Bit 5"), gpio::OUT, 0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit5);
|
||||
GpiodRegular* spiMuxBit6 = new GpiodRegular(std::string("gpiochip7"), 18,
|
||||
std::string("SPI Mux Bit 6"), gpio::OUT, 0);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, spiMuxBit6);
|
||||
|
||||
result = gpioComInterface->addGpios(spiMuxGpios);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
|
@ -19,18 +19,23 @@ ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence)
|
||||
thisSequence->addSlot(objects::HEATER_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::SOLAR_ARRAY_DEPL_HANDLER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_IC3, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_IC3, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_IC3, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_IC3, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_IC3, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
|
||||
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
|
@ -15,7 +15,7 @@ ReturnValue_t GpioCookie::addGpio(gpioId_t gpioId, GpioBase* gpioConfig){
|
||||
if (statusPair.second == false) {
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
sif::error << "GpioCookie::addGpio: Failed to add GPIO " << gpioId <<
|
||||
"to GPIO map" << std::endl;
|
||||
" to GPIO map" << std::endl;
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
@ -56,11 +56,11 @@ ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap& mapToAdd) {
|
||||
break;
|
||||
}
|
||||
case(gpio::GpioTypes::CALLBACK): {
|
||||
auto gpioCallback = dynamic_cast<GpioCallback*>(gpioMapIter->second);
|
||||
auto gpioCallback = dynamic_cast<GpioCallback*>(gpioConfig.second);
|
||||
if(gpioCallback->callback == nullptr) {
|
||||
return GPIO_INVALID_INSTANCE;
|
||||
}
|
||||
gpioCallback->callback(gpioMapIter->first, gpio::GpioOperation::WRITE,
|
||||
gpioCallback->callback(gpioConfig.first, gpio::GpioOperation::WRITE,
|
||||
gpioCallback->initValue, gpioCallback->callbackArgs);
|
||||
}
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ void Max31865PT1000Handler::debugInterface(uint8_t positionTracker,
|
||||
|
||||
uint32_t Max31865PT1000Handler::getTransitionDelayMs(
|
||||
Mode_t modeFrom, Mode_t modeTo) {
|
||||
return 5000;
|
||||
return 10000;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865PT1000Handler::getSwitches(
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit 81cd88f5211e0d9853ba3d9dd7611a9c2149cd55
|
||||
Subproject commit 754edffeae9d884ce1a4d289d9cc9f0cd9192e59
|
Loading…
Reference in New Issue
Block a user