v1.10.0 #220
@ -358,38 +358,32 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComI
|
|||||||
SpiCookie* spiCookie =
|
SpiCookie* spiCookie =
|
||||||
new SpiCookie(addresses::SUS_0, gpioIds::CS_SUS_0, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_0, gpioIds::CS_SUS_0, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler0 = new SusHandler(objects::SUS_0, 0, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler0 = new SusHandler(objects::SUS_0, 0, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_0);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_1, gpioIds::CS_SUS_1, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_1, gpioIds::CS_SUS_1, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler1 = new SusHandler(objects::SUS_1, 1, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler1 = new SusHandler(objects::SUS_1, 1, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_1);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_2, gpioIds::CS_SUS_2, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_2, gpioIds::CS_SUS_2, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler2 = new SusHandler(objects::SUS_2, 2, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler2 = new SusHandler(objects::SUS_2, 2, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_2);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_3, gpioIds::CS_SUS_3, std::string(q7s::SPI_DEFAULT_DEV),
|
new SpiCookie(addresses::SUS_3, gpioIds::CS_SUS_3, std::string(q7s::SPI_DEFAULT_DEV),
|
||||||
SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler3 = new SusHandler(objects::SUS_3, 3, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler3 = new SusHandler(objects::SUS_3, 3, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_3);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_4, gpioIds::CS_SUS_4, std::string(q7s::SPI_DEFAULT_DEV),
|
new SpiCookie(addresses::SUS_4, gpioIds::CS_SUS_4, std::string(q7s::SPI_DEFAULT_DEV),
|
||||||
SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler4 = new SusHandler(objects::SUS_4, 4, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler4 = new SusHandler(objects::SUS_4, 4, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_4);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_5, gpioIds::CS_SUS_5, std::string(q7s::SPI_DEFAULT_DEV),
|
new SpiCookie(addresses::SUS_5, gpioIds::CS_SUS_5, std::string(q7s::SPI_DEFAULT_DEV),
|
||||||
SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
SUS::MAX_CMD_SIZE, spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler5 = new SusHandler(objects::SUS_5, 5, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler5 = new SusHandler(objects::SUS_5, 5, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_5);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
@ -400,32 +394,27 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComI
|
|||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler7 = new SusHandler(objects::SUS_7, 7, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler7 = new SusHandler(objects::SUS_7, 7, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_7);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_8, gpioIds::CS_SUS_8, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_8, gpioIds::CS_SUS_8, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler8 = new SusHandler(objects::SUS_8, 8, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler8 = new SusHandler(objects::SUS_8, 8, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_8);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_9, gpioIds::CS_SUS_9, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_9, gpioIds::CS_SUS_9, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler9 = new SusHandler(objects::SUS_9, 9, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler9 = new SusHandler(objects::SUS_9, 9, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_9);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_10, gpioIds::CS_SUS_10, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_10, gpioIds::CS_SUS_10, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler10 = new SusHandler(objects::SUS_10, 10, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler10 = new SusHandler(objects::SUS_10, 10, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_10);
|
|
||||||
|
|
||||||
spiCookie =
|
spiCookie =
|
||||||
new SpiCookie(addresses::SUS_11, gpioIds::CS_SUS_11, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
new SpiCookie(addresses::SUS_11, gpioIds::CS_SUS_11, q7s::SPI_DEFAULT_DEV, SUS::MAX_CMD_SIZE,
|
||||||
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::DEFAULT_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
SusHandler* susHandler11 = new SusHandler(objects::SUS_11, 11, objects::SPI_COM_IF, spiCookie,
|
SusHandler* susHandler11 = new SusHandler(objects::SUS_11, 11, objects::SPI_COM_IF, spiCookie);
|
||||||
gpioComIF, gpioIds::CS_SUS_11);
|
|
||||||
static_cast<void>(susHandler0);
|
static_cast<void>(susHandler0);
|
||||||
static_cast<void>(susHandler1);
|
static_cast<void>(susHandler1);
|
||||||
static_cast<void>(susHandler2);
|
static_cast<void>(susHandler2);
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
SusHandler::SusHandler(object_id_t objectId, uint8_t susIdx, object_id_t comIF, CookieIF *comCookie,
|
SusHandler::SusHandler(object_id_t objectId, uint8_t susIdx, object_id_t comIF, CookieIF *comCookie)
|
||||||
LinuxLibgpioIF *gpioComIF, gpioId_t chipSelectId)
|
|
||||||
: DeviceHandlerBase(objectId, comIF, comCookie), divider(5), dataset(this), susIdx(susIdx) {}
|
: DeviceHandlerBase(objectId, comIF, comCookie), divider(5), dataset(this), susIdx(susIdx) {}
|
||||||
|
|
||||||
SusHandler::~SusHandler() {}
|
SusHandler::~SusHandler() {}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define MISSION_DEVICES_SUSHANDLER_H_
|
#define MISSION_DEVICES_SUSHANDLER_H_
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
|
|
||||||
|
|
||||||
#include "devicedefinitions/SusDefinitions.h"
|
#include "devicedefinitions/SusDefinitions.h"
|
||||||
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
|
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
|
||||||
@ -28,8 +27,7 @@ class SusHandler : public DeviceHandlerBase {
|
|||||||
|
|
||||||
static const uint8_t FIRST_WRITE = 7;
|
static const uint8_t FIRST_WRITE = 7;
|
||||||
|
|
||||||
SusHandler(object_id_t objectId, uint8_t susIdx, object_id_t comIF, CookieIF* comCookie,
|
SusHandler(object_id_t objectId, uint8_t susIdx, object_id_t comIF, CookieIF* comCookie);
|
||||||
LinuxLibgpioIF* gpioComIF, gpioId_t chipSelectId);
|
|
||||||
virtual ~SusHandler();
|
virtual ~SusHandler();
|
||||||
|
|
||||||
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
||||||
|
Loading…
Reference in New Issue
Block a user