use memset to set invalid temperatures of cau

This commit is contained in:
Jakob Meier 2022-06-04 09:31:34 +02:00
parent 6c32ddf864
commit 67037e2dae
2 changed files with 3 additions and 4 deletions

View File

@ -699,9 +699,8 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read ACU temperatures" << std::endl;
deviceTemperatures.acu.setValid(false);
deviceTemperatures.acu[0] = static_cast<float>(INVALID_TEMPERATURE);
deviceTemperatures.acu[1] = static_cast<float>(INVALID_TEMPERATURE);
deviceTemperatures.acu[2] = static_cast<float>(INVALID_TEMPERATURE);
std::memset(deviceTemperatures.acu.value, INVALID_TEMPERATURE,
deviceTemperatures.acu.getSize());
}
else {
deviceTemperatures.acu.setValid(tempAcu.isValid());

2
tmtc

@ -1 +1 @@
Subproject commit e2de2e0212d5af87b111e6176f3b9f20b56081df
Subproject commit 46be9fa0923f2a6a54f49f4cf6fe045361321646