CSE7766: Fix energy calculation (#6286)

Co-authored-by: DAVe3283 <DAVe3283+GitHub@gmail.com>
This commit is contained in:
puuu
2024-02-27 12:47:45 +09:00
committed by GitHub
parent 323849c821
commit 9b77f97d87
2 changed files with 15 additions and 25 deletions
+2 -2
View File
@@ -30,8 +30,8 @@ class CSE7766Component : public Component, public uart::UARTDevice {
sensor::Sensor *current_sensor_{nullptr};
sensor::Sensor *power_sensor_{nullptr};
sensor::Sensor *energy_sensor_{nullptr};
float energy_total_{0.0f};
uint32_t cf_pulses_last_{0};
uint32_t cf_pulses_total_{0};
uint16_t cf_pulses_last_{0};
};
} // namespace cse7766