From d6c4cd00d3fdcec058664ea5552804fad74e2577 Mon Sep 17 00:00:00 2001 From: Giorgio Aresu Date: Wed, 11 Dec 2019 21:28:36 +0100 Subject: [PATCH 1/5] Fix path with no return --- FanController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FanController.cpp b/FanController.cpp index ef3dade..5ffb996 100644 --- a/FanController.cpp +++ b/FanController.cpp @@ -40,8 +40,8 @@ unsigned int FanController::getSpeed() { _halfRevs = 0; _lastMillis = millis(); _attachInterrupt(); - return _lastReading; } + return _lastReading; } void FanController::setDutyCycle(byte dutyCycle) { From 21497a57c32ca83ae955d5430add36c778a3929d Mon Sep 17 00:00:00 2001 From: Giorgio Aresu Date: Wed, 11 Dec 2019 21:55:47 +0100 Subject: [PATCH 2/5] Add ICACHE_RAM_ATTR to interrupt handlers on ESP8266 --- FanController.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/FanController.cpp b/FanController.cpp index 5ffb996..2797fed 100644 --- a/FanController.cpp +++ b/FanController.cpp @@ -5,6 +5,12 @@ #include #endif +#if defined(ESP8266) + #define ISR_PREFIX ICACHE_RAM_ATTR +#else + #define ISR_PREFIX +#endif + FanController::FanController(byte sensorPin, unsigned int sensorThreshold, byte pwmPin) { _sensorPin = sensorPin; @@ -93,9 +99,9 @@ void FanController::_triggerCaller(byte instance) } } -void FanController::_triggerExt0() { FanController::_triggerCaller(0); } -void FanController::_triggerExt1() { FanController::_triggerCaller(1); } -void FanController::_triggerExt2() { FanController::_triggerCaller(2); } -void FanController::_triggerExt3() { FanController::_triggerCaller(3); } -void FanController::_triggerExt4() { FanController::_triggerCaller(4); } -void FanController::_triggerExt5() { FanController::_triggerCaller(5); } \ No newline at end of file +ISR_PREFIX void FanController::_triggerExt0() { FanController::_triggerCaller(0); } +ISR_PREFIX void FanController::_triggerExt1() { FanController::_triggerCaller(1); } +ISR_PREFIX void FanController::_triggerExt2() { FanController::_triggerCaller(2); } +ISR_PREFIX void FanController::_triggerExt3() { FanController::_triggerCaller(3); } +ISR_PREFIX void FanController::_triggerExt4() { FanController::_triggerCaller(4); } +ISR_PREFIX void FanController::_triggerExt5() { FanController::_triggerCaller(5); } \ No newline at end of file From 105a59758e29ce19112be529ad9dff8650f8666d Mon Sep 17 00:00:00 2001 From: Giorgio Aresu Date: Wed, 11 Dec 2019 22:02:05 +0100 Subject: [PATCH 3/5] Fix _sensorThreshold data type --- FanController.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FanController.h b/FanController.h index 6d7c7c5..44dc3e3 100644 --- a/FanController.h +++ b/FanController.h @@ -20,7 +20,7 @@ class FanController static FanController *_instances[6]; byte _sensorPin; byte _sensorInterruptPin; - byte _sensorThreshold; + unsigned int _sensorThreshold; byte _pwmPin; byte _pwmDutyCycle; byte _instance; From 51fb2243e20f209ac4064e11466274a06295f620 Mon Sep 17 00:00:00 2001 From: Giorgio Aresu Date: Wed, 11 Dec 2019 22:06:41 +0100 Subject: [PATCH 4/5] Bump version to RC --- library.json | 2 +- library.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library.json b/library.json index 136301f..d5e7631 100644 --- a/library.json +++ b/library.json @@ -15,7 +15,7 @@ "maintainer": true } ], - "version": "1.0.5", + "version": "1.0.6-rc1", "frameworks": "arduino", "platforms": "*" } diff --git a/library.properties b/library.properties index 9155170..49b7823 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=FanController -version=1.0.5 +version=1.0.6-rc1 author=Giorgio Aresu maintainer=Giorgio Aresu sentence=Arduino Library for controlling PC fans From 36b6c000d27ea8756797f872fc4350c275e4a026 Mon Sep 17 00:00:00 2001 From: Giorgio Aresu Date: Sat, 25 Jan 2020 16:33:37 +0100 Subject: [PATCH 5/5] Bump version to stable --- library.json | 2 +- library.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library.json b/library.json index d5e7631..2a42b3e 100644 --- a/library.json +++ b/library.json @@ -15,7 +15,7 @@ "maintainer": true } ], - "version": "1.0.6-rc1", + "version": "1.0.6", "frameworks": "arduino", "platforms": "*" } diff --git a/library.properties b/library.properties index 49b7823..78db404 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=FanController -version=1.0.6-rc1 +version=1.0.6 author=Giorgio Aresu maintainer=Giorgio Aresu sentence=Arduino Library for controlling PC fans