From 8e9be7ef177978b69822a6cdbeb4c71440d54e29 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Fri, 12 Jul 2019 16:46:34 +1000 Subject: [PATCH] Warnings cleanup --- speeduino/comms.h | 2 +- speeduino/comms.ino | 6 +++--- speeduino/speeduino.ino | 2 -- speeduino/src/PID_v1/PID_v1.cpp | 4 ---- speeduino/updates.ino | 2 +- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/speeduino/comms.h b/speeduino/comms.h index 1820dce1..bbb81418 100644 --- a/speeduino/comms.h +++ b/speeduino/comms.h @@ -58,7 +58,7 @@ void saveConfig(); void sendPage(); void sendPageASCII(); void receiveCalibration(byte); -void sendToothLog(bool); +void sendToothLog(); void testComm(); void commandButtons(); byte getPageValue(byte, uint16_t); diff --git a/speeduino/comms.ino b/speeduino/comms.ino index 33436c5d..db53ec7a 100644 --- a/speeduino/comms.ino +++ b/speeduino/comms.ino @@ -273,7 +273,7 @@ void command() break; case 'T': //Send 256 tooth log entries to Tuner Studios tooth logger - if(currentStatus.toothLogEnabled == true) { sendToothLog(false); } //Sends tooth log values as ints + if(currentStatus.toothLogEnabled == true) { sendToothLog(); } //Sends tooth log values as ints else if (currentStatus.compositeLogEnabled == true) { sendCompositeLog(); } break; @@ -416,7 +416,7 @@ void command() break; case 'z': //Send 256 tooth log entries to a terminal emulator - sendToothLog(true); //Sends tooth log values as chars + sendToothLog(); //Sends tooth log values as chars break; case '`': //Custom 16u2 firmware is making its presence known @@ -1695,7 +1695,7 @@ Send 256 tooth log entries * if useChar is true, the values are sent as chars to be printed out by a terminal emulator * if useChar is false, the values are sent as a 2 byte integer which is readable by TunerStudios tooth logger */ -void sendToothLog(bool useChar) +void sendToothLog() { //We need TOOTH_LOG_SIZE number of records to send to TunerStudio. If there aren't that many in the buffer then we just return and wait for the next call if (BIT_CHECK(currentStatus.status1, BIT_STATUS1_TOOTHLOG1READY)) //Sanity check. Flagging system means this should always be true diff --git a/speeduino/speeduino.ino b/speeduino/speeduino.ino index a12a627d..a3c5e697 100644 --- a/speeduino/speeduino.ino +++ b/speeduino/speeduino.ino @@ -491,7 +491,6 @@ void loop() injector3StartAngle = calculateInjector3StartAngle(PWdivTimerPerDegree); injector4StartAngle = injector3StartAngle + (CRANK_ANGLE_MAX_INJ / 2); //Phase this either 180 or 360 degrees out from inj3 (In reality this will always be 180 as you can't have sequential and staged currently) - if(injector4StartAngle < 0) {injector4StartAngle += CRANK_ANGLE_MAX_INJ;} if(injector4StartAngle > (uint16_t)CRANK_ANGLE_MAX_INJ) { injector4StartAngle -= CRANK_ANGLE_MAX_INJ; } } break; @@ -528,7 +527,6 @@ void loop() injector3StartAngle = calculateInjector3StartAngle(PWdivTimerPerDegree); injector4StartAngle = injector3StartAngle + (CRANK_ANGLE_MAX_INJ / 2); //Phase this either 180 or 360 degrees out from inj3 (In reality this will always be 180 as you can't have sequential and staged currently) - if(injector4StartAngle < 0) {injector4StartAngle += CRANK_ANGLE_MAX_INJ;} if(injector4StartAngle > (uint16_t)CRANK_ANGLE_MAX_INJ) { injector4StartAngle -= CRANK_ANGLE_MAX_INJ; } } break; diff --git a/speeduino/src/PID_v1/PID_v1.cpp b/speeduino/src/PID_v1/PID_v1.cpp index 2de4af48..b03e7d0d 100755 --- a/speeduino/src/PID_v1/PID_v1.cpp +++ b/speeduino/src/PID_v1/PID_v1.cpp @@ -82,8 +82,6 @@ bool PID::Compute() ******************************************************************************/ void PID::SetTunings(byte Kp, byte Ki, byte Kd) { - if (Kp<0 || Ki<0 || Kd<0) return; - dispKp = Kp; dispKi = Ki; dispKd = Kd; /* @@ -270,7 +268,6 @@ bool integerPID::Compute() ******************************************************************************/ void integerPID::SetTunings(byte Kp, byte Ki, byte Kd) { - if (Kp<0 || Ki<0 || Kd<0) return; if ( dispKp == Kp && dispKi == Ki && dispKd == Kd ) return; //Only do anything if one of the values has changed dispKp = Kp; dispKi = Ki; dispKd = Kd; @@ -479,7 +476,6 @@ bool integerPID_ideal::Compute() ******************************************************************************/ void integerPID_ideal::SetTunings(byte Kp, byte Ki, byte Kd) { - if (Kp<0 || Ki<0 || Kd<0) return; if ( dispKp == Kp && dispKi == Ki && dispKd == Kd ) return; //Only do anything if one of the values has changed dispKp = Kp; dispKi = Ki; dispKd = Kd; diff --git a/speeduino/updates.ino b/speeduino/updates.ino index b29004ed..ec6f4284 100644 --- a/speeduino/updates.ino +++ b/speeduino/updates.ino @@ -219,9 +219,9 @@ void doUpdates() configPage2.maeThresh = configPage2.taeThresh; //Set some sane values for the MAP AE curve configPage4.maeRates[0] = 75; + configPage4.maeRates[1] = 75; configPage4.maeRates[2] = 75; configPage4.maeRates[3] = 75; - configPage4.maeRates[4] = 75; configPage4.maeBins[0] = 7; configPage4.maeBins[1] = 12; configPage4.maeBins[2] = 20;