formatting

This commit is contained in:
proddy
2026-09-27 10:34:55 +02:00
parent 960a7a554e
commit 8a48eb75d2
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -406,7 +406,8 @@ void AnalogSensor::measure() {
sensor.sum_ = (sensor.sum_ * 15 + a * 16) / 16;
sensor.analog_ = sensor.sum_ / 16;
}
if (sensor.analog_ > 0 && sensor.analog_ < NTC_VREF_MV && (sensor.last_reading_ + 1 < sensor.analog_ || sensor.last_reading_ > sensor.analog_ + 1)) {
if (sensor.analog_ > 0 && sensor.analog_ < NTC_VREF_MV
&& (sensor.last_reading_ + 1 < sensor.analog_ || sensor.last_reading_ > sensor.analog_ + 1)) {
sensor.set_value(sensor.offset() + 1 / (1 / T25 + log((double)sensor.analog_ / (NTC_VREF_MV - sensor.analog_) * (Rt / R0)) / Beta)
- T0); // Temperature in Celsius
sensor.last_reading_ = sensor.analog_;
+2 -1
View File
@@ -967,7 +967,8 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
uart_telegram({0x10, 0x08, 0xFF, 0x00, 0x03, 0x8A, 0x01});
uart_telegram({0x08, 0x00, 0xFF, 0x00, 0x03, 0x8A, 0x01, 0x50, 0x01, 0x0C, 0x00, 0x00, 0x0A, 0x00, 0x1E, 0x00, 0x00, 0x01, 0x00, 0x04});
// HPValve, byte 0 bit 6 = pool heating active
uart_telegram({0x08, 0x00, 0xFF, 0x00, 0x03, 0x88, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00});
uart_telegram({0x08, 0x00, 0xFF, 0x00, 0x03, 0x88, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00});
// heatpump -> MP100 shunt setpoint 0%
uart_telegram({0x08, 0x11, 0xFF, 0x00, 0x04, 0xC4, 0x00});
// MP100 -> heatpump: 32.5 C, shunt 45%, pool request active