From 2297f152071bde9b9c72eb6032e626e3b168ec5c Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Fri, 8 Mar 2019 13:08:04 -0800 Subject: [PATCH] Fixed PWM output syntax Fixes issue https://github.com/pyr0ball/pyr0piezo/issues/19 --- .../Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino index 0afc0fc..1237a10 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/Pyr0_Piezo_Sensor_v2.x.x.ino @@ -127,10 +127,10 @@ void adjustFollow() { if positive, adjusts the follower to within the range set above*/ if (diffAdjL > 0.0) { - ADJ_FOLLOW + (diffAdjL / 4); + ADJ_FOLLOW =+ (diffAdjL / 4); } if (diffAdjH > 0.0) { - ADJ_FOLLOW - (diffAdjH / 4); + ADJ_FOLLOW =- (diffAdjH / 4); } // Analog output (PWM) of duty cycle @@ -145,11 +145,11 @@ void adjustFollow() { void adjustComp() { if (diffCompL > 0.0) { - ADJ_COMP + (diffCompL / 4); + ADJ_COMP =+ (diffCompL / 4); } if (diffCompH > 0.0) { - ADJ_COMP - (diffCompH / 4); + ADJ_COMP =- (diffCompH / 4); } analogWrite(VCOMP_PWM, ADJ_COMP);