changed gomspace temperatures to float
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Jakob Meier
2022-06-03 09:33:08 +02:00
12 changed files with 81 additions and 71 deletions

View File

@ -149,13 +149,13 @@ ReturnValue_t ThermalController::initializeLocalDataPool(localpool::DataPool& lo
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_Q7S, new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(thermalControllerDefinitions::BATTERY_TEMP_1,
new PoolEntry<float>({0.0}));
new PoolEntry<int16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::BATTERY_TEMP_2,
new PoolEntry<float>({0.0}));
new PoolEntry<int16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::BATTERY_TEMP_3,
new PoolEntry<float>({0.0}));
new PoolEntry<int16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::BATTERY_TEMP_4,
new PoolEntry<float>({0.0}));
new PoolEntry<int16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_RW1, new PoolEntry<int32_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_RW2, new PoolEntry<int32_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_RW3, new PoolEntry<int32_t>({0}));
@ -163,17 +163,17 @@ 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<float>({0.0}));
new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_SYRLINKS_BASEBAND_BOARD,
new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_MGT, new PoolEntry<float>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_ACU, new PoolEntry<int16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_PDU1, new PoolEntry<int16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_PDU2, new PoolEntry<int16_t>({0}));
new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_MGT, new PoolEntry<uint16_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}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_1_P60DOCK,
new PoolEntry<int16_t>({0}));
new PoolEntry<float>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_2_P60DOCK,
new PoolEntry<int16_t>({0}));
new PoolEntry<float>({0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_GYRO_0_SIDE_A,
new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_GYRO_1_SIDE_A,
@ -202,6 +202,8 @@ LocalPoolDataSetBase* ThermalController::getDataSetHandle(sid_t sid) {
return &sensorTemperatures;
case thermalControllerDefinitions::SUS_TEMPERATURES:
return &susTemperatures;
case thermalControllerDefinitions::DEVICE_TEMPERATURES:
return &deviceTemperatures;
default:
return nullptr;
}
@ -507,8 +509,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> battTemp1 = lp_var_t<float>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_1);
lp_var_t<int16_t> battTemp1 = lp_var_t<int16_t>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_1);
result = battTemp1.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read battery temperature 1" << std::endl;
@ -523,7 +524,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> battTemp2 = lp_var_t<float>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_2);
lp_var_t<int16_t> battTemp2 = lp_var_t<int16_t>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_2);
result = battTemp2.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read battery temperature 2" << std::endl;
@ -538,7 +539,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> battTemp3 = lp_var_t<float>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_3);
lp_var_t<int16_t> battTemp3 = lp_var_t<int16_t>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_3);
result = battTemp3.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read battery temperature 3" << std::endl;
@ -553,7 +554,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> battTemp4 = lp_var_t<float>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_4);
lp_var_t<int16_t> battTemp4 = lp_var_t<int16_t>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_4);
result = battTemp4.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read battery temperature 4" << std::endl;
@ -644,8 +645,8 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempSyrlinksPowerAmplifier =
lp_var_t<float>(objects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_POWER_AMPLIFIER);
lp_var_t<uint16_t> tempSyrlinksPowerAmplifier =
lp_var_t<uint16_t>(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;
@ -660,8 +661,8 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempSyrlinksBasebandBoard =
lp_var_t<float>(objects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_BASEBAND_BOARD);
lp_var_t<uint16_t> tempSyrlinksBasebandBoard =
lp_var_t<uint16_t>(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;
@ -676,8 +677,8 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempMgt =
lp_var_t<float>(objects::IMTQ_HANDLER, IMTQ::MCU_TEMPERATURE);
lp_var_t<uint16_t> tempMgt =
lp_var_t<uint16_t>(objects::IMTQ_HANDLER, IMTQ::MCU_TEMPERATURE);
result = tempMgt.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read MGT temperature" << std::endl;
@ -692,8 +693,8 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_vec_t<int16_t, 3> tempAcu =
lp_vec_t<int16_t, 3>(objects::ACU_HANDLER, P60System::pool::ACU_TEMPERATURES);
lp_vec_t<float, 3> tempAcu =
lp_vec_t<float, 3>(objects::ACU_HANDLER, P60System::pool::ACU_TEMPERATURES);
result = tempAcu.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read ACU temperatures" << std::endl;
@ -710,13 +711,13 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int16_t> tempPdu1 =
lp_var_t<int16_t>(objects::PDU1_HANDLER, P60System::pool::PDU_TEMPERATURE);
lp_var_t<float> tempPdu1 =
lp_var_t<float>(objects::PDU1_HANDLER, P60System::pool::PDU_TEMPERATURE);
result = tempPdu1.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read PDU1 temperature" << std::endl;
deviceTemperatures.pdu1.setValid(false);
deviceTemperatures.pdu1 = static_cast<int16_t>(INVALID_TEMPERATURE);
deviceTemperatures.pdu1 = static_cast<float>(INVALID_TEMPERATURE);
}
else {
deviceTemperatures.pdu1.setValid(tempPdu1.isValid());
@ -726,13 +727,13 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int16_t> tempPdu2 =
lp_var_t<int16_t>(objects::PDU2_HANDLER, P60System::pool::PDU_TEMPERATURE);
lp_var_t<float> tempPdu2 =
lp_var_t<float>(objects::PDU2_HANDLER, P60System::pool::PDU_TEMPERATURE);
result = tempPdu2.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read PDU2 temperature" << std::endl;
deviceTemperatures.pdu2.setValid(false);
deviceTemperatures.pdu2 = static_cast<int16_t>(INVALID_TEMPERATURE);
deviceTemperatures.pdu2 = static_cast<float>(INVALID_TEMPERATURE);
}
else {
deviceTemperatures.pdu2.setValid(tempPdu1.isValid());
@ -742,13 +743,13 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int16_t> temp1P60dock =
lp_var_t<int16_t>(objects::P60DOCK_HANDLER, P60System::pool::P60DOCK_TEMPERATURE_1);
lp_var_t<float> temp1P60dock =
lp_var_t<float>(objects::P60DOCK_HANDLER, P60System::pool::P60DOCK_TEMPERATURE_1);
result = temp1P60dock.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read P60 dock temperature 1" << std::endl;
deviceTemperatures.temp1P60dock.setValid(false);
deviceTemperatures.temp1P60dock = static_cast<int16_t>(INVALID_TEMPERATURE);
deviceTemperatures.temp1P60dock = static_cast<float>(INVALID_TEMPERATURE);
}
else {
deviceTemperatures.temp1P60dock.setValid(temp1P60dock.isValid());
@ -758,13 +759,13 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int16_t> temp2P60dock =
lp_var_t<int16_t>(objects::P60DOCK_HANDLER, P60System::pool::P60DOCK_TEMPERATURE_2);
lp_var_t<float> temp2P60dock =
lp_var_t<float>(objects::P60DOCK_HANDLER, P60System::pool::P60DOCK_TEMPERATURE_2);
result = temp2P60dock.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read P60 dock temperature 2" << std::endl;
deviceTemperatures.temp2P60dock.setValid(false);
deviceTemperatures.temp2P60dock = static_cast<int16_t>(INVALID_TEMPERATURE);
deviceTemperatures.temp2P60dock = static_cast<float>(INVALID_TEMPERATURE);
}
else {
deviceTemperatures.temp2P60dock.setValid(temp2P60dock.isValid());