Merge remote-tracking branch 'origin/develop' into mueller/pus-15-tm-storage
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -28,9 +28,11 @@
|
||||
#include "mission/system/objects/TcsBoardAssembly.h"
|
||||
#include "mission/system/tree/acsModeTree.h"
|
||||
#include "mission/system/tree/payloadModeTree.h"
|
||||
#include "mission/system/tree/tcsModeTree.h"
|
||||
|
||||
void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||
PowerSwitchIF* pwrSwitcher, std::string spiDev) {
|
||||
PowerSwitchIF* pwrSwitcher, std::string spiDev,
|
||||
bool swap0And6) {
|
||||
using namespace gpio;
|
||||
GpioCookie* gpioCookieSus = new GpioCookie();
|
||||
GpioCallback* susgpio = nullptr;
|
||||
@ -77,7 +79,11 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
#if OBSW_ADD_SUN_SENSORS == 1
|
||||
SusFdir* fdir = nullptr;
|
||||
std::array<SusHandler*, 12> susHandlers = {};
|
||||
SpiCookie* spiCookie = new SpiCookie(addresses::SUS_0, gpioIds::CS_SUS_0, SUS::MAX_CMD_SIZE,
|
||||
gpioId_t gpioId = gpioIds::CS_SUS_0;
|
||||
if (swap0And6) {
|
||||
gpioId = gpioIds::CS_SUS_6;
|
||||
}
|
||||
SpiCookie* spiCookie = new SpiCookie(addresses::SUS_0, gpioId, SUS::MAX_CMD_SIZE,
|
||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||
susHandlers[0] =
|
||||
new SusHandler(objects::SUS_0_N_LOC_XFYFZM_PT_XF, 0, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
@ -119,8 +125,12 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
||||
fdir = new SusFdir(objects::SUS_5_N_LOC_XFYMZB_PT_ZB);
|
||||
susHandlers[5]->setCustomFdir(fdir);
|
||||
|
||||
spiCookie = new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, SUS::MAX_CMD_SIZE,
|
||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||
gpioId = gpioIds::CS_SUS_6;
|
||||
if (swap0And6) {
|
||||
gpioId = gpioIds::CS_SUS_0;
|
||||
}
|
||||
spiCookie = new SpiCookie(addresses::SUS_6, gpioId, SUS::MAX_CMD_SIZE, spi::SUS_MAX_1227_MODE,
|
||||
spi::SUS_MAX1227_SPI_FREQ);
|
||||
susHandlers[6] =
|
||||
new SusHandler(objects::SUS_6_R_LOC_XFYBZM_PT_XF, 6, objects::SPI_MAIN_COM_IF, spiCookie);
|
||||
fdir = new SusFdir(objects::SUS_6_R_LOC_XFYBZM_PT_XF);
|
||||
@ -292,7 +302,7 @@ void ObjectFactory::createRtdComponents(std::string spiDev, GpioIF* gpioComIF,
|
||||
TcsBoardHelper helper(rtdInfos);
|
||||
TcsBoardAssembly* tcsBoardAss = new TcsBoardAssembly(
|
||||
objects::TCS_BOARD_ASS, pwrSwitcher, pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
|
||||
static_cast<void>(tcsBoardAss);
|
||||
tcsBoardAss->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
||||
// 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++) {
|
||||
@ -341,7 +351,8 @@ void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwr
|
||||
}
|
||||
|
||||
void ObjectFactory::createThermalController() {
|
||||
new ThermalController(objects::THERMAL_CONTROLLER);
|
||||
auto* tcsCtrl = new ThermalController(objects::THERMAL_CONTROLLER);
|
||||
tcsCtrl->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
||||
}
|
||||
|
||||
AcsController* ObjectFactory::createAcsController(bool connectSubsystem) {
|
||||
|
@ -19,7 +19,7 @@ class AcsController;
|
||||
namespace ObjectFactory {
|
||||
|
||||
void createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF, PowerSwitchIF* pwrSwitcher,
|
||||
std::string spiDev);
|
||||
std::string spiDev, bool swap0And6);
|
||||
void createRtdComponents(std::string spiDev, GpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher,
|
||||
SpiComIF* comIF);
|
||||
|
||||
|
@ -143,7 +143,7 @@ ReturnValue_t Max31865RtdReader::periodicReadHandling() {
|
||||
auto result = returnvalue::OK;
|
||||
MutexGuard mg(readerMutex);
|
||||
if (mg.getLockResult() != returnvalue::OK) {
|
||||
sif::warning << "Max31865RtdReader::periodicReadReqHandling: Mutex lock failed" << std::endl;
|
||||
sif::warning << "Max31865RtdReader::periodicReadHandling: Mutex lock failed" << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
// Now read the RTD values
|
||||
@ -154,6 +154,10 @@ ReturnValue_t Max31865RtdReader::periodicReadHandling() {
|
||||
if (rtdIsActive(rtd->idx)) {
|
||||
uint16_t rtdVal = 0;
|
||||
bool faultBitSet = false;
|
||||
result = writeCfgReg(rtd->spiCookie, BASE_CFG);
|
||||
if (result != returnvalue::OK) {
|
||||
handleSpiError(rtd, result, "writeCfgReg");
|
||||
}
|
||||
result = readRtdVal(rtd->spiCookie, rtdVal, faultBitSet);
|
||||
if (result != returnvalue::OK) {
|
||||
handleSpiError(rtd, result, "readRtdVal");
|
||||
@ -282,7 +286,13 @@ ReturnValue_t Max31865RtdReader::sendMessage(CookieIF* cookie, const uint8_t* se
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (EiveMax31855::RtdCommands::CFG):
|
||||
case (EiveMax31855::RtdCommands::CFG): {
|
||||
ReturnValue_t result = writeCfgReg(rtdCookie->spiCookie, BASE_CFG);
|
||||
if (result != returnvalue::OK) {
|
||||
handleSpiError(rtdCookie, result, "writeCfgReg");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
// TODO: Only implement if needed
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 239 translations.
|
||||
* @brief Auto-generated event translation file. Contains 240 translations.
|
||||
* @details
|
||||
* Generated on: 2022-12-01 17:07:27
|
||||
* Generated on: 2023-01-23 11:30:32
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -89,6 +89,7 @@ const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
||||
const char *STORE_ERROR_STRING = "STORE_ERROR";
|
||||
const char *MSG_QUEUE_ERROR_STRING = "MSG_QUEUE_ERROR";
|
||||
const char *SERIALIZATION_ERROR_STRING = "SERIALIZATION_ERROR";
|
||||
const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION";
|
||||
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
|
||||
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
|
||||
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
|
||||
@ -411,6 +412,8 @@ const char *translateEvents(Event event) {
|
||||
return MSG_QUEUE_ERROR_STRING;
|
||||
case (10802):
|
||||
return SERIALIZATION_ERROR_STRING;
|
||||
case (11200):
|
||||
return SAFE_RATE_VIOLATION_STRING;
|
||||
case (11300):
|
||||
return SWITCH_CMD_SENT_STRING;
|
||||
case (11301):
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 148 translations.
|
||||
* Generated on: 2022-12-01 17:07:27
|
||||
* Contains 151 translations.
|
||||
* Generated on: 2023-01-23 11:30:32
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -92,8 +92,10 @@ const char *I2C_COM_IF_STRING = "I2C_COM_IF";
|
||||
const char *CSP_COM_IF_STRING = "CSP_COM_IF";
|
||||
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
|
||||
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
|
||||
const char *TMTC_BRIDGE_STRING = "TMTC_BRIDGE";
|
||||
const char *TMTC_POLLING_TASK_STRING = "TMTC_POLLING_TASK";
|
||||
const char *TCP_TMTC_SERVER_STRING = "TCP_TMTC_SERVER";
|
||||
const char *UDP_TMTC_SERVER_STRING = "UDP_TMTC_SERVER";
|
||||
const char *TCP_TMTC_POLLING_TASK_STRING = "TCP_TMTC_POLLING_TASK";
|
||||
const char *UDP_TMTC_POLLING_TASK_STRING = "UDP_TMTC_POLLING_TASK";
|
||||
const char *FILE_SYSTEM_HANDLER_STRING = "FILE_SYSTEM_HANDLER";
|
||||
const char *SDC_MANAGER_STRING = "SDC_MANAGER";
|
||||
const char *PTME_STRING = "PTME";
|
||||
@ -152,6 +154,7 @@ const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR";
|
||||
const char *EIVE_SYSTEM_STRING = "EIVE_SYSTEM";
|
||||
const char *ACS_SUBSYSTEM_STRING = "ACS_SUBSYSTEM";
|
||||
const char *PL_SUBSYSTEM_STRING = "PL_SUBSYSTEM";
|
||||
const char *TCS_SUBSYSTEM_STRING = "TCS_SUBSYSTEM";
|
||||
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
||||
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
||||
|
||||
@ -330,9 +333,13 @@ const char *translateObject(object_id_t object) {
|
||||
case 0x50000200:
|
||||
return PUS_PACKET_DISTRIBUTOR_STRING;
|
||||
case 0x50000300:
|
||||
return TMTC_BRIDGE_STRING;
|
||||
return TCP_TMTC_SERVER_STRING;
|
||||
case 0x50000301:
|
||||
return UDP_TMTC_SERVER_STRING;
|
||||
case 0x50000400:
|
||||
return TMTC_POLLING_TASK_STRING;
|
||||
return TCP_TMTC_POLLING_TASK_STRING;
|
||||
case 0x50000401:
|
||||
return UDP_TMTC_POLLING_TASK_STRING;
|
||||
case 0x50000500:
|
||||
return FILE_SYSTEM_HANDLER_STRING;
|
||||
case 0x50000550:
|
||||
@ -449,6 +456,8 @@ const char *translateObject(object_id_t object) {
|
||||
return ACS_SUBSYSTEM_STRING;
|
||||
case 0x73010002:
|
||||
return PL_SUBSYSTEM_STRING;
|
||||
case 0x73010003:
|
||||
return TCS_SUBSYSTEM_STRING;
|
||||
case 0x73500000:
|
||||
return CCSDS_IP_CORE_BRIDGE_STRING;
|
||||
case 0xFFFFFFFF:
|
||||
|
@ -9,8 +9,12 @@ PdecConfig::~PdecConfig() {}
|
||||
void PdecConfig::initialize() {
|
||||
uint32_t word = 0;
|
||||
word |= (VERSION_ID << 30);
|
||||
|
||||
// Setting the bypass flag and the control command flag should not have any
|
||||
// implication on the operation of the PDEC IP Core
|
||||
word |= (BYPASS_FLAG << 29);
|
||||
word |= (CONTROL_COMMAND_FLAG << 28);
|
||||
|
||||
word |= (RESERVED_FIELD_A << 26);
|
||||
word |= (SPACECRAFT_ID << 16);
|
||||
word |= (VIRTUAL_CHANNEL << 10);
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "PdecConfig.h"
|
||||
#include "eive/definitions.h"
|
||||
#include "fsfw/action/ActionHelper.h"
|
||||
#include "fsfw/action/HasActionsIF.h"
|
||||
#include "fsfw/objectmanager/SystemObject.h"
|
||||
@ -120,7 +121,7 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc
|
||||
//! Invalid BC control command
|
||||
static const ReturnValue_t INVALID_BC_CC = MAKE_RETURN_CODE(0xAE);
|
||||
|
||||
static const uint32_t QUEUE_SIZE = common::CCSDS_HANDLER_QUEUE_SIZE;
|
||||
static const uint32_t QUEUE_SIZE = config::CCSDS_HANDLER_QUEUE_SIZE;
|
||||
|
||||
// Action IDs
|
||||
static const ActionId_t PRINT_CLCW = 0;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "PtmeConfig.h"
|
||||
#include "eive/definitions.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
|
||||
Ptme::Ptme(object_id_t objectId) : SystemObject(objectId) {}
|
||||
@ -32,7 +33,7 @@ ReturnValue_t Ptme::writeToVc(uint8_t vcId, const uint8_t* data, size_t size) {
|
||||
}
|
||||
|
||||
void Ptme::addVcInterface(VcId_t vcId, VcInterfaceIF* vc) {
|
||||
if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) {
|
||||
if (vcId > config::NUMBER_OF_VIRTUAL_CHANNELS) {
|
||||
sif::warning << "Ptme::addVcInterface: Invalid virtual channel ID" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user