bugfix for some negative temperature conversions
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2022-06-10 10:39:43 +02:00
parent f72dfa255d
commit 17d17dce06
17 changed files with 65 additions and 47 deletions

View File

@ -163,10 +163,10 @@ ReturnValue_t ThermalController::initializeLocalDataPool(localpool::DataPool& lo
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_STAR_TRACKER,
new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_SYRLINKS_POWER_AMPLIFIER,
new PoolEntry<uint16_t>({0}));
new PoolEntry<float>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_SYRLINKS_BASEBAND_BOARD,
new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_MGT, new PoolEntry<uint16_t>({0}));
new PoolEntry<float>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_MGT, new PoolEntry<int16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_ACU, new PoolEntry<float>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_PDU1, new PoolEntry<float>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_PDU2, new PoolEntry<float>({0}));
@ -645,8 +645,8 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<uint16_t> tempSyrlinksPowerAmplifier =
lp_var_t<uint16_t>(objects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_POWER_AMPLIFIER);
lp_var_t<float> tempSyrlinksPowerAmplifier =
lp_var_t<float>(objects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_POWER_AMPLIFIER);
result = tempSyrlinksPowerAmplifier.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read syrlinks power amplifier temperature" << std::endl;
@ -661,8 +661,8 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<uint16_t> tempSyrlinksBasebandBoard =
lp_var_t<uint16_t>(objects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_BASEBAND_BOARD);
lp_var_t<float> tempSyrlinksBasebandBoard =
lp_var_t<float>(objects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_BASEBAND_BOARD);
result = tempSyrlinksBasebandBoard.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read syrlinks baseband board temperature" << std::endl;
@ -677,13 +677,13 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<uint16_t> tempMgt =
lp_var_t<uint16_t>(objects::IMTQ_HANDLER, IMTQ::MCU_TEMPERATURE);
lp_var_t<int16_t> tempMgt =
lp_var_t<int16_t>(objects::IMTQ_HANDLER, IMTQ::MCU_TEMPERATURE);
result = tempMgt.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read MGT temperature" << std::endl;
deviceTemperatures.mgt.setValid(false);
deviceTemperatures.mgt = static_cast<float>(INVALID_TEMPERATURE);
deviceTemperatures.mgt = static_cast<int16_t>(INVALID_TEMPERATURE);
}
else {
deviceTemperatures.mgt.setValid(tempMgt.isValid());

View File

@ -136,11 +136,11 @@ class DeviceTemperatures : public StaticLocalDataSet<ENTRIES_DEVICE_TEMPERATURE_
lp_var_t<int32_t> rw3 = lp_var_t<int32_t>(sid.objectId, PoolIds::TEMP_RW3, this);
lp_var_t<int32_t> rw4 = lp_var_t<int32_t>(sid.objectId, PoolIds::TEMP_RW4, this);
lp_var_t<float> startracker = lp_var_t<float>(sid.objectId, PoolIds::TEMP_STAR_TRACKER, this);
lp_var_t<uint16_t> syrlinksPowerAmplifier =
lp_var_t<uint16_t>(sid.objectId, PoolIds::TEMP_SYRLINKS_POWER_AMPLIFIER, this);
lp_var_t<uint16_t> syrlinksBasebandBoard =
lp_var_t<uint16_t>(sid.objectId, PoolIds::TEMP_SYRLINKS_BASEBAND_BOARD, this);
lp_var_t<uint16_t> mgt = lp_var_t<uint16_t>(sid.objectId, PoolIds::TEMP_MGT, this);
lp_var_t<float> syrlinksPowerAmplifier =
lp_var_t<float>(sid.objectId, PoolIds::TEMP_SYRLINKS_POWER_AMPLIFIER, this);
lp_var_t<float> syrlinksBasebandBoard =
lp_var_t<float>(sid.objectId, PoolIds::TEMP_SYRLINKS_BASEBAND_BOARD, this);
lp_var_t<int16_t> mgt = lp_var_t<int16_t>(sid.objectId, PoolIds::TEMP_MGT, this);
lp_vec_t<float, 3> acu = lp_vec_t<float, 3>(sid.objectId, PoolIds::TEMP_ACU, this);
lp_var_t<float> pdu1 = lp_var_t<float>(sid.objectId, PoolIds::TEMP_PDU1, this);
lp_var_t<float> pdu2 = lp_var_t<float>(sid.objectId, PoolIds::TEMP_PDU2, this);