From ae11c5ea815fce60279476340a3757ee516f670f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Fri, 3 Feb 2017 11:09:36 +0100 Subject: [PATCH 1/2] Issue #50. Fix type bug in window variable when calculating energy for HLW8012 devices (Sonoff POW) --- code/espurna/pow.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/espurna/pow.ino b/code/espurna/pow.ino index a575baf7..bb6b0fe7 100644 --- a/code/espurna/pow.ino +++ b/code/espurna/pow.ino @@ -242,7 +242,7 @@ void powLoop() { reactive = (apparent > power) ? sqrt(apparent * apparent - power * power) : 0; factor = (apparent > 0) ? 100 * power / apparent : 100; if (factor > 100) factor = 100; - unsigned long window = (double) POW_REPORT_EVERY * POW_UPDATE_INTERVAL / 1000.0 / 3600.0; + double window = (double) POW_REPORT_EVERY * POW_UPDATE_INTERVAL / 1000.0 / 3600.0; _energy += power * window; saveEnergy(); From 7874aec20b3f35367836363743ad10e6318b1bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Fri, 3 Feb 2017 11:10:51 +0100 Subject: [PATCH 2/2] Version bump --- CHANGELOG.md | 4 ++++ README.md | 2 +- code/espurna/config/version.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6ac4e68..126ce87e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.5.4] 2017-02-03 +### Fixed +- Issue #50. Fix type bug in window variable when calculating energy for HLW8012 devices (Sonoff POW) + ## [1.5.3] 2017-02-02 ### Fixed - Issue #50 and #54. Fixed domoticz MQTT message format diff --git a/README.md b/README.md index 44293698..65dbcbc6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ESPurna ("spark" in Catalan) is a custom firmware for ESP8266 based smart switch It was originally developed with the **[IteadStudio Sonoff](https://www.itead.cc/sonoff-wifi-wireless-switch.html)** in mind but now it supports a growing number of ESP8266-based boards. It uses the Arduino Core for ESP8266 framework and a number of 3rd party libraries. -**Current Release Version is 1.5.3**, read the [changelog](CHANGELOG.md). +**Current Release Version is 1.5.4**, read the [changelog](CHANGELOG.md). ## Features diff --git a/code/espurna/config/version.h b/code/espurna/config/version.h index e7c0c185..5d667f4b 100644 --- a/code/espurna/config/version.h +++ b/code/espurna/config/version.h @@ -1,4 +1,4 @@ #define APP_NAME "ESPurna" -#define APP_VERSION "1.5.3" +#define APP_VERSION "1.5.4" #define APP_AUTHOR "xose.perez@gmail.com" #define APP_WEBSITE "http://tinkerman.cat"