heater handler wip

This commit is contained in:
2021-01-28 14:55:21 +01:00
60 changed files with 1934 additions and 774 deletions

View File

@ -13,7 +13,11 @@
#include <fsfw/osal/linux/TcUnixUdpPollingTask.h>
#include <mission/core/GenericFactory.h>
#include <mission/devices/GomspaceDeviceHandler.h>
#include <mission/devices/PDU1Handler.h>
#include <mission/devices/PDU2Handler.h>
#include <mission/devices/ACUHandler.h>
#include <mission/devices/PCDUHandler.h>
#include <mission/devices/P60DockHandler.h>
#include <mission/devices/Tmp1075Handler.h>
#include <mission/devices/devicedefinitions/GomSpacePackets.h>
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
@ -58,28 +62,35 @@ void ObjectFactory::produce(){
addresses::PDU2);
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_LENGTH,
addresses::ACU);
#if TE0720 == 1
I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1,
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2,
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
#else
I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1,
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2,
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
#endif
/* Communication interfaces */
new CspComIF(objects::CSP_COM_IF);
new I2cComIF(objects::I2C_COM_IF);
/* Device Handler */
new GomspaceDeviceHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF,
new P60DockHandler(objects::P60DOCK_HANDLER, objects::CSP_COM_IF,
p60DockCspCookie, P60Dock::MAX_CONFIGTABLE_ADDRESS,
P60Dock::MAX_HKTABLE_ADDRESS);
new GomspaceDeviceHandler(objects::PDU1_HANDLER, objects::CSP_COM_IF,
P60Dock::MAX_HKTABLE_ADDRESS, P60Dock::HK_TABLE_SIZE);
new PDU1Handler(objects::PDU1_HANDLER, objects::CSP_COM_IF,
pdu1CspCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
PDU::MAX_HKTABLE_ADDRESS);
new GomspaceDeviceHandler(objects::PDU2_HANDLER, objects::CSP_COM_IF,
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_SIZE);
new PDU2Handler(objects::PDU2_HANDLER, objects::CSP_COM_IF,
pdu2CspCookie, PDU::MAX_CONFIGTABLE_ADDRESS,
PDU::MAX_HKTABLE_ADDRESS);
new GomspaceDeviceHandler(objects::ACU_HANDLER, objects::CSP_COM_IF,
PDU::MAX_HKTABLE_ADDRESS, PDU::HK_TABLE_SIZE);
new ACUHandler(objects::ACU_HANDLER, objects::CSP_COM_IF,
acuCspCookie, ACU::MAX_CONFIGTABLE_ADDRESS,
ACU::MAX_HKTABLE_ADDRESS);
ACU::MAX_HKTABLE_ADDRESS, ACU::HK_TABLE_SIZE);
new PCDUHandler(objects::PCDU_HANDLER);
/* Temperature sensors */
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
objects::TMP1075_HANDLER_1, objects::I2C_COM_IF,
@ -95,13 +106,15 @@ void ObjectFactory::produce(){
#if TE0720 == 1
// Configuration for MIO0 on TE0720-03-1CFA
GpioConfig_t gpioConfigForDummyHeater(std::string("gpiochip0"), 0,
std::string("Heater1"), Gpio::OUT);
gpioCookie.add(gpioIds::HEATER_1, gpioConfigForDummyHeater);
std::string("Heater0"), Gpio::OUT);
gpioCookie.add(gpioIds::HEATER_0, gpioConfigForDummyHeater);
#else
GpioConfig_t gpioConfigHeater0(std::string("gpiochip5"), 6,
std::string("Heater0"), Gpio::OUT);
gpioCookie.add(gpioIds::HEATER_0, gpioConfigHeater0);
#endif
LinuxLibgpioIF linuxLibgpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, );
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, gpioCookie);
new TmTcUnixUdpBridge(objects::UDP_BRIDGE,
objects::CCSDS_PACKET_DISTRIBUTOR,