TCS continued #576

Merged
muellerr merged 19 commits from continue_tcs_tests into develop 2023-04-13 18:10:35 +02:00
3 changed files with 18 additions and 2 deletions
Showing only changes of commit 7a53ada4b4 - Show all commits

View File

@ -54,22 +54,38 @@ ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
}
case (TestCase::COOL_HPA): {
if (cycles == 15) {
sif::debug << "Setting cold HPA temperature" << std::endl;
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(-60, true);
}
if (cycles == 30) {
sif::debug << "Setting HPA temperature back to normal" << std::endl;
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(0, true);
}
break;
}
case (TestCase::COOL_MGT): {
if (cycles == 15) {
sif::debug << "Setting cold MGT temperature" << std::endl;
max31865DummyMap[objects::RTD_15_IC18_IMTQ]->setTemperature(-60, true);
}
if (cycles == 30) {
sif::debug << "Setting MGT temperature back to normal" << std::endl;
max31865DummyMap[objects::RTD_15_IC18_IMTQ]->setTemperature(0, true);
}
break;
}
case(TestCase::COOL_STR): {
if (cycles == 15) {
sif::debug << "Setting cold STR temperature" << std::endl;
max31865DummyMap[objects::RTD_4_IC7_STARTRACKER]->setTemperature(-40, true);
}
if (cycles == 30) {
sif::debug << "Setting STR temperature back to normal" << std::endl;
max31865DummyMap[objects::RTD_4_IC7_STARTRACKER]->setTemperature(0, true);
}
break;
}
}
cycles++;
return returnvalue::OK;

View File

@ -24,7 +24,7 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
Max31865DummyMap max31865DummyMap;
Tmp1075DummyMap tmp1075DummyMap;
enum TestCase { NONE = 0, COOL_SYRLINKS = 1, COOL_HPA = 2, COOL_MGT = 3 };
enum TestCase { NONE = 0, COOL_SYRLINKS = 1, COOL_HPA = 2, COOL_MGT = 3, COOL_STR = 4 };
int iteration = 0;
uint32_t cycles = 0;
bool tempsWereInitialized = false;

View File

@ -1718,8 +1718,8 @@ void ThermalController::resetSensorsArray() {
}
thermalComponent = NONE;
}
void ThermalController::heaterTransitionControl(const HeaterSwitchStates& currentHeaterStates) {
// TODO: Test
for (unsigned i = 0; i < 7; i++) {
if (heaterStates[i].switchTransition) {
if (currentHeaterStates[i] == heaterStates[i].target) {