solved all merge conflicts
This commit is contained in:
parent
862a546637
commit
e44773fee3
@ -8,10 +8,7 @@
|
|||||||
|
|
||||||
#include <bsp_q7s/devices/HeaterHandler.h>
|
#include <bsp_q7s/devices/HeaterHandler.h>
|
||||||
#include <bsp_q7s/devices/SolarArrayDeploymentHandler.h>
|
#include <bsp_q7s/devices/SolarArrayDeploymentHandler.h>
|
||||||
<<<<<<< HEAD
|
|
||||||
#include <bsp_q7s/gpio/gpioCallbacks.h>
|
#include <bsp_q7s/gpio/gpioCallbacks.h>
|
||||||
=======
|
|
||||||
>>>>>>> develop
|
|
||||||
|
|
||||||
#include <mission/core/GenericFactory.h>
|
#include <mission/core/GenericFactory.h>
|
||||||
#include <mission/devices/PDU1Handler.h>
|
#include <mission/devices/PDU1Handler.h>
|
||||||
@ -20,13 +17,10 @@
|
|||||||
#include <mission/devices/PCDUHandler.h>
|
#include <mission/devices/PCDUHandler.h>
|
||||||
#include <mission/devices/P60DockHandler.h>
|
#include <mission/devices/P60DockHandler.h>
|
||||||
#include <mission/devices/Tmp1075Handler.h>
|
#include <mission/devices/Tmp1075Handler.h>
|
||||||
<<<<<<< HEAD
|
|
||||||
#include <mission/devices/Max31865PT1000Handler.h>
|
#include <mission/devices/Max31865PT1000Handler.h>
|
||||||
#include <mission/devices/devicedefinitions/Max31865Definitions.h>
|
#include <mission/devices/devicedefinitions/Max31865Definitions.h>
|
||||||
|
|
||||||
#include <mission/devices/SyrlinksHkHandler.h>
|
#include <mission/devices/SyrlinksHkHandler.h>
|
||||||
=======
|
|
||||||
>>>>>>> develop
|
|
||||||
#include <mission/devices/devicedefinitions/GomSpacePackets.h>
|
#include <mission/devices/devicedefinitions/GomSpacePackets.h>
|
||||||
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||||
#include <mission/devices/devicedefinitions/SyrlinksDefinitions.h>
|
#include <mission/devices/devicedefinitions/SyrlinksDefinitions.h>
|
||||||
@ -127,18 +121,11 @@ void ObjectFactory::produce(){
|
|||||||
* Setting PCDU devices to mode normal immediately after start up because PCDU is always
|
* Setting PCDU devices to mode normal immediately after start up because PCDU is always
|
||||||
* running.
|
* running.
|
||||||
*/
|
*/
|
||||||
<<<<<<< HEAD
|
|
||||||
/** For now this needs to be commented out because there is no PCDU connected to the OBC */
|
/** For now this needs to be commented out because there is no PCDU connected to the OBC */
|
||||||
// p60dockhandler->setModeNormal();
|
// p60dockhandler->setModeNormal();
|
||||||
// pdu1handler->setModeNormal();
|
// pdu1handler->setModeNormal();
|
||||||
// pdu2handler->setModeNormal();
|
// pdu2handler->setModeNormal();
|
||||||
// acuhandler->setModeNormal();
|
// acuhandler->setModeNormal();
|
||||||
=======
|
|
||||||
//p60dockhandler->setModeNormal();
|
|
||||||
//pdu1handler->setModeNormal();
|
|
||||||
//pdu2handler->setModeNormal();
|
|
||||||
//acuhandler->setModeNormal();
|
|
||||||
>>>>>>> develop
|
|
||||||
#endif
|
#endif
|
||||||
/* Temperature sensors */
|
/* Temperature sensors */
|
||||||
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
||||||
@ -224,10 +211,10 @@ void ObjectFactory::produce(){
|
|||||||
|
|
||||||
SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC3, gpioIds::RTD_IC3,
|
SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC3, gpioIds::RTD_IC3,
|
||||||
std::string("/dev/spidev2.0"), Max31865Definitions::MAX_REPLY_SIZE,
|
std::string("/dev/spidev2.0"), Max31865Definitions::MAX_REPLY_SIZE,
|
||||||
spi::SpiMode::MODE_1, 2000000);
|
spi::SpiModes::MODE_1, 2000000);
|
||||||
SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC4, gpioIds::RTD_IC4,
|
SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC4, gpioIds::RTD_IC4,
|
||||||
std::string("/dev/spidev2.0"), Max31865Definitions::MAX_REPLY_SIZE,
|
std::string("/dev/spidev2.0"), Max31865Definitions::MAX_REPLY_SIZE,
|
||||||
spi::SpiMode::MODE_1, 2000000);
|
spi::SpiModes::MODE_1, 2000000);
|
||||||
new Max31865PT1000Handler(objects::RTD_IC3, objects::SPI_COM_IF, spiRtdIc3, 0); // 0 is switchId
|
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);
|
new Max31865PT1000Handler(objects::RTD_IC4, objects::SPI_COM_IF, spiRtdIc4, 0);
|
||||||
|
|
||||||
|
@ -43,14 +43,6 @@ namespace objects {
|
|||||||
ACU_HANDLER = 0x44000004,
|
ACU_HANDLER = 0x44000004,
|
||||||
TMP1075_HANDLER_1 = 0x44000005,
|
TMP1075_HANDLER_1 = 0x44000005,
|
||||||
TMP1075_HANDLER_2 = 0x44000006,
|
TMP1075_HANDLER_2 = 0x44000006,
|
||||||
MGM_0_LIS3_HANDLER = 0x4400007,
|
|
||||||
MGM_1_RM3100_HANDLER = 0x44000008,
|
|
||||||
MGM_2_LIS3_HANDLER = 0x44000009,
|
|
||||||
MGM_3_RM3100_HANDLER = 0x44000010,
|
|
||||||
GYRO_0_ADIS_HANDLER = 0x44000011,
|
|
||||||
GYRO_1_L3G_HANDLER = 0x44000012,
|
|
||||||
GYRO_2_L3G_HANDLER = 0x44000013,
|
|
||||||
|
|
||||||
MGM_0_LIS3_HANDLER = 0x4400007,
|
MGM_0_LIS3_HANDLER = 0x4400007,
|
||||||
MGM_1_RM3100_HANDLER = 0x44000008,
|
MGM_1_RM3100_HANDLER = 0x44000008,
|
||||||
MGM_2_LIS3_HANDLER = 0x44000009,
|
MGM_2_LIS3_HANDLER = 0x44000009,
|
||||||
@ -62,10 +54,7 @@ namespace objects {
|
|||||||
/* Custom device handler */
|
/* Custom device handler */
|
||||||
PCDU_HANDLER = 0x44001000,
|
PCDU_HANDLER = 0x44001000,
|
||||||
SOLAR_ARRAY_DEPL_HANDLER = 0x44001001,
|
SOLAR_ARRAY_DEPL_HANDLER = 0x44001001,
|
||||||
<<<<<<< HEAD
|
|
||||||
SYRLINKS_HK_HANDLER = 0x44000009,
|
SYRLINKS_HK_HANDLER = 0x44000009,
|
||||||
=======
|
|
||||||
>>>>>>> develop
|
|
||||||
|
|
||||||
/* 0x54 ('T') for thermal objects */
|
/* 0x54 ('T') for thermal objects */
|
||||||
HEATER_HANDLER = 0x54000003,
|
HEATER_HANDLER = 0x54000003,
|
||||||
|
141
fsfwconfig/pollingsequence/pollingSequenceFactory.cpp
Normal file
141
fsfwconfig/pollingsequence/pollingSequenceFactory.cpp
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
#include "pollingSequenceFactory.h"
|
||||||
|
|
||||||
|
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||||
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
|
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||||
|
#include <fsfwconfig/objects/systemObjectList.h>
|
||||||
|
|
||||||
|
|
||||||
|
ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence)
|
||||||
|
{
|
||||||
|
/* Length of a communication cycle */
|
||||||
|
uint32_t length = thisSequence->getPeriodMs();
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
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::TMP1075_HANDLER_1, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::TMP1075_HANDLER_2, 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::TMP1075_HANDLER_1, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::TMP1075_HANDLER_2, 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);
|
||||||
|
|
||||||
|
if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
sif::error << "PollingSequence::initialize has errors!" << std::endl;
|
||||||
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t pst::gomspacePstInit(FixedTimeslotTaskIF *thisSequence){
|
||||||
|
uint32_t length = thisSequence->getPeriodMs();
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::PCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::PCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||||
|
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||||
|
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||||
|
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||||
|
length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||||
|
length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||||
|
length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||||
|
length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||||
|
length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||||
|
length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||||
|
length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||||
|
length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||||
|
length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||||
|
length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||||
|
length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||||
|
length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||||
|
length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::P60DOCK_HANDLER,
|
||||||
|
length * 0.8, DeviceHandlerIF::GET_READ);
|
||||||
|
thisSequence->addSlot(objects::PDU1_HANDLER,
|
||||||
|
length * 0.8, DeviceHandlerIF::GET_READ);
|
||||||
|
thisSequence->addSlot(objects::PDU2_HANDLER,
|
||||||
|
length * 0.8, DeviceHandlerIF::GET_READ);
|
||||||
|
thisSequence->addSlot(objects::ACU_HANDLER,
|
||||||
|
length * 0.8, DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
|
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
sif::error << "Initialization of GomSpace PST failed" << std::endl;
|
||||||
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
}
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t pst::pollingSequenceAcsTest(FixedTimeslotTaskIF *thisSequence) {
|
||||||
|
uint32_t length = thisSequence->getPeriodMs();
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.2,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.4,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.6,
|
||||||
|
DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.8,
|
||||||
|
DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.2,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.4,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.6,
|
||||||
|
DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0.8,
|
||||||
|
DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.2,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.4,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.6,
|
||||||
|
DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * 0.8,
|
||||||
|
DeviceHandlerIF::GET_READ);
|
||||||
|
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
sif::error << "Initialization of ACS Board PST failed" << std::endl;
|
||||||
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
}
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
@ -296,37 +296,37 @@ void SpiTestClass::acsInit() {
|
|||||||
{
|
{
|
||||||
GpiodRegular gpio(rpiGpioName, mgm0Lis3ChipSelect, "MGM_0_LIS3",
|
GpiodRegular gpio(rpiGpioName, mgm0Lis3ChipSelect, "MGM_0_LIS3",
|
||||||
gpio::Direction::OUT, 1);
|
gpio::Direction::OUT, 1);
|
||||||
gpioCookie->addGpio(gpioIds::MGM_0_LIS3_CS, gpio);
|
gpioCookie->addGpio(gpioIds::MGM_0_LIS3_CS, &gpio);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
GpiodRegular gpio(rpiGpioName, mgm1Rm3100ChipSelect, "MGM_1_RM3100",
|
GpiodRegular gpio(rpiGpioName, mgm1Rm3100ChipSelect, "MGM_1_RM3100",
|
||||||
gpio::Direction::OUT, 1);
|
gpio::Direction::OUT, 1);
|
||||||
gpioCookie->addGpio(gpioIds::MGM_1_RM3100_CS, gpio);
|
gpioCookie->addGpio(gpioIds::MGM_1_RM3100_CS, &gpio);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
GpiodRegular gpio(rpiGpioName, gyro0AdisChipSelect, "GYRO_0_ADIS",
|
GpiodRegular gpio(rpiGpioName, gyro0AdisChipSelect, "GYRO_0_ADIS",
|
||||||
gpio::Direction::OUT, 1);
|
gpio::Direction::OUT, 1);
|
||||||
gpioCookie->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio);
|
gpioCookie->addGpio(gpioIds::GYRO_0_ADIS_CS, &gpio);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
GpiodRegular gpio(rpiGpioName, gyro1L3gd20ChipSelect, "GYRO_1_L3G",
|
GpiodRegular gpio(rpiGpioName, gyro1L3gd20ChipSelect, "GYRO_1_L3G",
|
||||||
gpio::Direction::OUT, 1);
|
gpio::Direction::OUT, 1);
|
||||||
gpioCookie->addGpio(gpioIds::GYRO_1_L3G_CS, gpio);
|
gpioCookie->addGpio(gpioIds::GYRO_1_L3G_CS, &gpio);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
GpiodRegular gpio(rpiGpioName, gyro2L3gd20ChipSelect, "GYRO_2_L3G",
|
GpiodRegular gpio(rpiGpioName, gyro2L3gd20ChipSelect, "GYRO_2_L3G",
|
||||||
gpio::Direction::OUT, 1);
|
gpio::Direction::OUT, 1);
|
||||||
gpioCookie->addGpio(gpioIds::GYRO_2_L3G_CS, gpio);
|
gpioCookie->addGpio(gpioIds::GYRO_2_L3G_CS, &gpio);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
GpiodRegular gpio(rpiGpioName, mgm2Lis3mdlChipSelect, "MGM_2_LIS3",
|
GpiodRegular gpio(rpiGpioName, mgm2Lis3mdlChipSelect, "MGM_2_LIS3",
|
||||||
gpio::Direction::OUT, 1);
|
gpio::Direction::OUT, 1);
|
||||||
gpioCookie->addGpio(gpioIds::MGM_2_LIS3_CS, gpio);
|
gpioCookie->addGpio(gpioIds::MGM_2_LIS3_CS, &gpio);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
GpiodRegular gpio(rpiGpioName, mgm3Rm3100ChipSelect, "MGM_3_RM3100",
|
GpiodRegular gpio(rpiGpioName, mgm3Rm3100ChipSelect, "MGM_3_RM3100",
|
||||||
gpio::Direction::OUT, 1);
|
gpio::Direction::OUT, 1);
|
||||||
gpioCookie->addGpio(gpioIds::MGM_3_RM3100_CS, gpio);
|
gpioCookie->addGpio(gpioIds::MGM_3_RM3100_CS, &gpio);
|
||||||
}
|
}
|
||||||
if(gpioIF != nullptr) {
|
if(gpioIF != nullptr) {
|
||||||
gpioIF->addGpios(gpioCookie);
|
gpioIF->addGpios(gpioCookie);
|
||||||
|
@ -47,14 +47,6 @@ private:
|
|||||||
uint8_t mgm3Rm3100ChipSelect = 27;
|
uint8_t mgm3Rm3100ChipSelect = 27;
|
||||||
|
|
||||||
static constexpr uint8_t STM_READ_MASK = 0b1000'0000;
|
static constexpr uint8_t STM_READ_MASK = 0b1000'0000;
|
||||||
<<<<<<< HEAD
|
|
||||||
static constexpr uint8_t STM_AUTO_INCR_MASK = 0b0100'0000;
|
|
||||||
|
|
||||||
void setSpiSpeedAndMode(int spiFd, spi::SpiMode mode, uint32_t speed);
|
|
||||||
void writeStmRegister(int fd, gpioId_t chipSelect, uint8_t reg, uint8_t value,
|
|
||||||
bool autoIncrement);
|
|
||||||
uint8_t readStmRegister(int fd, gpioId_t chipSelect, uint8_t reg, bool autoIncrement);
|
|
||||||
=======
|
|
||||||
static constexpr uint8_t RM3100_READ_MASK = STM_READ_MASK;
|
static constexpr uint8_t RM3100_READ_MASK = STM_READ_MASK;
|
||||||
static constexpr uint8_t STM_AUTO_INCR_MASK = 0b0100'0000;
|
static constexpr uint8_t STM_AUTO_INCR_MASK = 0b0100'0000;
|
||||||
|
|
||||||
@ -75,7 +67,6 @@ private:
|
|||||||
size_t len);
|
size_t len);
|
||||||
void readMultipleRegisters(int fd, gpioId_t chipSelect, uint8_t reg,
|
void readMultipleRegisters(int fd, gpioId_t chipSelect, uint8_t reg,
|
||||||
uint8_t* reply, size_t len);
|
uint8_t* reply, size_t len);
|
||||||
>>>>>>> develop
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,12 +88,8 @@ ReturnValue_t LinuxLibgpioIF::configureRegularGpio(gpioId_t gpioId, GpiodRegular
|
|||||||
lineNum = regularGpio->lineNum;
|
lineNum = regularGpio->lineNum;
|
||||||
lineHandle = gpiod_chip_get_line(chip, lineNum);
|
lineHandle = gpiod_chip_get_line(chip, lineNum);
|
||||||
if (!lineHandle) {
|
if (!lineHandle) {
|
||||||
<<<<<<< HEAD
|
|
||||||
sif::error << "LinuxLibgpioIF::configureGpios: Failed to open line for GPIO with id "
|
sif::error << "LinuxLibgpioIF::configureGpios: Failed to open line for GPIO with id "
|
||||||
<< gpioId << std::endl;
|
<< gpioId << std::endl;
|
||||||
=======
|
|
||||||
sif::error << "LinuxLibgpioIF::configureGpios: Failed to open line" << std::endl;
|
|
||||||
>>>>>>> develop
|
|
||||||
gpiod_chip_close(chip);
|
gpiod_chip_close(chip);
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <fsfw/datapool/PoolReadHelper.h>
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
#include "MGMHandlerLIS3MDL.h"
|
#include "MGMHandlerLIS3MDL.h"
|
||||||
|
|
||||||
#include <fsfw/datapool/PoolReadGuard.h>
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <mission/devices/SyrlinksHkHandler.h>
|
#include <mission/devices/SyrlinksHkHandler.h>
|
||||||
#include <fsfwconfig/OBSWConfig.h>
|
#include <fsfwconfig/OBSWConfig.h>
|
||||||
#include <fsfw/globalfunctions/CRC.h>
|
#include <fsfw/globalfunctions/CRC.h>
|
||||||
#include <fsfw/datapool/PoolReadHelper.h>
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
#include <fsfwconfig/OBSWConfig.h>
|
#include <fsfwconfig/OBSWConfig.h>
|
||||||
|
|
||||||
SyrlinksHkHandler::SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
|
SyrlinksHkHandler::SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
|
||||||
@ -364,7 +364,7 @@ ReturnValue_t SyrlinksHkHandler::verifyReply(const uint8_t* packet, uint8_t size
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SyrlinksHkHandler::parseRxStatusRegistersReply(const uint8_t* packet) {
|
void SyrlinksHkHandler::parseRxStatusRegistersReply(const uint8_t* packet) {
|
||||||
PoolReadHelper readHelper(&rxDataset);
|
PoolReadGuard readHelper(&rxDataset);
|
||||||
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
||||||
rxDataset.rxStatus = convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
rxDataset.rxStatus = convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
||||||
offset += 2;
|
offset += 2;
|
||||||
@ -396,7 +396,7 @@ void SyrlinksHkHandler::parseRxStatusRegistersReply(const uint8_t* packet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SyrlinksHkHandler::parseTxStatusReply(const uint8_t* packet) {
|
void SyrlinksHkHandler::parseTxStatusReply(const uint8_t* packet) {
|
||||||
PoolReadHelper readHelper(&txDataset);
|
PoolReadGuard readHelper(&txDataset);
|
||||||
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
||||||
txDataset.txStatus = convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
txDataset.txStatus = convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1 && SYRLINKS_DEBUG == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && SYRLINKS_DEBUG == 1
|
||||||
@ -406,7 +406,7 @@ void SyrlinksHkHandler::parseTxStatusReply(const uint8_t* packet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SyrlinksHkHandler::parseTxWaveformReply(const uint8_t* packet) {
|
void SyrlinksHkHandler::parseTxWaveformReply(const uint8_t* packet) {
|
||||||
PoolReadHelper readHelper(&txDataset);
|
PoolReadGuard readHelper(&txDataset);
|
||||||
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
||||||
txDataset.txWaveform = convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
txDataset.txWaveform = convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1 && SYRLINKS_DEBUG == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && SYRLINKS_DEBUG == 1
|
||||||
@ -416,7 +416,7 @@ void SyrlinksHkHandler::parseTxWaveformReply(const uint8_t* packet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SyrlinksHkHandler::parseAgcLowByte(const uint8_t* packet) {
|
void SyrlinksHkHandler::parseAgcLowByte(const uint8_t* packet) {
|
||||||
PoolReadHelper readHelper(&txDataset);
|
PoolReadGuard readHelper(&txDataset);
|
||||||
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
||||||
txDataset.txAgcValue = agcValueHighByte << 8 | convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
txDataset.txAgcValue = agcValueHighByte << 8 | convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1 && SYRLINKS_DEBUG == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && SYRLINKS_DEBUG == 1
|
||||||
@ -425,7 +425,7 @@ void SyrlinksHkHandler::parseAgcLowByte(const uint8_t* packet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SyrlinksHkHandler::parseAgcHighByte(const uint8_t* packet) {
|
void SyrlinksHkHandler::parseAgcHighByte(const uint8_t* packet) {
|
||||||
PoolReadHelper readHelper(&txDataset);
|
PoolReadGuard readHelper(&txDataset);
|
||||||
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
uint16_t offset = SYRLINKS::MESSAGE_HEADER_SIZE;
|
||||||
agcValueHighByte = convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
agcValueHighByte = convertHexStringToUint8(reinterpret_cast<const char*>(packet + offset));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user