Bring formatting in line with standards

This commit is contained in:
Josh Stewart 2016-10-01 01:57:57 +10:00
parent 4d0fe1836a
commit b739618ebc
6 changed files with 13 additions and 13 deletions

View File

@ -4,14 +4,14 @@
#define veMapPage 1
uint8_t currentcanPage = 1;//Not the same as the speeduino config page numbers
uint8_t currentCanPage = 1;//Not the same as the speeduino config page numbers
uint8_t nCanretry = 0; //no of retrys
uint8_t cancmdfail = 0; //command fail yes/no
uint8_t canlisten = 0;
uint8_t Lbuffer[8]; //8 byte buffer to store incomng can data
void Cancommand();//This is the heart of the Command Line Interpeter. All that needed to be done was to make it human readable.
void canCommand();//This is the heart of the Command Line Interpeter. All that needed to be done was to make it human readable.
void sendCancommand(uint8_t cmdtype , uint16_t canadddress, uint8_t candata1, uint8_t candata2);
void testCanComm();

View File

@ -15,7 +15,7 @@ sendcancommand is called when a comman d is to be sent via serial3 to the Can in
//#include "globals.h"
//#include "storage.h"
void Cancommand()
void canCommand()
{
switch (Serial3.read())
{

View File

@ -215,7 +215,7 @@ struct config1 {
byte algorithm : 1; //"Speed Density", "Alpha-N"
byte baroCorr : 1;
byte injLayout : 2;
byte canenable : 1; //is can interface enabled
byte canEnable : 1; //is can interface enabled
byte primePulse;
byte dutyLim;

View File

@ -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
@ -591,7 +591,7 @@ menuDialog = main
subMenu = std_separator
subMenu = tacho, "Tacho Output"
subMenu = std_separator
subMenu = canio, "Canbus Interface"
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

View File

@ -126,7 +126,7 @@ static inline unsigned int setQueue(volatile Schedule *queue[], Schedule *schedu
//Sort the queues. Both queues are kept in sync.
//This implementes a sorting networking based on the Bose-Nelson sorting network
//See: http://pages.ripco.net/~jgamble/nw.html
#define SWAP(x,y) if(tmpQueue[y] < tmpQueue[x]) { unsigned int tmp = tmpQueue[x]; tmpQueue[x] = tmpQueue[y]; tmpQueue[y] = tmp; Schedule *tmpS = queue[x]; queue[x] = queue[y]; queue[y] = tmpS; }
#define SWAP(x,y) if(tmpQueue[y] < tmpQueue[x]) { unsigned int tmp = tmpQueue[x]; tmpQueue[x] = tmpQueue[y]; tmpQueue[y] = tmp; volatile Schedule *tmpS = queue[x]; queue[x] = queue[y]; queue[y] = tmpS; }
//SWAP(0, 1); //Likely not needed
//SWAP(2, 3); //Likely not needed
SWAP(0, 2);

View File

@ -149,7 +149,8 @@ volatile bool fpPrimed = false; //Tracks whether or not the fuel pump priming ha
void setup()
{
Serial.begin(115200);
Serial.begin(115200);
if (configPage1.canEnable) { Serial3.begin(115200); }
//Setup the dummy fuel and ignition tables
//dummyFuelTable(&fuelTable);
@ -161,7 +162,6 @@ void setup()
table3D_setSize(&vvtTable, 8);
loadConfig();
if (configPage1.canenable ==1){Serial3.begin(115200);}
//Repoint the 2D table structs to the config pages that were just loaded
taeTable.valueSize = SIZE_BYTE; //Set this table to use byte values
@ -755,13 +755,13 @@ void loop()
}
}
//if Can interface is enabled then check for serial3 requests.
if (configPage1.canenable == 1)
if (configPage1.canEnable)
{
if ( ((mainLoopCount & 31) == 1) or (Serial3.available() > SERIAL_BUFFER_THRESHOLD) )
{
if (Serial3.available() > 0)
{
Cancommand();
canCommand();
}
}
}