mirror of https://github.com/rusefi/speeduino.git
More formatting changes
This commit is contained in:
parent
b739618ebc
commit
dc40b0a0a8
24
comms.ino
24
comms.ino
|
@ -18,7 +18,7 @@ void command()
|
||||||
switch (Serial.read())
|
switch (Serial.read())
|
||||||
{
|
{
|
||||||
case 'A': // send x bytes of realtime values
|
case 'A': // send x bytes of realtime values
|
||||||
sendValues(packetSize,0); //send values to serial0
|
sendValues(packetSize, 0); //send values to serial0
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'B': // Burn current values to eeprom
|
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
|
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];
|
byte response[packetlength];
|
||||||
|
|
||||||
if (portnum == 3){ //if port number is 3
|
if (portNum == 3)
|
||||||
|
{
|
||||||
|
//CAN serial
|
||||||
Serial3.write("A"); //confirm cmd type
|
Serial3.write("A"); //confirm cmd type
|
||||||
Serial3.write(packetlength); //confirm no of byte to be sent
|
Serial3.write(packetlength); //confirm no of byte to be sent
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(requestCount == 0) { currentStatus.secl = 0; }
|
if(requestCount == 0) { currentStatus.secl = 0; }
|
||||||
requestCount++;
|
requestCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentStatus.spark ^= (-currentStatus.hasSync ^ currentStatus.spark) & (1 << BIT_SPARK_SYNC); //Set the sync bit of the Spark variable to match the hasSync variable
|
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();
|
response[34] = getNextError();
|
||||||
|
|
||||||
//cli();
|
//cli();
|
||||||
if (portnum == 0){Serial.write(response, (size_t)packetlength);}
|
if (portNum == 0) { Serial.write(response, (size_t)packetlength); }
|
||||||
else if (portnum == 3){Serial3.write(response, (size_t)packetlength);}
|
else if (portNum == 3) { Serial3.write(response, (size_t)packetlength); }
|
||||||
//Serial.flush();
|
|
||||||
//sei();
|
//sei();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ page = 2
|
||||||
algorithm = bits, U08, 38, [2:2], "Speed Density", "Alpha-N"
|
algorithm = bits, U08, 38, [2:2], "Speed Density", "Alpha-N"
|
||||||
baroCorr = bits, U08, 38, [3:3], "Off", "On"
|
baroCorr = bits, U08, 38, [3:3], "Off", "On"
|
||||||
injLayout = bits, U08, 38, [4:5], "Bank", "Semi-Sequential", "INVALID", "INVALID"
|
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
|
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
|
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 = vvtTbl, "VVT duty cycle", 8, { vvtEnabled }
|
||||||
subMenu = std_separator
|
subMenu = std_separator
|
||||||
subMenu = tacho, "Tacho Output"
|
subMenu = tacho, "Tacho Output"
|
||||||
subMenu = std_separator
|
subMenu = std_separator
|
||||||
subMenu = canIO, "Canbus Interface"
|
subMenu = canIO, "Canbus Interface"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -716,8 +716,8 @@ menuDialog = main
|
||||||
dialog = tacho, "Tacho"
|
dialog = tacho, "Tacho"
|
||||||
field = "Output pin", tachoPin
|
field = "Output pin", tachoPin
|
||||||
|
|
||||||
dialog = canIO, "CanBus interface"
|
dialog = canIO, "CanBus interface"
|
||||||
field = "Enable/Disable", canEnable
|
field = "Enable/Disable", canEnable
|
||||||
|
|
||||||
dialog = accelEnrichments_center, ""
|
dialog = accelEnrichments_center, ""
|
||||||
field = "TPSdot Threshold", tpsThresh
|
field = "TPSdot Threshold", tpsThresh
|
||||||
|
|
Loading…
Reference in New Issue