Swap PL and PS I2C #725
@ -530,8 +530,8 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
|
|||||||
missedDeadlineFunc, &RR_SCHEDULING);
|
missedDeadlineFunc, &RR_SCHEDULING);
|
||||||
pst::TmpSchedConfig tmpSchedConf;
|
pst::TmpSchedConfig tmpSchedConf;
|
||||||
#if OBSW_Q7S_EM == 1
|
#if OBSW_Q7S_EM == 1
|
||||||
tmpSchedConf.scheduleTmpDev0 = false;
|
tmpSchedConf.scheduleTmpDev0 = true;
|
||||||
tmpSchedConf.scheduleTmpDev1 = false;
|
tmpSchedConf.scheduleTmpDev1 = true;
|
||||||
tmpSchedConf.schedulePlPcduDev0 = true;
|
tmpSchedConf.schedulePlPcduDev0 = true;
|
||||||
tmpSchedConf.schedulePlPcduDev1 = true;
|
tmpSchedConf.schedulePlPcduDev1 = true;
|
||||||
tmpSchedConf.scheduleIfBoardDev = true;
|
tmpSchedConf.scheduleIfBoardDev = true;
|
||||||
|
@ -68,7 +68,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
|
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
|
||||||
}};
|
}};
|
||||||
createTmpComponents(tmpDevsToAdd);
|
createTmpComponents(tmpDevsToAdd);
|
||||||
dummy::Tmp1075Cfg tmpCfg {};
|
dummy::Tmp1075Cfg tmpCfg{};
|
||||||
tmpCfg.addTcsBrd0 = true;
|
tmpCfg.addTcsBrd0 = true;
|
||||||
tmpCfg.addTcsBrd1 = true;
|
tmpCfg.addTcsBrd1 = true;
|
||||||
tmpCfg.addPlPcdu0 = false;
|
tmpCfg.addPlPcdu0 = false;
|
||||||
|
@ -8,35 +8,46 @@ using namespace returnvalue;
|
|||||||
Tmp1075Dummy::Tmp1075Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
Tmp1075Dummy::Tmp1075Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie), set(this) {}
|
: DeviceHandlerBase(objectId, comif, comCookie), set(this) {}
|
||||||
|
|
||||||
void Tmp1075Dummy::doStartUp() { setMode(MODE_NORMAL); }
|
void Tmp1075Dummy::doStartUp() { setMode(MODE_ON); }
|
||||||
void Tmp1075Dummy::doShutDown() { setMode(MODE_OFF); }
|
void Tmp1075Dummy::doShutDown() { setMode(MODE_OFF); }
|
||||||
|
|
||||||
ReturnValue_t Tmp1075Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
ReturnValue_t Tmp1075Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||||
return NOTHING_TO_SEND;
|
return NOTHING_TO_SEND;
|
||||||
}
|
}
|
||||||
ReturnValue_t Tmp1075Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return OK; }
|
|
||||||
|
ReturnValue_t Tmp1075Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t Tmp1075Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t Tmp1075Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
return 0;
|
return NOTHING_TO_SEND;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Tmp1075Dummy::scanForReply(const uint8_t *start, size_t len,
|
ReturnValue_t Tmp1075Dummy::scanForReply(const uint8_t *start, size_t len,
|
||||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Tmp1075Dummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
ReturnValue_t Tmp1075Dummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tmp1075Dummy::setTemperature(float temperature, bool valid) {
|
void Tmp1075Dummy::setTemperature(float temperature, bool valid) {
|
||||||
PoolReadGuard pg(&set);
|
PoolReadGuard pg(&set);
|
||||||
set.temperatureCelcius.value = temperature;
|
set.temperatureCelcius.value = temperature;
|
||||||
set.setValidity(valid, true);
|
set.setValidity(valid, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tmp1075Dummy::fillCommandAndReplyMap() {}
|
void Tmp1075Dummy::fillCommandAndReplyMap() {}
|
||||||
|
|
||||||
uint32_t Tmp1075Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 1000; }
|
uint32_t Tmp1075Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 1000; }
|
||||||
|
|
||||||
ReturnValue_t Tmp1075Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t Tmp1075Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(TMP1075::TEMPERATURE_C_TMP1075, new PoolEntry<float>({10.0}, true));
|
localDataPoolMap.emplace(TMP1075::TEMPERATURE_C_TMP1075, new PoolEntry<float>({10.0}, true));
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalPoolDataSetBase *Tmp1075Dummy::getDataSetHandle(sid_t sid) { return &set; }
|
LocalPoolDataSetBase *Tmp1075Dummy::getDataSetHandle(sid_t sid) { return &set; }
|
||||||
|
@ -228,9 +228,8 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
|||||||
for (auto& rtd : rtdSensorDummies) {
|
for (auto& rtd : rtdSensorDummies) {
|
||||||
rtd.second->connectModeTreeParent(*tcsBoardAssy);
|
rtd.second->connectModeTreeParent(*tcsBoardAssy);
|
||||||
}
|
}
|
||||||
if(tmpSensorDummies.has_value()) {
|
if (tmpSensorDummies.has_value()) {
|
||||||
for (auto& tmp : tmpSensorDummies.value()) {
|
for (auto& tmp : tmpSensorDummies.value()) {
|
||||||
printf("Hello, connecting parent to %08x\n", tmp.second->getObjectId());
|
|
||||||
tmp.second->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
tmp.second->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,7 @@ Tmp1075Handler::Tmp1075Handler(object_id_t objectId, object_id_t comIF, CookieIF
|
|||||||
|
|
||||||
Tmp1075Handler::~Tmp1075Handler() {}
|
Tmp1075Handler::~Tmp1075Handler() {}
|
||||||
|
|
||||||
void Tmp1075Handler::doStartUp() {
|
void Tmp1075Handler::doStartUp() { setMode(MODE_ON); }
|
||||||
if (getMode() == _MODE_START_UP) {
|
|
||||||
setMode(MODE_ON);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Tmp1075Handler::doShutDown() {
|
void Tmp1075Handler::doShutDown() {
|
||||||
communicationStep = CommunicationStep::START_ADC_CONVERSION;
|
communicationStep = CommunicationStep::START_ADC_CONVERSION;
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 970c8998f0bb719ab4b289fa95406d7037b2bb35
|
Subproject commit b9038f1c86fb2b3cb9cae5be42fafd678e12de52
|
Loading…
Reference in New Issue
Block a user