This commit is contained in:
@ -6,6 +6,4 @@ add_subdirectory(devices)
|
||||
add_subdirectory(fsfwconfig)
|
||||
add_subdirectory(obc)
|
||||
|
||||
target_sources(${OBSW_NAME} PUBLIC
|
||||
ObjectFactory.cpp
|
||||
)
|
||||
target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp)
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
||||
#include <linux/callbacks/gpioCallbacks.h>
|
||||
#include <linux/devices/Max31865RtdLowlevelHandler.h>
|
||||
#include <mission/devices/Max31865EiveHandler.h>
|
||||
#include <mission/devices/Max31865PT1000Handler.h>
|
||||
#include <mission/devices/SusHandler.h>
|
||||
#include <mission/system/SusAssembly.h>
|
||||
@ -189,7 +191,7 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
}
|
||||
|
||||
void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
PowerSwitchIF* pwrSwitcher) {
|
||||
PowerSwitchIF* pwrSwitcher, SpiComIF* comIF) {
|
||||
using namespace gpio;
|
||||
GpioCookie* rtdGpioCookie = new GpioCookie;
|
||||
|
||||
@ -245,8 +247,8 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
gpioChecker(gpioComIF->addGpios(rtdGpioCookie), "RTDs");
|
||||
|
||||
#if OBSW_ADD_RTD_DEVICES == 1
|
||||
static constexpr uint8_t NUMBER_RTDS = 16;
|
||||
std::array<std::pair<address_t, gpioId_t>, NUMBER_RTDS> cookieArgs = {{
|
||||
using namespace EiveMax31855;
|
||||
std::array<std::pair<address_t, gpioId_t>, NUM_RTDS> cookieArgs = {{
|
||||
{addresses::RTD_IC_3, gpioIds::RTD_IC_3},
|
||||
{addresses::RTD_IC_4, gpioIds::RTD_IC_4},
|
||||
{addresses::RTD_IC_5, gpioIds::RTD_IC_5},
|
||||
@ -264,48 +266,52 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
{addresses::RTD_IC_17, gpioIds::RTD_IC_17},
|
||||
{addresses::RTD_IC_18, gpioIds::RTD_IC_18},
|
||||
}};
|
||||
std::array<object_id_t, NUMBER_RTDS> rtdIds = {objects::RTD_0_IC3_PLOC_HEATSPREADER,
|
||||
objects::RTD_1_IC4_PLOC_MISSIONBOARD,
|
||||
objects::RTD_2_IC5_4K_CAMERA,
|
||||
objects::RTD_3_IC6_DAC_HEATSPREADER,
|
||||
objects::RTD_4_IC7_STARTRACKER,
|
||||
objects::RTD_5_IC8_RW1_MX_MY,
|
||||
objects::RTD_6_IC9_DRO,
|
||||
objects::RTD_7_IC10_SCEX,
|
||||
objects::RTD_8_IC11_X8,
|
||||
objects::RTD_9_IC12_HPA,
|
||||
objects::RTD_10_IC13_PL_TX,
|
||||
objects::RTD_11_IC14_MPA,
|
||||
objects::RTD_12_IC15_ACU,
|
||||
objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
|
||||
objects::RTD_14_IC17_TCS_BOARD,
|
||||
objects::RTD_15_IC18_IMTQ};
|
||||
std::array<SpiCookie*, NUMBER_RTDS> rtdCookies = {};
|
||||
std::array<Max31865PT1000Handler*, NUMBER_RTDS> rtds = {};
|
||||
// HSPD: Heatspreader
|
||||
std::array<std::pair<object_id_t, std::string>, NUM_RTDS> rtdInfos = {{
|
||||
{objects::RTD_0_IC3_PLOC_HEATSPREADER, "RTD_0_PLOC_HSPD"},
|
||||
{objects::RTD_1_IC4_PLOC_MISSIONBOARD, "RTD_1_PLOC_MISSIONBRD"},
|
||||
{objects::RTD_2_IC5_4K_CAMERA, "RTD_2_4K_CAMERA"},
|
||||
{objects::RTD_3_IC6_DAC_HEATSPREADER, "RTD_3_DAC_HSPD"},
|
||||
{objects::RTD_4_IC7_STARTRACKER, "RTD_4_STARTRACKER"},
|
||||
{objects::RTD_5_IC8_RW1_MX_MY, "RTD_5_RW1_MX_MY"},
|
||||
{objects::RTD_6_IC9_DRO, "RTD_6_DRO"},
|
||||
{objects::RTD_7_IC10_SCEX, "RTD_7_SCEX"},
|
||||
{objects::RTD_8_IC11_X8, "RTD_8_X8"},
|
||||
{objects::RTD_9_IC12_HPA, "RTD_9_HPA"},
|
||||
{objects::RTD_10_IC13_PL_TX, "RTD_10_PL_TX,"},
|
||||
{objects::RTD_11_IC14_MPA, "RTD_11_MPA"},
|
||||
{objects::RTD_12_IC15_ACU, "RTD_12_ACU"},
|
||||
{objects::RTD_13_IC16_PLPCDU_HEATSPREADER, "RTD_13_PLPCDU_HSPD"},
|
||||
{objects::RTD_14_IC17_TCS_BOARD, "RTD_14_TCS_BOARD"},
|
||||
{objects::RTD_15_IC18_IMTQ, "RTD_15_IMTQ"},
|
||||
}};
|
||||
std::array<SpiCookie*, NUM_RTDS> rtdCookies = {};
|
||||
std::array<Max31865EiveHandler*, NUM_RTDS> rtds = {};
|
||||
RtdFdir* rtdFdir = nullptr;
|
||||
for (uint8_t idx = 0; idx < NUMBER_RTDS; idx++) {
|
||||
rtdCookies[idx] =
|
||||
new SpiCookie(cookieArgs[idx].first, cookieArgs[idx].second,
|
||||
Max31865Definitions::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
|
||||
rtds[idx] = new Max31865PT1000Handler(rtdIds[idx], objects::SPI_MAIN_COM_IF, rtdCookies[idx]);
|
||||
// Create special low level reader communication interface
|
||||
new Max31865RtdReader(objects::SPI_RTD_COM_IF, comIF, gpioComIF);
|
||||
for (uint8_t idx = 0; idx < NUM_RTDS; idx++) {
|
||||
rtdCookies[idx] = new SpiCookie(cookieArgs[idx].first, cookieArgs[idx].second,
|
||||
MAX31865::MAX_REPLY_SIZE, spi::RTD_MODE, spi::RTD_SPEED);
|
||||
rtdCookies[idx]->setMutexParams(MutexIF::TimeoutType::WAITING, spi::RTD_CS_TIMEOUT);
|
||||
Max31865ReaderCookie* rtdLowLevelCookie =
|
||||
new Max31865ReaderCookie(rtdInfos[idx].first, idx, rtdInfos[idx].second, rtdCookies[idx]);
|
||||
rtds[idx] =
|
||||
new Max31865EiveHandler(rtdInfos[idx].first, objects::SPI_RTD_COM_IF, rtdLowLevelCookie);
|
||||
rtds[idx]->setDeviceInfo(idx, rtdInfos[idx].second);
|
||||
rtds[idx]->setParent(objects::TCS_BOARD_ASS);
|
||||
rtdFdir = new RtdFdir(rtdIds[idx]);
|
||||
rtdFdir = new RtdFdir(rtdInfos[idx].first);
|
||||
rtds[idx]->setCustomFdir(rtdFdir);
|
||||
rtds[idx]->setDeviceIdx(idx + 3);
|
||||
#if OBSW_DEBUG_RTD == 1
|
||||
rtds[idx]->setDebugMode(true);
|
||||
rtds[idx]->setDebugMode(true, 5);
|
||||
#endif
|
||||
#if OBSW_TEST_RTD == 1
|
||||
rtds[idx]->setInstantNormal(true);
|
||||
rtds[idx]->setStartUpImmediately();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if OBSW_TEST_RTD == 1
|
||||
for (auto& rtd : rtds) {
|
||||
if (rtd != nullptr) {
|
||||
rtd->setStartUpImmediately();
|
||||
rtd->setInstantNormal(true);
|
||||
}
|
||||
}
|
||||
#endif // OBSW_TEST_RTD == 1
|
||||
TcsBoardHelper helper(rtdIds);
|
||||
TcsBoardHelper helper(rtdInfos);
|
||||
TcsBoardAssembly* tcsBoardAss =
|
||||
new TcsBoardAssembly(objects::TCS_BOARD_ASS, objects::NO_OBJECT, pwrSwitcher,
|
||||
pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
|
||||
|
@ -12,7 +12,8 @@ namespace ObjectFactory {
|
||||
|
||||
void createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF, PowerSwitchIF* pwrSwitcher,
|
||||
std::string spiDev);
|
||||
void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher);
|
||||
void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher,
|
||||
SpiComIF* comIF);
|
||||
|
||||
void gpioChecker(ReturnValue_t result, std::string output);
|
||||
|
||||
|
@ -1,10 +1,2 @@
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
LibgpiodTest.cpp
|
||||
I2cTestClass.cpp
|
||||
SpiTestClass.cpp
|
||||
UartTestClass.cpp
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
target_sources(${OBSW_NAME} PRIVATE LibgpiodTest.cpp I2cTestClass.cpp
|
||||
SpiTestClass.cpp UartTestClass.cpp)
|
||||
|
@ -1,3 +1 @@
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
gpioCallbacks.cpp
|
||||
)
|
||||
target_sources(${OBSW_NAME} PRIVATE gpioCallbacks.cpp)
|
||||
|
@ -1,8 +1 @@
|
||||
target_sources(${OBSW_NAME} PUBLIC
|
||||
CspComIF.cpp
|
||||
CspCookie.cpp
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
target_sources(${OBSW_NAME} PUBLIC CspComIF.cpp CspCookie.cpp)
|
||||
|
@ -1,8 +1,10 @@
|
||||
if(EIVE_BUILD_GPSD_GPS_HANDLER)
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
GPSHyperionLinuxController.cpp
|
||||
)
|
||||
target_sources(${OBSW_NAME} PRIVATE GPSHyperionLinuxController.cpp)
|
||||
endif()
|
||||
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
Max31865RtdLowlevelHandler.cpp
|
||||
)
|
||||
|
||||
add_subdirectory(ploc)
|
||||
add_subdirectory(startracker)
|
||||
|
465
linux/devices/Max31865RtdLowlevelHandler.cpp
Normal file
465
linux/devices/Max31865RtdLowlevelHandler.cpp
Normal file
@ -0,0 +1,465 @@
|
||||
#include "Max31865RtdLowlevelHandler.h"
|
||||
|
||||
#include <fsfw/tasks/TaskFactory.h>
|
||||
#include <fsfw/timemanager/Stopwatch.h>
|
||||
#include <fsfw_hal/linux/spi/ManualCsLockGuard.h>
|
||||
|
||||
#define OBSW_RTD_AUTO_MODE 1
|
||||
|
||||
#if OBSW_RTD_AUTO_MODE == 1
|
||||
static constexpr uint8_t BASE_CFG = (MAX31865::Bias::ON << MAX31865::CfgBitPos::BIAS_SEL) |
|
||||
(MAX31865::Wires::FOUR_WIRE << MAX31865::CfgBitPos::WIRE_SEL) |
|
||||
(MAX31865::ConvMode::AUTO << MAX31865::CfgBitPos::CONV_MODE);
|
||||
#else
|
||||
static constexpr uint8_t BASE_CFG =
|
||||
(MAX31865::Bias::OFF << MAX31865::CfgBitPos::BIAS_SEL) |
|
||||
(MAX31865::Wires::FOUR_WIRE << MAX31865::CfgBitPos::WIRE_SEL) |
|
||||
(MAX31865::ConvMode::NORM_OFF << MAX31865::CfgBitPos::CONV_MODE);
|
||||
#endif
|
||||
|
||||
Max31865RtdReader::Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelComIF, GpioIF* gpioIF)
|
||||
: SystemObject(objectId), rtds(EiveMax31855::NUM_RTDS), comIF(lowLevelComIF), gpioIF(gpioIF) {
|
||||
readerMutex = MutexFactory::instance()->createMutex();
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::performOperation(uint8_t operationCode) {
|
||||
using namespace MAX31865;
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
static_cast<void>(result);
|
||||
// Stopwatch watch;
|
||||
if (periodicInitHandling()) {
|
||||
#if OBSW_RTD_AUTO_MODE == 0
|
||||
// 10 ms delay for VBIAS startup
|
||||
TaskFactory::delayTask(10);
|
||||
#endif
|
||||
} else {
|
||||
// No devices usable (e.g. TCS board off)
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
#if OBSW_RTD_AUTO_MODE == 0
|
||||
result = periodicReadReqHandling();
|
||||
if (result != RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
// After requesting, 65 milliseconds delay required
|
||||
TaskFactory::delayTask(65);
|
||||
#endif
|
||||
|
||||
return periodicReadHandling();
|
||||
}
|
||||
|
||||
bool Max31865RtdReader::rtdIsActive(uint8_t idx) {
|
||||
if (rtds[idx]->on and rtds[idx]->active and rtds[idx]->configured) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Max31865RtdReader::periodicInitHandling() {
|
||||
using namespace MAX31865;
|
||||
MutexGuard mg(readerMutex);
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
if (mg.getLockResult() != RETURN_OK) {
|
||||
sif::warning << "Max31865RtdReader::periodicInitHandling: Mutex lock failed" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto& rtd : rtds) {
|
||||
if (rtd == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if ((rtd->on or rtd->active) and not rtd->configured and rtd->cd.hasTimedOut()) {
|
||||
ManualCsLockWrapper mg(csLock, gpioIF, rtd->spiCookie, csTimeoutType, csTimeoutMs);
|
||||
if (mg.lockResult != RETURN_OK or mg.gpioResult != RETURN_OK) {
|
||||
sif::error << "Max31865RtdReader::periodicInitHandling: Manual CS lock failed" << std::endl;
|
||||
break;
|
||||
}
|
||||
result = writeCfgReg(rtd->spiCookie, BASE_CFG);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
handleSpiError(rtd, result, "writeCfgReg");
|
||||
}
|
||||
if (rtd->writeLowThreshold) {
|
||||
result = writeLowThreshold(rtd->spiCookie, rtd->lowThreshold);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
handleSpiError(rtd, result, "writeLowThreshold");
|
||||
}
|
||||
}
|
||||
if (rtd->writeHighThreshold) {
|
||||
result = writeHighThreshold(rtd->spiCookie, rtd->highThreshold);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
handleSpiError(rtd, result, "writeHighThreshold");
|
||||
}
|
||||
}
|
||||
result = clearFaultStatus(rtd->spiCookie);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
handleSpiError(rtd, result, "clearFaultStatus");
|
||||
}
|
||||
rtd->configured = true;
|
||||
rtd->db.configured = true;
|
||||
if (rtd->active) {
|
||||
rtd->db.active = true;
|
||||
}
|
||||
}
|
||||
if (rtd->active and rtd->configured and not rtd->db.active) {
|
||||
rtd->db.active = true;
|
||||
}
|
||||
}
|
||||
bool someRtdUsable = false;
|
||||
for (auto& rtd : rtds) {
|
||||
if (rtd == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if (rtdIsActive(rtd->idx)) {
|
||||
#if OBSW_RTD_AUTO_MODE == 0
|
||||
someRtdUsable = true;
|
||||
result = writeBiasSel(Bias::ON, rtd->spiCookie, BASE_CFG);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return someRtdUsable;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::periodicReadReqHandling() {
|
||||
using namespace MAX31865;
|
||||
MutexGuard mg(readerMutex);
|
||||
if (mg.getLockResult() != RETURN_OK) {
|
||||
sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
// Now request one shot config for all active RTDs
|
||||
for (auto& rtd : rtds) {
|
||||
if (rtd == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if (rtdIsActive(rtd->idx)) {
|
||||
ReturnValue_t result = writeCfgReg(rtd->spiCookie, BASE_CFG | (1 << CfgBitPos::ONE_SHOT));
|
||||
if (result != RETURN_OK) {
|
||||
handleSpiError(rtd, result, "writeCfgReg");
|
||||
// Release mutex ASAP
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
}
|
||||
}
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::periodicReadHandling() {
|
||||
using namespace MAX31865;
|
||||
auto result = RETURN_OK;
|
||||
MutexGuard mg(readerMutex);
|
||||
if (mg.getLockResult() != RETURN_OK) {
|
||||
sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
// Now read the RTD values
|
||||
for (auto& rtd : rtds) {
|
||||
if (rtd == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if (rtdIsActive(rtd->idx)) {
|
||||
uint16_t rtdVal = 0;
|
||||
bool faultBitSet = false;
|
||||
result = readRtdVal(rtd->spiCookie, rtdVal, faultBitSet);
|
||||
if (result != RETURN_OK) {
|
||||
handleSpiError(rtd, result, "readRtdVal");
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
if (faultBitSet) {
|
||||
rtd->db.faultBitSet = faultBitSet;
|
||||
}
|
||||
rtd->db.adcCode = rtdVal;
|
||||
}
|
||||
}
|
||||
#if OBSW_RTD_AUTO_MODE == 0
|
||||
for (auto& rtd : rtds) {
|
||||
if (rtd == nullptr) {
|
||||
continue;
|
||||
}
|
||||
// Even if a device was made inactive, turn off the bias here. If it was turned off, not
|
||||
// necessary anymore..
|
||||
if (rtd->on) {
|
||||
result = writeBiasSel(Bias::OFF, rtd->spiCookie, BASE_CFG);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::initializeInterface(CookieIF* cookie) {
|
||||
if (cookie == nullptr) {
|
||||
throw std::invalid_argument("Invalid MAX31865 Reader Cookie");
|
||||
}
|
||||
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
|
||||
ReturnValue_t result = comIF->initializeInterface(rtdCookie->spiCookie);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
if (rtdCookie->idx > EiveMax31855::NUM_RTDS) {
|
||||
throw std::invalid_argument("Invalid RTD index");
|
||||
}
|
||||
rtds[rtdCookie->idx] = rtdCookie;
|
||||
MutexGuard mg(readerMutex);
|
||||
if (dbLen == 0) {
|
||||
dbLen = rtdCookie->db.getSerializedSize();
|
||||
}
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::sendMessage(CookieIF* cookie, const uint8_t* sendData,
|
||||
size_t sendLen) {
|
||||
if (cookie == nullptr) {
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
// Empty command.. don't fail for now
|
||||
if (sendLen < 1) {
|
||||
return RETURN_OK;
|
||||
}
|
||||
MutexGuard mg(readerMutex);
|
||||
if (mg.getLockResult() != RETURN_OK) {
|
||||
sif::warning << "Max31865RtdReader::sendMessage: Mutex lock failed" << std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
|
||||
uint8_t cmdRaw = sendData[0];
|
||||
if (cmdRaw > EiveMax31855::RtdCommands::NUM_CMDS) {
|
||||
sif::warning << "Max31865RtdReader::sendMessage: Invalid command" << std::endl;
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
|
||||
auto thresholdHandler = [](Max31865ReaderCookie* rtdCookie, const uint8_t* sendData) {
|
||||
rtdCookie->lowThreshold = (sendData[1] << 8) | sendData[2];
|
||||
rtdCookie->highThreshold = (sendData[3] << 8) | sendData[4];
|
||||
rtdCookie->writeLowThreshold = true;
|
||||
rtdCookie->writeHighThreshold = true;
|
||||
};
|
||||
|
||||
auto cmd = static_cast<EiveMax31855::RtdCommands>(sendData[0]);
|
||||
switch (cmd) {
|
||||
case (EiveMax31855::RtdCommands::ON): {
|
||||
if (not rtdCookie->on) {
|
||||
rtdCookie->cd.setTimeout(MAX31865::WARMUP_MS);
|
||||
rtdCookie->cd.resetTimer();
|
||||
rtdCookie->on = true;
|
||||
rtdCookie->active = false;
|
||||
rtdCookie->configured = false;
|
||||
if (sendLen == 5) {
|
||||
thresholdHandler(rtdCookie, sendData);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (EiveMax31855::RtdCommands::ACTIVE): {
|
||||
if (not rtdCookie->on) {
|
||||
rtdCookie->cd.setTimeout(MAX31865::WARMUP_MS);
|
||||
rtdCookie->cd.resetTimer();
|
||||
rtdCookie->on = true;
|
||||
rtdCookie->active = true;
|
||||
rtdCookie->configured = false;
|
||||
} else {
|
||||
rtdCookie->active = true;
|
||||
}
|
||||
if (sendLen == 5) {
|
||||
thresholdHandler(rtdCookie, sendData);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (EiveMax31855::RtdCommands::OFF): {
|
||||
rtdCookie->on = false;
|
||||
rtdCookie->active = false;
|
||||
rtdCookie->configured = false;
|
||||
break;
|
||||
}
|
||||
case (EiveMax31855::RtdCommands::HIGH_TRESHOLD): {
|
||||
if (sendLen == 3) {
|
||||
rtdCookie->highThreshold = (sendData[1] << 8) | sendData[2];
|
||||
rtdCookie->writeHighThreshold = true;
|
||||
} else {
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (EiveMax31855::RtdCommands::LOW_THRESHOLD): {
|
||||
if (sendLen == 3) {
|
||||
rtdCookie->lowThreshold = (sendData[1] << 8) | sendData[2];
|
||||
rtdCookie->writeLowThreshold = true;
|
||||
} else {
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (EiveMax31855::RtdCommands::CFG):
|
||||
default: {
|
||||
// TODO: Only implement if needed
|
||||
break;
|
||||
}
|
||||
}
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::getSendSuccess(CookieIF* cookie) { return RETURN_OK; }
|
||||
|
||||
ReturnValue_t Max31865RtdReader::requestReceiveMessage(CookieIF* cookie, size_t requestLen) {
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::readReceivedMessage(CookieIF* cookie, uint8_t** buffer,
|
||||
size_t* size) {
|
||||
MutexGuard mg(readerMutex);
|
||||
if (mg.getLockResult() != RETURN_OK) {
|
||||
// TODO: Emit warning
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
auto* rtdCookie = dynamic_cast<Max31865ReaderCookie*>(cookie);
|
||||
uint8_t* exchangePtr = rtdCookie->exchangeBuf.data();
|
||||
size_t serLen = 0;
|
||||
auto result = rtdCookie->db.serialize(&exchangePtr, &serLen, rtdCookie->exchangeBuf.size(),
|
||||
SerializeIF::Endianness::MACHINE);
|
||||
if (result != RETURN_OK) {
|
||||
// TODO: Emit warning
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
*buffer = reinterpret_cast<uint8_t*>(rtdCookie->exchangeBuf.data());
|
||||
*size = serLen;
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::writeCfgReg(SpiCookie* cookie, uint8_t cfg) {
|
||||
using namespace MAX31865;
|
||||
return writeNToReg(cookie, CONFIG, 1, &cfg, nullptr);
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::writeBiasSel(MAX31865::Bias bias, SpiCookie* cookie,
|
||||
uint8_t baseCfg) {
|
||||
using namespace MAX31865;
|
||||
if (bias == MAX31865::Bias::OFF) {
|
||||
baseCfg &= ~(1 << CfgBitPos::BIAS_SEL);
|
||||
} else {
|
||||
baseCfg |= (1 << CfgBitPos::BIAS_SEL);
|
||||
}
|
||||
return writeCfgReg(cookie, baseCfg);
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::clearFaultStatus(SpiCookie* cookie) {
|
||||
using namespace MAX31865;
|
||||
// Read back the current configuration to avoid overwriting it when clearing te fault status
|
||||
uint8_t currentCfg = 0;
|
||||
auto result = readCfgReg(cookie, currentCfg);
|
||||
if (result != RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
// Clear bytes 5, 3 and 2 which need to be 0
|
||||
currentCfg &= ~0x2C;
|
||||
currentCfg |= (1 << CfgBitPos::FAULT_STATUS_CLEAR);
|
||||
return writeCfgReg(cookie, currentCfg);
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::readCfgReg(SpiCookie* cookie, uint8_t& cfg) {
|
||||
using namespace MAX31865;
|
||||
uint8_t* replyPtr = nullptr;
|
||||
auto result = readNFromReg(cookie, CONFIG, 1, &replyPtr);
|
||||
if (result == RETURN_OK) {
|
||||
cfg = replyPtr[0];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::writeLowThreshold(SpiCookie* cookie, uint16_t val) {
|
||||
using namespace MAX31865;
|
||||
uint8_t cmd[2] = {static_cast<uint8_t>((val >> 8) & 0xff), static_cast<uint8_t>(val & 0xff)};
|
||||
return writeNToReg(cookie, LOW_THRESHOLD, 2, cmd, nullptr);
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::writeHighThreshold(SpiCookie* cookie, uint16_t val) {
|
||||
using namespace MAX31865;
|
||||
uint8_t cmd[2] = {static_cast<uint8_t>((val >> 8) & 0xff), static_cast<uint8_t>(val & 0xff)};
|
||||
return writeNToReg(cookie, HIGH_THRESHOLD, 2, cmd, nullptr);
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::readLowThreshold(SpiCookie* cookie, uint16_t& lowThreshold) {
|
||||
using namespace MAX31865;
|
||||
uint8_t* replyPtr = nullptr;
|
||||
auto result = readNFromReg(cookie, LOW_THRESHOLD, 2, &replyPtr);
|
||||
if (result == RETURN_OK) {
|
||||
lowThreshold = (replyPtr[0] << 8) | replyPtr[1];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::readHighThreshold(SpiCookie* cookie, uint16_t& highThreshold) {
|
||||
using namespace MAX31865;
|
||||
uint8_t* replyPtr = nullptr;
|
||||
auto result = readNFromReg(cookie, HIGH_THRESHOLD, 2, &replyPtr);
|
||||
if (result == RETURN_OK) {
|
||||
highThreshold = (replyPtr[0] << 8) | replyPtr[1];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::writeNToReg(SpiCookie* cookie, uint8_t reg, size_t n, uint8_t* cmd,
|
||||
uint8_t** reply) {
|
||||
using namespace MAX31865;
|
||||
if (n > cmdBuf.size() - 1) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
cmdBuf[0] = reg | WRITE_BIT;
|
||||
for (size_t idx = 0; idx < n; idx++) {
|
||||
cmdBuf[idx + 1] = cmd[idx];
|
||||
}
|
||||
return comIF->sendMessage(cookie, cmdBuf.data(), n + 1);
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::readRtdVal(SpiCookie* cookie, uint16_t& val, bool& faultBitSet) {
|
||||
using namespace MAX31865;
|
||||
uint8_t* replyPtr = nullptr;
|
||||
auto result = readNFromReg(cookie, RTD, 2, &replyPtr);
|
||||
if (result != RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
if (replyPtr[1] & 0b0000'0001) {
|
||||
faultBitSet = true;
|
||||
}
|
||||
// Shift 1 to the right to remove fault bit
|
||||
val = ((replyPtr[0] << 8) | replyPtr[1]) >> 1;
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::readNFromReg(SpiCookie* cookie, uint8_t reg, size_t n,
|
||||
uint8_t** reply) {
|
||||
using namespace MAX31865;
|
||||
if (n > 4) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
// Clear write bit in any case
|
||||
reg &= ~WRITE_BIT;
|
||||
cmdBuf[0] = reg;
|
||||
std::memset(cmdBuf.data() + 1, 0, n);
|
||||
ReturnValue_t result = comIF->sendMessage(cookie, cmdBuf.data(), n + 1);
|
||||
if (result != RETURN_OK) {
|
||||
return RETURN_FAILED;
|
||||
}
|
||||
|
||||
size_t dummyLen = 0;
|
||||
uint8_t* replyPtr = nullptr;
|
||||
result = comIF->readReceivedMessage(cookie, &replyPtr, &dummyLen);
|
||||
if (result != RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
if (reply != nullptr) {
|
||||
*reply = replyPtr + 1;
|
||||
}
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::handleSpiError(Max31865ReaderCookie* cookie, ReturnValue_t result,
|
||||
const char* ctx) {
|
||||
cookie->db.spiErrorCount.value += 1;
|
||||
sif::warning << "Max31865RtdReader::handleSpiError: " << ctx << " | Failed with result " << result
|
||||
<< std::endl;
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t Max31865RtdReader::initialize() {
|
||||
csLock = comIF->getCsMutex();
|
||||
return SystemObject::initialize();
|
||||
}
|
87
linux/devices/Max31865RtdLowlevelHandler.h
Normal file
87
linux/devices/Max31865RtdLowlevelHandler.h
Normal file
@ -0,0 +1,87 @@
|
||||
#ifndef LINUX_DEVICES_MAX31865RTDREADER_H_
|
||||
#define LINUX_DEVICES_MAX31865RTDREADER_H_
|
||||
|
||||
#include <fsfw/ipc/MutexIF.h>
|
||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
||||
|
||||
#include "fsfw/devicehandlers/DeviceCommunicationIF.h"
|
||||
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
||||
|
||||
struct Max31865ReaderCookie : public CookieIF {
|
||||
Max31865ReaderCookie(){};
|
||||
Max31865ReaderCookie(object_id_t handlerId_, uint8_t idx_, const std::string& locString_,
|
||||
SpiCookie* spiCookie_)
|
||||
: idx(idx_), handlerId(handlerId_), locString(locString_), spiCookie(spiCookie_) {}
|
||||
|
||||
uint8_t idx = 0;
|
||||
object_id_t handlerId = objects::NO_OBJECT;
|
||||
|
||||
std::string locString = "";
|
||||
std::array<uint8_t, 12> exchangeBuf{};
|
||||
Countdown cd = Countdown(MAX31865::WARMUP_MS);
|
||||
|
||||
bool on = false;
|
||||
bool configured = false;
|
||||
bool active = false;
|
||||
bool writeLowThreshold = false;
|
||||
bool writeHighThreshold = false;
|
||||
uint16_t lowThreshold = 0;
|
||||
uint16_t highThreshold = 0;
|
||||
SpiCookie* spiCookie = nullptr;
|
||||
|
||||
// Exchange data buffer struct
|
||||
EiveMax31855::ReadOutStruct db;
|
||||
};
|
||||
|
||||
class Max31865RtdReader : public SystemObject,
|
||||
public ExecutableObjectIF,
|
||||
public DeviceCommunicationIF {
|
||||
public:
|
||||
Max31865RtdReader(object_id_t objectId, SpiComIF* lowLevelComIF, GpioIF* gpioIF);
|
||||
|
||||
ReturnValue_t performOperation(uint8_t operationCode) override;
|
||||
ReturnValue_t initialize() override;
|
||||
|
||||
private:
|
||||
std::vector<Max31865ReaderCookie*> rtds;
|
||||
std::array<uint8_t, 4> cmdBuf = {};
|
||||
size_t dbLen = 0;
|
||||
MutexIF* readerMutex;
|
||||
|
||||
SpiComIF* comIF;
|
||||
GpioIF* gpioIF;
|
||||
MutexIF::TimeoutType csTimeoutType = MutexIF::TimeoutType::BLOCKING;
|
||||
uint32_t csTimeoutMs = 0;
|
||||
MutexIF* csLock = nullptr;
|
||||
|
||||
bool periodicInitHandling();
|
||||
ReturnValue_t periodicReadReqHandling();
|
||||
ReturnValue_t periodicReadHandling();
|
||||
|
||||
bool rtdIsActive(uint8_t idx);
|
||||
ReturnValue_t writeCfgReg(SpiCookie* cookie, uint8_t cfg);
|
||||
ReturnValue_t writeBiasSel(MAX31865::Bias bias, SpiCookie* cookie, uint8_t baseCfg);
|
||||
ReturnValue_t readCfgReg(SpiCookie* cookie, uint8_t& cfg);
|
||||
ReturnValue_t readRtdVal(SpiCookie* cookie, uint16_t& val, bool& faultBitSet);
|
||||
ReturnValue_t writeLowThreshold(SpiCookie* cookie, uint16_t val);
|
||||
ReturnValue_t writeHighThreshold(SpiCookie* cookie, uint16_t val);
|
||||
ReturnValue_t readLowThreshold(SpiCookie* cookie, uint16_t& val);
|
||||
ReturnValue_t readHighThreshold(SpiCookie* cookie, uint16_t& val);
|
||||
ReturnValue_t clearFaultStatus(SpiCookie* cookie);
|
||||
|
||||
ReturnValue_t readNFromReg(SpiCookie* cookie, uint8_t reg, size_t n, uint8_t** reply);
|
||||
ReturnValue_t writeNToReg(SpiCookie* cookie, uint8_t reg, size_t n, uint8_t* cmd,
|
||||
uint8_t** reply);
|
||||
|
||||
ReturnValue_t initializeInterface(CookieIF* cookie) override;
|
||||
ReturnValue_t sendMessage(CookieIF* cookie, const uint8_t* sendData, size_t sendLen) override;
|
||||
ReturnValue_t getSendSuccess(CookieIF* cookie) override;
|
||||
ReturnValue_t requestReceiveMessage(CookieIF* cookie, size_t requestLen) override;
|
||||
ReturnValue_t readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) override;
|
||||
|
||||
ReturnValue_t handleSpiError(Max31865ReaderCookie* cookie, ReturnValue_t result, const char* ctx);
|
||||
};
|
||||
|
||||
#endif /* LINUX_DEVICES_MAX31865RTDREADER_H_ */
|
@ -310,6 +310,9 @@ class ApidOnlyPacket : public SpacePacket {
|
||||
*/
|
||||
class MPSoCBootSelect : public SpacePacket {
|
||||
public:
|
||||
static const uint8_t NVM0 = 0;
|
||||
static const uint8_t NVM1 = 1;
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*
|
||||
|
@ -1,7 +1,4 @@
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
PlocSupervisorHandler.cpp
|
||||
PlocMemoryDumper.cpp
|
||||
PlocMPSoCHandler.cpp
|
||||
PlocMPSoCHelper.cpp
|
||||
PlocSupvHelper.cpp
|
||||
)
|
||||
target_sources(
|
||||
${OBSW_NAME}
|
||||
PRIVATE PlocSupervisorHandler.cpp PlocMemoryDumper.cpp PlocMPSoCHandler.cpp
|
||||
PlocMPSoCHelper.cpp PlocSupvHelper.cpp)
|
||||
|
@ -108,6 +108,9 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
||||
MessageQueueIF* eventQueue = nullptr;
|
||||
MessageQueueIF* commandActionHelperQueue = nullptr;
|
||||
|
||||
// Initiate the sequence count with the maximum value. It is incremented before
|
||||
// a packet is sent, so the first value will be 0 accordingly using
|
||||
// the wrap around of the counter.
|
||||
SourceSequenceCounter sequenceCount =
|
||||
SourceSequenceCounter(SpacePacketBase::LIMIT_SEQUENCE_COUNT - 1);
|
||||
|
||||
|
@ -1071,7 +1071,8 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
|
||||
nextReplyId = supv::EXE_REPORT;
|
||||
|
||||
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: SoC State (0 - off, 1 - booting, 2 - Update, 3 "
|
||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: SoC State (0 - off, 1 - booting, 2 "
|
||||
"- Update, 3 "
|
||||
"- operating, 4 - Shutdown, 5 - Reset): "
|
||||
<< static_cast<unsigned int>(bootStatusReport.socState.value) << std::endl;
|
||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Power Cycles: "
|
||||
|
@ -10,8 +10,8 @@
|
||||
#endif
|
||||
|
||||
#include "fsfw/globalfunctions/CRC.h"
|
||||
#include "fsfw/timemanager/Countdown.h"
|
||||
#include "fsfw/tasks/TaskFactory.h"
|
||||
#include "fsfw/timemanager/Countdown.h"
|
||||
#include "mission/utility/Filenaming.h"
|
||||
#include "mission/utility/ProgressPrinter.h"
|
||||
#include "mission/utility/Timestamp.h"
|
||||
@ -214,6 +214,7 @@ ReturnValue_t PlocSupvHelper::writeUpdatePackets() {
|
||||
while (update.remainingSize > 0) {
|
||||
if (terminate) {
|
||||
terminate = false;
|
||||
triggerEvent(TERMINATED_UPDATE_PROCEDURE);
|
||||
return PROCESS_TERMINATED;
|
||||
}
|
||||
if (update.remainingSize > supv::WriteMemory::CHUNK_MAX) {
|
||||
@ -433,8 +434,7 @@ ReturnValue_t PlocSupvHelper::receive(uint8_t* data, size_t* readBytes, size_t r
|
||||
}
|
||||
if (*readBytes > 0) {
|
||||
std::memcpy(data, buffer, *readBytes);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
TaskFactory::delayTask(40);
|
||||
}
|
||||
return result;
|
||||
|
@ -1,7 +1,4 @@
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
StarTrackerHandler.cpp
|
||||
StarTrackerJsonCommands.cpp
|
||||
ArcsecDatalinkLayer.cpp
|
||||
ArcsecJsonParamBase.cpp
|
||||
StrHelper.cpp
|
||||
)
|
||||
target_sources(
|
||||
${OBSW_NAME}
|
||||
PRIVATE StarTrackerHandler.cpp StarTrackerJsonCommands.cpp
|
||||
ArcsecDatalinkLayer.cpp ArcsecJsonParamBase.cpp StrHelper.cpp)
|
||||
|
@ -1,28 +1,16 @@
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
ipc/MissionMessageTypes.cpp
|
||||
pollingsequence/pollingSequenceFactory.cpp
|
||||
)
|
||||
target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp
|
||||
pollingsequence/pollingSequenceFactory.cpp)
|
||||
|
||||
target_include_directories(${OBSW_NAME} PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# If a special translation file for object IDs exists, compile it.
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
objects/translateObjects.cpp
|
||||
)
|
||||
target_sources(${UNITTEST_NAME} PRIVATE
|
||||
objects/translateObjects.cpp
|
||||
)
|
||||
target_sources(${OBSW_NAME} PRIVATE objects/translateObjects.cpp)
|
||||
target_sources(${UNITTEST_NAME} PRIVATE objects/translateObjects.cpp)
|
||||
endif()
|
||||
|
||||
# If a special translation file for events exists, compile it.
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
||||
target_sources(${OBSW_NAME} PRIVATE
|
||||
events/translateEvents.cpp
|
||||
)
|
||||
target_sources(${UNITTEST_NAME} PRIVATE
|
||||
events/translateEvents.cpp
|
||||
)
|
||||
target_sources(${OBSW_NAME} PRIVATE events/translateEvents.cpp)
|
||||
target_sources(${UNITTEST_NAME} PRIVATE events/translateEvents.cpp)
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 203 translations.
|
||||
* @brief Auto-generated event translation file. Contains 206 translations.
|
||||
* @details
|
||||
* Generated on: 2022-05-21 10:25:06
|
||||
* Generated on: 2022-05-23 16:46:55
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -90,9 +90,12 @@ const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
|
||||
const char *FDIR_REACTION_IGNORED_STRING = "FDIR_REACTION_IGNORED";
|
||||
const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED";
|
||||
const char *GPIO_PULL_LOW_FAILED_STRING = "GPIO_PULL_LOW_FAILED";
|
||||
const char *HEATER_WENT_ON_STRING = "HEATER_WENT_ON";
|
||||
const char *HEATER_WENT_OFF_STRING = "HEATER_WENT_OFF";
|
||||
const char *SWITCH_ALREADY_ON_STRING = "SWITCH_ALREADY_ON";
|
||||
const char *SWITCH_ALREADY_OFF_STRING = "SWITCH_ALREADY_OFF";
|
||||
const char *MAIN_SWITCH_TIMEOUT_STRING = "MAIN_SWITCH_TIMEOUT";
|
||||
const char *FAULTY_HEATER_WAS_ON_STRING = "FAULTY_HEATER_WAS_ON";
|
||||
const char *MAIN_SWITCH_ON_TIMEOUT_STRING = "MAIN_SWITCH_ON_TIMEOUT";
|
||||
const char *MAIN_SWITCH_OFF_TIMEOUT_STRING = "MAIN_SWITCH_OFF_TIMEOUT";
|
||||
const char *DEPLOYMENT_FAILED_STRING = "DEPLOYMENT_FAILED";
|
||||
@ -378,11 +381,17 @@ const char *translateEvents(Event event) {
|
||||
case (11401):
|
||||
return GPIO_PULL_LOW_FAILED_STRING;
|
||||
case (11402):
|
||||
return SWITCH_ALREADY_ON_STRING;
|
||||
return HEATER_WENT_ON_STRING;
|
||||
case (11403):
|
||||
return SWITCH_ALREADY_OFF_STRING;
|
||||
return HEATER_WENT_OFF_STRING;
|
||||
case (11404):
|
||||
return SWITCH_ALREADY_ON_STRING;
|
||||
case (11405):
|
||||
return SWITCH_ALREADY_OFF_STRING;
|
||||
case (11406):
|
||||
return MAIN_SWITCH_TIMEOUT_STRING;
|
||||
case (11407):
|
||||
return FAULTY_HEATER_WAS_ON_STRING;
|
||||
case (11500):
|
||||
return MAIN_SWITCH_ON_TIMEOUT_STRING;
|
||||
case (11501):
|
||||
|
@ -50,13 +50,7 @@ enum sourceObjects : uint32_t {
|
||||
SPI_MAIN_COM_IF = 0x49020004,
|
||||
GPIO_IF = 0x49010005,
|
||||
SPI_RW_COM_IF = 0x49020005,
|
||||
|
||||
/* Custom device handler */
|
||||
PCDU_HANDLER = 0x442000A1,
|
||||
SOLAR_ARRAY_DEPL_HANDLER = 0x444100A2,
|
||||
SYRLINKS_HK_HANDLER = 0x445300A3,
|
||||
HEATER_HANDLER = 0x444100A4,
|
||||
RAD_SENSOR = 0x443200A5,
|
||||
SPI_RTD_COM_IF = 0x49020006,
|
||||
|
||||
/* 0x54 ('T') for test handlers */
|
||||
TEST_TASK = 0x54694269,
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 118 translations.
|
||||
* Generated on: 2022-05-21 10:25:00
|
||||
* Contains 131 translations.
|
||||
* Generated on: 2022-05-23 16:46:58
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -45,9 +45,12 @@ const char *ACU_HANDLER_STRING = "ACU_HANDLER";
|
||||
const char *BPX_BATT_HANDLER_STRING = "BPX_BATT_HANDLER";
|
||||
const char *PLPCDU_HANDLER_STRING = "PLPCDU_HANDLER";
|
||||
const char *RAD_SENSOR_STRING = "RAD_SENSOR";
|
||||
const char *PLOC_UPDATER_STRING = "PLOC_UPDATER";
|
||||
const char *PLOC_MEMORY_DUMPER_STRING = "PLOC_MEMORY_DUMPER";
|
||||
const char *STR_HELPER_STRING = "STR_HELPER";
|
||||
const char *PLOC_MPSOC_HELPER_STRING = "PLOC_MPSOC_HELPER";
|
||||
const char *AXI_PTME_CONFIG_STRING = "AXI_PTME_CONFIG";
|
||||
const char *PTME_CONFIG_STRING = "PTME_CONFIG";
|
||||
const char *PLOC_MPSOC_HANDLER_STRING = "PLOC_MPSOC_HANDLER";
|
||||
const char *PLOC_SUPERVISOR_HANDLER_STRING = "PLOC_SUPERVISOR_HANDLER";
|
||||
const char *PLOC_SUPERVISOR_HELPER_STRING = "PLOC_SUPERVISOR_HELPER";
|
||||
@ -76,6 +79,7 @@ const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
|
||||
const char *GPIO_IF_STRING = "GPIO_IF";
|
||||
const char *SPI_MAIN_COM_IF_STRING = "SPI_MAIN_COM_IF";
|
||||
const char *SPI_RW_COM_IF_STRING = "SPI_RW_COM_IF";
|
||||
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
|
||||
const char *UART_COM_IF_STRING = "UART_COM_IF";
|
||||
const char *I2C_COM_IF_STRING = "I2C_COM_IF";
|
||||
const char *CSP_COM_IF_STRING = "CSP_COM_IF";
|
||||
@ -96,6 +100,7 @@ const char *PUS_SERVICE_3_HOUSEKEEPING_STRING = "PUS_SERVICE_3_HOUSEKEEPING";
|
||||
const char *PUS_SERVICE_5_EVENT_REPORTING_STRING = "PUS_SERVICE_5_EVENT_REPORTING";
|
||||
const char *PUS_SERVICE_8_FUNCTION_MGMT_STRING = "PUS_SERVICE_8_FUNCTION_MGMT";
|
||||
const char *PUS_SERVICE_9_TIME_MGMT_STRING = "PUS_SERVICE_9_TIME_MGMT";
|
||||
const char *PUS_SERVICE_11_TC_SCHEDULER_STRING = "PUS_SERVICE_11_TC_SCHEDULER";
|
||||
const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST";
|
||||
const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS";
|
||||
const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT";
|
||||
@ -117,6 +122,14 @@ const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
|
||||
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
|
||||
const char *LIBGPIOD_TEST_STRING = "LIBGPIOD_TEST";
|
||||
const char *TEST_TASK_STRING = "TEST_TASK";
|
||||
const char *HEATER_0_PLOC_PROC_BRD_STRING = "HEATER_0_PLOC_PROC_BRD";
|
||||
const char *HEATER_1_PCDU_BRD_STRING = "HEATER_1_PCDU_BRD";
|
||||
const char *HEATER_2_ACS_BRD_STRING = "HEATER_2_ACS_BRD";
|
||||
const char *HEATER_3_OBC_BRD_STRING = "HEATER_3_OBC_BRD";
|
||||
const char *HEATER_4_CAMERA_STRING = "HEATER_4_CAMERA";
|
||||
const char *HEATER_5_STR_STRING = "HEATER_5_STR";
|
||||
const char *HEATER_6_DRO_STRING = "HEATER_6_DRO";
|
||||
const char *HEATER_7_HPA_STRING = "HEATER_7_HPA";
|
||||
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
||||
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
||||
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
||||
@ -205,12 +218,18 @@ const char *translateObject(object_id_t object) {
|
||||
return PLPCDU_HANDLER_STRING;
|
||||
case 0x443200A5:
|
||||
return RAD_SENSOR_STRING;
|
||||
case 0x44330000:
|
||||
return PLOC_UPDATER_STRING;
|
||||
case 0x44330001:
|
||||
return PLOC_MEMORY_DUMPER_STRING;
|
||||
case 0x44330002:
|
||||
return STR_HELPER_STRING;
|
||||
case 0x44330003:
|
||||
return PLOC_MPSOC_HELPER_STRING;
|
||||
case 0x44330004:
|
||||
return AXI_PTME_CONFIG_STRING;
|
||||
case 0x44330005:
|
||||
return PTME_CONFIG_STRING;
|
||||
case 0x44330015:
|
||||
return PLOC_MPSOC_HANDLER_STRING;
|
||||
case 0x44330016:
|
||||
@ -267,6 +286,8 @@ const char *translateObject(object_id_t object) {
|
||||
return SPI_MAIN_COM_IF_STRING;
|
||||
case 0x49020005:
|
||||
return SPI_RW_COM_IF_STRING;
|
||||
case 0x49020006:
|
||||
return SPI_RTD_COM_IF_STRING;
|
||||
case 0x49030003:
|
||||
return UART_COM_IF_STRING;
|
||||
case 0x49040002:
|
||||
@ -307,6 +328,8 @@ const char *translateObject(object_id_t object) {
|
||||
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
|
||||
case 0x53000009:
|
||||
return PUS_SERVICE_9_TIME_MGMT_STRING;
|
||||
case 0x53000011:
|
||||
return PUS_SERVICE_11_TC_SCHEDULER_STRING;
|
||||
case 0x53000017:
|
||||
return PUS_SERVICE_17_TEST_STRING;
|
||||
case 0x53000020:
|
||||
@ -349,6 +372,22 @@ const char *translateObject(object_id_t object) {
|
||||
return LIBGPIOD_TEST_STRING;
|
||||
case 0x54694269:
|
||||
return TEST_TASK_STRING;
|
||||
case 0x60000000:
|
||||
return HEATER_0_PLOC_PROC_BRD_STRING;
|
||||
case 0x60000001:
|
||||
return HEATER_1_PCDU_BRD_STRING;
|
||||
case 0x60000002:
|
||||
return HEATER_2_ACS_BRD_STRING;
|
||||
case 0x60000003:
|
||||
return HEATER_3_OBC_BRD_STRING;
|
||||
case 0x60000004:
|
||||
return HEATER_4_CAMERA_STRING;
|
||||
case 0x60000005:
|
||||
return HEATER_5_STR_STRING;
|
||||
case 0x60000006:
|
||||
return HEATER_6_DRO_STRING;
|
||||
case 0x60000007:
|
||||
return HEATER_7_HPA_STRING;
|
||||
case 0x73000001:
|
||||
return ACS_BOARD_ASS_STRING;
|
||||
case 0x73000002:
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
|
||||
|
||||
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
||||
|
||||
#ifndef RPI_TEST_ADIS16507
|
||||
#define RPI_TEST_ADIS16507 0
|
||||
#endif
|
||||
@ -64,157 +66,34 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
static_cast<void>(length);
|
||||
#if OBSW_ADD_PL_PCDU == 1
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
#if OBSW_ADD_TMP_DEVICES == 1
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
#endif
|
||||
#if OBSW_ADD_RTD_DEVICES == 1
|
||||
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
#endif /* OBSW_ADD_RTD_DEVICES */
|
||||
|
||||
#if OBSW_ADD_TMP_DEVICES == 1
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
#endif
|
||||
#if OBSW_ADD_RTD_DEVICES == 1
|
||||
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0.2,
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0.2,
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0.2,
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0.2,
|
||||
DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
#endif /* OBSW_ADD_RTD_DEVICES */
|
||||
|
||||
#if OBSW_ADD_TMP_DEVICES == 1
|
||||
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.2, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::GET_WRITE);
|
||||
#endif
|
||||
#if OBSW_ADD_RTD_DEVICES == 1
|
||||
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0.4,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0.4,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0.4,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0.4,
|
||||
DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
#endif /* OBSW_ADD_RTD_DEVICES */
|
||||
|
||||
#if OBSW_ADD_TMP_DEVICES == 1
|
||||
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.2, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::SEND_READ);
|
||||
#endif
|
||||
#if OBSW_ADD_RTD_DEVICES == 1
|
||||
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0.6,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0.6,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0.6,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0.6,
|
||||
DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
#endif /* OBSW_ADD_RTD_DEVICES */
|
||||
|
||||
#if OBSW_ADD_TMP_DEVICES == 1
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
#if OBSW_ADD_RTD_DEVICES == 1
|
||||
thisSequence->addSlot(objects::RTD_0_IC3_PLOC_HEATSPREADER, length * 0.8,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_1_IC4_PLOC_MISSIONBOARD, length * 0.8,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_2_IC5_4K_CAMERA, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_3_IC6_DAC_HEATSPREADER, length * 0.8,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_4_IC7_STARTRACKER, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_5_IC8_RW1_MX_MY, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_6_IC9_DRO, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_7_IC10_SCEX, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_8_IC11_X8, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_9_IC12_HPA, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_10_IC13_PL_TX, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_11_IC14_MPA, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_12_IC15_ACU, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_13_IC16_PLPCDU_HEATSPREADER, length * 0.8,
|
||||
DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_14_IC17_TCS_BOARD, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::RTD_15_IC18_IMTQ, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
#endif /* OBSW_ADD_RTD_DEVICES */
|
||||
|
||||
#if OBSW_ADD_RAD_SENSORS == 1
|
||||
/* Radiation sensor */
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_1, length * 0.2, DeviceHandlerIF::GET_READ);
|
||||
thisSequence->addSlot(objects::TMP1075_HANDLER_2, length * 0.2, DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_SUN_SENSORS == 1
|
||||
@ -482,6 +361,15 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
}
|
||||
#endif /* OBSW_ADD_SUN_SENSORS == 1 */
|
||||
|
||||
#if OBSW_ADD_RAD_SENSORS == 1
|
||||
/* Radiation sensor */
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.6, DeviceHandlerIF::SEND_READ);
|
||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
|
||||
#if OBSW_ADD_ACS_BOARD == 1 && OBSW_ADD_ACS_HANDLERS == 1
|
||||
bool enableAside = true;
|
||||
bool enableBside = true;
|
||||
|
@ -1,10 +1,3 @@
|
||||
target_sources(${OBSW_NAME} PUBLIC
|
||||
PapbVcInterface.cpp
|
||||
Ptme.cpp
|
||||
PdecHandler.cpp
|
||||
PdecConfig.cpp
|
||||
PtmeConfig.cpp
|
||||
AxiPtmeConfig.cpp
|
||||
)
|
||||
|
||||
|
||||
target_sources(
|
||||
${OBSW_NAME} PUBLIC PapbVcInterface.cpp Ptme.cpp PdecHandler.cpp
|
||||
PdecConfig.cpp PtmeConfig.cpp AxiPtmeConfig.cpp)
|
||||
|
@ -1,7 +1 @@
|
||||
target_sources(${OBSW_NAME} PUBLIC
|
||||
utility.cpp
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
target_sources(${OBSW_NAME} PUBLIC utility.cpp)
|
||||
|
Reference in New Issue
Block a user