add some stuff
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
parent
d447f4ba42
commit
58f1c93de5
@ -1,4 +0,0 @@
|
||||
//
|
||||
// Created by irini on 24.11.22.
|
||||
//
|
||||
#include "DummyHeaterHandler.h"
|
@ -1,13 +0,0 @@
|
||||
//
|
||||
// Created by irini on 24.11.22.
|
||||
//
|
||||
|
||||
#ifndef EIVE_OBSW_DUMMYHEATERHANDLER_H
|
||||
#define EIVE_OBSW_DUMMYHEATERHANDLER_H
|
||||
|
||||
#include "mission/devices/HeaterHandler.h"
|
||||
class DummyHeaterHandler : public HeaterHandler {
|
||||
public:
|
||||
// DummyHeaterHandler();
|
||||
};
|
||||
#endif // EIVE_OBSW_DUMMYHEATERHANDLER_H
|
@ -34,6 +34,11 @@ ReturnValue_t Max31865Dummy::initializeLocalDataPool(localpool::DataPool &localD
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0}));
|
||||
return OK;
|
||||
}
|
||||
|
||||
void Max31865Dummy::setTemperature(float temperature) {
|
||||
set.temperatureCelcius.value = temperature;
|
||||
}
|
||||
|
||||
LocalPoolDataSetBase *Max31865Dummy::getDataSetHandle(sid_t sid) { return &set; }
|
||||
Max31865Dummy::Max31865Dummy(object_id_t objectId, CookieIF *cookie)
|
||||
: DeviceHandlerBase(objectId, objects::DUMMY_COM_IF, cookie),
|
||||
|
@ -9,6 +9,7 @@ class Max31865Dummy : public DeviceHandlerBase {
|
||||
Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||
Max31865Dummy(object_id_t objectId, CookieIF *comCookie);
|
||||
|
||||
void setTemperature(float temperature);
|
||||
private:
|
||||
MAX31865::PrimarySet set;
|
||||
|
||||
|
@ -6,14 +6,14 @@
|
||||
#include <cstdlib>
|
||||
|
||||
TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId)
|
||||
: SystemObject(objects::THERMAL_TEMP_INSERTER),
|
||||
max31865PlocHeatspreaderSet(objects::RTD_0_IC3_PLOC_HEATSPREADER, MAX31865::MAX31865_SET_ID),
|
||||
max31865PlocMissionboardSet(objects::RTD_1_IC4_PLOC_MISSIONBOARD, MAX31865::MAX31865_SET_ID) {
|
||||
}
|
||||
: SystemObject(objects::THERMAL_TEMP_INSERTER) {}
|
||||
|
||||
ReturnValue_t TemperatureSensorInserter::initialize() {
|
||||
max31865PlocHeatspreaderSet.temperatureCelcius = 20.0;
|
||||
max31865PlocMissionboardSet.temperatureCelcius = 20.0;
|
||||
if (performTest) {
|
||||
if(testCase == TestCase::OVERCOOL_SYRLINKS) {
|
||||
|
||||
}
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
|
||||
iteration++;
|
||||
value = sin(iteration / 80. * M_PI) * 10;
|
||||
|
||||
/*
|
||||
ReturnValue_t result = max31865PlocHeatspreaderSet.read();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::warning << "Failed to read temperature from MAX31865 dataset" << std::endl;
|
||||
@ -33,5 +34,6 @@ ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
|
||||
max31865PlocHeatspreaderSet.setValidity(true, true);
|
||||
}
|
||||
max31865PlocHeatspreaderSet.commit();
|
||||
*/
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -13,10 +13,13 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
|
||||
ReturnValue_t performOperation(uint8_t opCode) override;
|
||||
|
||||
private:
|
||||
int iteration = 0;
|
||||
float value = 0;
|
||||
MAX31865::PrimarySet max31865PlocHeatspreaderSet;
|
||||
MAX31865::PrimarySet max31865PlocMissionboardSet;
|
||||
|
||||
enum TestCase {
|
||||
OVERCOOL_SYRLINKS = 0
|
||||
};
|
||||
int iteration = 0;
|
||||
bool performTest = false;
|
||||
float value = 0;
|
||||
TestCase testCase;
|
||||
// void noise();
|
||||
};
|
||||
|
@ -82,7 +82,9 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
|
||||
}
|
||||
|
||||
if (cfg.addTempSensorDummies) {
|
||||
new Max31865Dummy(objects::RTD_0_IC3_PLOC_HEATSPREADER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
|
||||
std::map<object_id_t, Max31865Dummy> tempSensorDummies;
|
||||
tempSensorDummies.emplace(objects::RTD_0_IC3_PLOC_HEATSPREADER, new Max31865Dummy(objects::RTD_0_IC3_PLOC_HEATSPREADER, objects::DUMMY_COM_IF, comCookieDummy));
|
||||
new Max31865Dummy(objects::RTD_1_IC4_PLOC_MISSIONBOARD, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new Max31865Dummy(objects::RTD_2_IC5_4K_CAMERA, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new Max31865Dummy(objects::RTD_3_IC6_DAC_HEATSPREADER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
@ -104,6 +106,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
|
||||
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_0, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_1, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
new Tmp1075Dummy(objects::TMP1075_HANDLER_IF_BOARD, objects::DUMMY_COM_IF, comCookieDummy);
|
||||
|
||||
new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER);
|
||||
}
|
||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::NO_SWITCH);
|
||||
|
Loading…
Reference in New Issue
Block a user