mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
round energy values to full kWh
This commit is contained in:
@@ -871,8 +871,8 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
}
|
||||
store_energy();
|
||||
// update/publish the values
|
||||
has_update(nrgHeat_, (uint32_t)nrgHeatF_);
|
||||
has_update(nrgWw_, (uint32_t)nrgWwF_);
|
||||
has_update(nrgHeat_, (uint32_t)(nrgHeatF_ + 0.5));
|
||||
has_update(nrgWw_, (uint32_t)(nrgWwF_ + 0.5));
|
||||
has_update(&nomPower_);
|
||||
}
|
||||
}
|
||||
@@ -942,8 +942,8 @@ void Boiler::check_active() {
|
||||
// resolution needed: 0.01 Wh = 0.01 Ws / 3600 = (% * kW * ms) / 3600
|
||||
nrgHeatF_ += (double_t)(((uint32_t)heatBurnPow * nomPower_ * (uuid::get_uptime() - powLastReadTime_)) / 3600) / 100000UL;
|
||||
nrgWwF_ += (double_t)(((uint32_t)wwBurnPow * nomPower_ * (uuid::get_uptime() - powLastReadTime_)) / 3600) / 100000UL;
|
||||
has_update(nrgHeat_, (uint32_t)(nrgHeatF_));
|
||||
has_update(nrgWw_, (uint32_t)(nrgWwF_));
|
||||
has_update(nrgHeat_, (uint32_t)(nrgHeatF_ + 0.5));
|
||||
has_update(nrgWw_, (uint32_t)(nrgWwF_ + 0.5));
|
||||
// check for store values
|
||||
time_t now = time(nullptr);
|
||||
tm * tm_ = localtime(&now);
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.6.1-dev.0c"
|
||||
#define EMSESP_APP_VERSION "3.6.1-dev.0d"
|
||||
|
||||
Reference in New Issue
Block a user