From 7e1db2188318ced6fa403c5e4ce324dceb8f470a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20St=C3=A4ck?= Date: Mon, 4 Mar 2019 09:02:56 +0100 Subject: [PATCH] Adjust parens to fix compiler warnings --- NuEVI.ino | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NuEVI.ino b/NuEVI.ino index 3dffad3..33b506b 100644 --- a/NuEVI.ino +++ b/NuEVI.ino @@ -375,7 +375,7 @@ void setup() { // if stored settings are not for current version, or Enter+Menu are pressed at startup, they are replaced by factory settings // if stored settings are not for current version, or Enter+Menu are pressed at startup, they are replaced by factory settings - if ((readSetting(VERSION_ADDR) != VERSION) && (readSetting(VERSION_ADDR) < 24) || (!digitalRead(ePin) && !digitalRead(mPin))) { + if (((readSetting(VERSION_ADDR) != VERSION) && (readSetting(VERSION_ADDR) < 24)) || (!digitalRead(ePin) && !digitalRead(mPin))) { writeSetting(VERSION_ADDR,VERSION); writeSetting(BREATH_THR_ADDR,BREATH_THR_FACTORY); writeSetting(BREATH_MAX_ADDR,BREATH_MAX_FACTORY); @@ -564,7 +564,8 @@ void loop() { mainState = RISE_WAIT; // Go to next state } if (legacy || legacyBrAct) { - if (((pbUp > ((pitchbMaxVal + pitchbThrVal) / 2)) && (pbDn > ((pitchbMaxVal + pitchbThrVal) / 2)) && legacy) || ((analogRead(0) < (breathCalZero - 800)) && legacyBrAct) && (pbUp > ((pitchbMaxVal + pitchbThrVal) / 2)) && (pbDn < ((pitchbMaxVal + pitchbThrVal) / 2))) { // both pb pads touched or br suck + if (((pbUp > ((pitchbMaxVal + pitchbThrVal) / 2)) && (pbDn > ((pitchbMaxVal + pitchbThrVal) / 2)) && legacy) || + ((analogRead(0) < breathCalZero - 800) && legacyBrAct && (pbUp > (pitchbMaxVal + pitchbThrVal) / 2) && (pbDn < (pitchbMaxVal + pitchbThrVal) / 2))) { // both pb pads touched or br suck readSwitches(); fingeredNoteUntransposed = patchLimit(fingeredNoteUntransposed + 1); if (exSensor >= ((extracThrVal + extracMaxVal) / 2)) { // instant midi setting