Commit 053dd804 authored by Simone's avatar Simone

Update temperature.cpp

parent 933e0d4d
...@@ -957,7 +957,7 @@ static void updateTemperaturesFromRawValues() { ...@@ -957,7 +957,7 @@ static void updateTemperaturesFromRawValues() {
// Convert raw Power Consumption to watt // Convert raw Power Consumption to watt
float analog2power() { float analog2power() {
return ((((((5.0 / (1023.0 * OVERSAMPLENR)) * current_raw_powconsumption - 2.5) / POWER_SENSITIVITY) * POWER_VOLTAGE) * 100) / float(POWER_EFFICIENCY)); return (((((5.0 * current_raw_powconsumption) / (1023.0 * OVERSAMPLENR)) - 2.5) * (POWER_VOLTAGE * 100.0)) / (POWER_SENSITIVITY * POWER_EFFICIENCY));
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment