From dc40b0a0a8b9a861324ee81f19351f55a6e372ff Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Sat, 1 Oct 2016 02:06:09 +1000 Subject: [PATCH] More formatting changes --- comms.ino | 24 ++++++++++++------------ reference/speeduino.ini | 10 +++++----- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/comms.ino b/comms.ino index ebb5ad5..f007946 100644 --- a/comms.ino +++ b/comms.ino @@ -18,7 +18,7 @@ void command() switch (Serial.read()) { case 'A': // send x bytes of realtime values - sendValues(packetSize,0); //send values to serial0 + sendValues(packetSize, 0); //send values to serial0 break; case 'B': // Burn current values to eeprom @@ -198,20 +198,21 @@ void command() /* This function returns the current values of a fixed group of variables */ -void sendValues(int packetlength, byte portnum) +void sendValues(int packetlength, byte portNum) { byte response[packetlength]; - if (portnum == 3){ //if port number is 3 + if (portNum == 3) + { + //CAN serial Serial3.write("A"); //confirm cmd type Serial3.write(packetlength); //confirm no of byte to be sent - } - + } else - { - if(requestCount == 0) { currentStatus.secl = 0; } - requestCount++; - } + { + if(requestCount == 0) { currentStatus.secl = 0; } + requestCount++; + } currentStatus.spark ^= (-currentStatus.hasSync ^ currentStatus.spark) & (1 << BIT_SPARK_SYNC); //Set the sync bit of the Spark variable to match the hasSync variable @@ -260,9 +261,8 @@ void sendValues(int packetlength, byte portnum) response[34] = getNextError(); //cli(); - if (portnum == 0){Serial.write(response, (size_t)packetlength);} - else if (portnum == 3){Serial3.write(response, (size_t)packetlength);} - //Serial.flush(); + if (portNum == 0) { Serial.write(response, (size_t)packetlength); } + else if (portNum == 3) { Serial3.write(response, (size_t)packetlength); } //sei(); return; } diff --git a/reference/speeduino.ini b/reference/speeduino.ini index 7fa9ca4..eec4586 100644 --- a/reference/speeduino.ini +++ b/reference/speeduino.ini @@ -187,7 +187,7 @@ page = 2 algorithm = bits, U08, 38, [2:2], "Speed Density", "Alpha-N" baroCorr = bits, U08, 38, [3:3], "Off", "On" injLayout = bits, U08, 38, [4:5], "Bank", "Semi-Sequential", "INVALID", "INVALID" - canEnable = bits, U08, 38, [6:6], "Disable", "Enable" + canEnable = bits, U08, 38, [6:6], "Disable", "Enable" primePulse = scalar, U08, 39, "ms", 0.1, 0.0, 0.0, 25.5, 1 dutyLim = scalar, U08, 40, "%", 1.0, 0.0, 0.0, 100.0, 0 @@ -590,8 +590,8 @@ menuDialog = main subMenu = vvtTbl, "VVT duty cycle", 8, { vvtEnabled } subMenu = std_separator subMenu = tacho, "Tacho Output" - subMenu = std_separator - subMenu = canIO, "Canbus Interface" + subMenu = std_separator + subMenu = canIO, "Canbus Interface" @@ -716,8 +716,8 @@ menuDialog = main dialog = tacho, "Tacho" field = "Output pin", tachoPin - dialog = canIO, "CanBus interface" - field = "Enable/Disable", canEnable + dialog = canIO, "CanBus interface" + field = "Enable/Disable", canEnable dialog = accelEnrichments_center, "" field = "TPSdot Threshold", tpsThresh