Fixed PWM output syntax

Fixes issue https://github.com/pyr0ball/pyr0piezo/issues/19
This commit is contained in:
pyr0ball 2019-03-08 13:08:04 -08:00
parent afa62eca26
commit 2297f15207

View file

@ -127,10 +127,10 @@ void adjustFollow() {
if positive, adjusts the follower to within if positive, adjusts the follower to within
the range set above*/ the range set above*/
if (diffAdjL > 0.0) { if (diffAdjL > 0.0) {
ADJ_FOLLOW + (diffAdjL / 4); ADJ_FOLLOW =+ (diffAdjL / 4);
} }
if (diffAdjH > 0.0) { if (diffAdjH > 0.0) {
ADJ_FOLLOW - (diffAdjH / 4); ADJ_FOLLOW =- (diffAdjH / 4);
} }
// Analog output (PWM) of duty cycle // Analog output (PWM) of duty cycle
@ -145,11 +145,11 @@ void adjustFollow() {
void adjustComp() { void adjustComp() {
if (diffCompL > 0.0) { if (diffCompL > 0.0) {
ADJ_COMP + (diffCompL / 4); ADJ_COMP =+ (diffCompL / 4);
} }
if (diffCompH > 0.0) { if (diffCompH > 0.0) {
ADJ_COMP - (diffCompH / 4); ADJ_COMP =- (diffCompH / 4);
} }
analogWrite(VCOMP_PWM, ADJ_COMP); analogWrite(VCOMP_PWM, ADJ_COMP);