decode temperature based on sensor type

This commit is contained in:
Matthew Kennedy 2023-02-15 10:24:30 -08:00
parent 62520aee78
commit ab84b694b6
1 changed files with 10 additions and 1 deletions

View File

@ -126,7 +126,16 @@ float GetSensorTemperature(int ch)
return 0;
}
return interpolate2d(esr, lsu49TempBins, lsu49TempValues);
switch (GetSensorType()) {
case SensorType::LSU49:
return interpolate2d(esr, lsu49TempBins, lsu49TempValues);
case SensorType::LSU42:
return interpolate2d(esr, lsu42TempBins, lsu42TempValues);
case SensorType::LSUADV:
return interpolate2d(esr, lsuAdvTempBins, lsuAdvTempValues);
}
return 0;
}
float GetNernstDc(int ch)