tmp is back in the house
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
31fdbac8c0
commit
d6dd943ebf
@ -151,23 +151,16 @@ void Factory::setStaticFrameworkObjectIds() {
|
|||||||
|
|
||||||
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
|
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
|
||||||
|
|
||||||
void ObjectFactory::createTmpComponents() {
|
void ObjectFactory::createTmpComponents(
|
||||||
std::vector<std::pair<object_id_t, address_t>> tmpDevIds = {{
|
std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd) {
|
||||||
{objects::TMP1075_HANDLER_TCS_0, addresses::TMP1075_TCS_0},
|
|
||||||
{objects::TMP1075_HANDLER_TCS_1, addresses::TMP1075_TCS_1},
|
|
||||||
{objects::TMP1075_HANDLER_PLPCDU_0, addresses::TMP1075_PLPCDU_0},
|
|
||||||
// damaged
|
|
||||||
// {objects::TMP1075_HANDLER_PLPCDU_1, addresses::TMP1075_PLPCDU_1},
|
|
||||||
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
|
|
||||||
}};
|
|
||||||
std::vector<I2cCookie*> tmpDevCookies;
|
std::vector<I2cCookie*> tmpDevCookies;
|
||||||
|
|
||||||
for (size_t idx = 0; idx < tmpDevIds.size(); idx++) {
|
for (size_t idx = 0; idx < tmpDevsToAdd.size(); idx++) {
|
||||||
tmpDevCookies.push_back(
|
tmpDevCookies.push_back(
|
||||||
new I2cCookie(tmpDevIds[idx].second, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_PL_EIVE));
|
new I2cCookie(tmpDevsToAdd[idx].second, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_PL_EIVE));
|
||||||
auto* tmpDevHandler =
|
auto* tmpDevHandler =
|
||||||
new Tmp1075Handler(tmpDevIds[idx].first, objects::I2C_COM_IF, tmpDevCookies[idx]);
|
new Tmp1075Handler(tmpDevsToAdd[idx].first, objects::I2C_COM_IF, tmpDevCookies[idx]);
|
||||||
tmpDevHandler->setCustomFdir(new TmpDevFdir(tmpDevIds[idx].first));
|
tmpDevHandler->setCustomFdir(new TmpDevFdir(tmpDevsToAdd[idx].first));
|
||||||
tmpDevHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
tmpDevHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
||||||
// TODO: Remove this after TCS subsystem was added
|
// TODO: Remove this after TCS subsystem was added
|
||||||
// These devices are connected to the 3V3 stack and should be powered permanently. Therefore,
|
// These devices are connected to the 3V3 stack and should be powered permanently. Therefore,
|
||||||
|
@ -58,7 +58,7 @@ void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher
|
|||||||
bool enableHkSets);
|
bool enableHkSets);
|
||||||
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||||
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
|
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
|
||||||
void createTmpComponents();
|
void createTmpComponents(std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd);
|
||||||
void createRadSensorChipSelect(LinuxLibgpioIF* gpioIF);
|
void createRadSensorChipSelect(LinuxLibgpioIF* gpioIF);
|
||||||
ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler);
|
ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler);
|
||||||
void createAcsBoardGpios(GpioCookie& cookie);
|
void createAcsBoardGpios(GpioCookie& cookie);
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "mission/pollingSeqTables.h"
|
#include "mission/pollingSeqTables.h"
|
||||||
#include "mission/scheduling.h"
|
#include "mission/scheduling.h"
|
||||||
#include "mission/utility/InitMission.h"
|
#include "mission/utility/InitMission.h"
|
||||||
|
#include "q7sConfig.h"
|
||||||
|
|
||||||
/* This is configured for linux without CR */
|
/* This is configured for linux without CR */
|
||||||
#ifdef PLATFORM_UNIX
|
#ifdef PLATFORM_UNIX
|
||||||
@ -527,7 +528,15 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
|
|||||||
FixedTimeslotTaskIF* i2cPst =
|
FixedTimeslotTaskIF* i2cPst =
|
||||||
factory.createFixedTimeslotTask("I2C_PS_PST", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.6,
|
factory.createFixedTimeslotTask("I2C_PS_PST", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.6,
|
||||||
missedDeadlineFunc, &RR_SCHEDULING);
|
missedDeadlineFunc, &RR_SCHEDULING);
|
||||||
result = pst::pstI2cProcessingSystem(i2cPst);
|
pst::TmpSchedConfig tmpSchedConf;
|
||||||
|
#if OBSW_Q7S_EM == 1
|
||||||
|
tmpSchedConf.scheduleTmpDev0 = false;
|
||||||
|
tmpSchedConf.scheduleTmpDev1 = false;
|
||||||
|
tmpSchedConf.schedulePlPcduDev0 = true;
|
||||||
|
tmpSchedConf.schedulePlPcduDev1 = true;
|
||||||
|
tmpSchedConf.scheduleIfBoardDev = true;
|
||||||
|
#endif
|
||||||
|
result = pst::pstProgammableLogicI2c(tmpSchedConf, i2cPst);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "scheduling::initTasks: I2C PST is empty" << std::endl;
|
sif::warning << "scheduling::initTasks: I2C PST is empty" << std::endl;
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "bsp_q7s/core/CoreController.h"
|
#include "bsp_q7s/core/CoreController.h"
|
||||||
#include "bsp_q7s/core/ObjectFactory.h"
|
#include "bsp_q7s/core/ObjectFactory.h"
|
||||||
#include "busConf.h"
|
#include "busConf.h"
|
||||||
|
#include "common/config/devices/addresses.h"
|
||||||
#include "devConf.h"
|
#include "devConf.h"
|
||||||
#include "dummies/helperFactory.h"
|
#include "dummies/helperFactory.h"
|
||||||
#include "eive/objects.h"
|
#include "eive/objects.h"
|
||||||
@ -60,6 +61,14 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
|
||||||
dummyCfg.addPlocDummies = false;
|
dummyCfg.addPlocDummies = false;
|
||||||
#endif
|
#endif
|
||||||
|
#if OBSW_ADD_TMP_DEVICES == 1
|
||||||
|
std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd = {{
|
||||||
|
{objects::TMP1075_HANDLER_PLPCDU_0, addresses::TMP1075_PLPCDU_0},
|
||||||
|
{objects::TMP1075_HANDLER_PLPCDU_1, addresses::TMP1075_PLPCDU_1},
|
||||||
|
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
|
||||||
|
}};
|
||||||
|
createTmpComponents(tmpDevsToAdd);
|
||||||
|
#endif
|
||||||
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||||
dummyCfg.addPowerDummies = false;
|
dummyCfg.addPowerDummies = false;
|
||||||
// The ACU broke.
|
// The ACU broke.
|
||||||
|
@ -67,7 +67,15 @@ void ObjectFactory::produce(void* args) {
|
|||||||
HeaterHandler* heaterHandler;
|
HeaterHandler* heaterHandler;
|
||||||
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
||||||
#if OBSW_ADD_TMP_DEVICES == 1
|
#if OBSW_ADD_TMP_DEVICES == 1
|
||||||
createTmpComponents();
|
std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd = {{
|
||||||
|
{objects::TMP1075_HANDLER_TCS_0, addresses::TMP1075_TCS_0},
|
||||||
|
{objects::TMP1075_HANDLER_TCS_1, addresses::TMP1075_TCS_1},
|
||||||
|
{objects::TMP1075_HANDLER_PLPCDU_0, addresses::TMP1075_PLPCDU_0},
|
||||||
|
// damaged
|
||||||
|
// {objects::TMP1075_HANDLER_PLPCDU_1, addresses::TMP1075_PLPCDU_1},
|
||||||
|
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
|
||||||
|
}};
|
||||||
|
createTmpComponents(tmpDevsToAdd);
|
||||||
#endif
|
#endif
|
||||||
createSolarArrayDeploymentComponents(*pwrSwitcher, *gpioComIF);
|
createSolarArrayDeploymentComponents(*pwrSwitcher, *gpioComIF);
|
||||||
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher, *stackHandler);
|
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher, *stackHandler);
|
||||||
|
@ -39,26 +39,33 @@ ReturnValue_t pst::pstSyrlinks(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
|
|
||||||
// I don't think this needs to be in a PST because linux takes care of bus serialization, but
|
// I don't think this needs to be in a PST because linux takes care of bus serialization, but
|
||||||
// keep it like this for now, it works
|
// keep it like this for now, it works
|
||||||
ReturnValue_t pst::pstI2cProcessingSystem(FixedTimeslotTaskIF *thisSequence) {
|
ReturnValue_t pst::pstProgammableLogicI2c(TmpSchedConfig schedConf,
|
||||||
|
FixedTimeslotTaskIF *thisSequence) {
|
||||||
// Length of a communication cycle
|
// Length of a communication cycle
|
||||||
uint32_t length = thisSequence->getPeriodMs();
|
uint32_t length = thisSequence->getPeriodMs();
|
||||||
static_cast<void>(length);
|
static_cast<void>(length);
|
||||||
|
|
||||||
// These are actually part of another bus, but this works, so keep it like this for now
|
if (schedConf.scheduleTmpDev0) {
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2, DeviceHandlerIF::GET_WRITE);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.2, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.3, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.3, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.3, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_0, length * 0.3, DeviceHandlerIF::GET_READ);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (schedConf.scheduleTmpDev1) {
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4, DeviceHandlerIF::SEND_WRITE);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_TCS_1, length * 0.5, DeviceHandlerIF::GET_READ);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (schedConf.schedulePlPcduDev0) {
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.6,
|
||||||
@ -67,9 +74,10 @@ ReturnValue_t pst::pstI2cProcessingSystem(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.7,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.7,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.7, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_0, length * 0.7,
|
||||||
// damaged
|
DeviceHandlerIF::GET_READ);
|
||||||
/*
|
}
|
||||||
|
if (schedConf.schedulePlPcduDev1) {
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_1, length * 0.4,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_1, length * 0.4,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_1, length * 0.4,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_1, length * 0.4,
|
||||||
@ -78,8 +86,11 @@ ReturnValue_t pst::pstI2cProcessingSystem(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_1, length * 0.4,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_1, length * 0.4,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_1, length * 0.4, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_PLPCDU_1, length * 0.4,
|
||||||
*/
|
DeviceHandlerIF::GET_READ);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (schedConf.scheduleIfBoardDev) {
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.8,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.8,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.8,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.8,
|
||||||
@ -88,7 +99,9 @@ ReturnValue_t pst::pstI2cProcessingSystem(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.9,
|
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.9,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.9, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::TMP1075_HANDLER_IF_BOARD, length * 0.9,
|
||||||
|
DeviceHandlerIF::GET_READ);
|
||||||
|
}
|
||||||
static_cast<void>(length);
|
static_cast<void>(length);
|
||||||
return thisSequence->checkSequence();
|
return thisSequence->checkSequence();
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,16 @@ struct AcsPstCfg {
|
|||||||
bool scheduleStr = true;
|
bool scheduleStr = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Default config is for FM.
|
||||||
|
struct TmpSchedConfig {
|
||||||
|
bool scheduleTmpDev0 = true;
|
||||||
|
bool scheduleTmpDev1 = true;
|
||||||
|
bool schedulePlPcduDev0 = true;
|
||||||
|
// damaged on FM
|
||||||
|
bool schedulePlPcduDev1 = false;
|
||||||
|
bool scheduleIfBoardDev = true;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function creates the PST for all gomspace devices.
|
* @brief This function creates the PST for all gomspace devices.
|
||||||
* @details
|
* @details
|
||||||
@ -51,7 +61,7 @@ ReturnValue_t pstSyrlinks(FixedTimeslotTaskIF* thisSequence);
|
|||||||
|
|
||||||
ReturnValue_t pstTcsAndAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg);
|
ReturnValue_t pstTcsAndAcs(FixedTimeslotTaskIF* thisSequence, AcsPstCfg cfg);
|
||||||
|
|
||||||
ReturnValue_t pstI2cProcessingSystem(FixedTimeslotTaskIF* thisSequence);
|
ReturnValue_t pstProgammableLogicI2c(TmpSchedConfig schedConf, FixedTimeslotTaskIF* thisSequence);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic test PST
|
* Generic test PST
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 936dcdf334c2258d2256373cd4995b2574202a59
|
Subproject commit 970c8998f0bb719ab4b289fa95406d7037b2bb35
|
Loading…
Reference in New Issue
Block a user