Cleanup some of the strings to reduce sketch size for Bluepill
This commit is contained in:
parent
9202afe7cf
commit
485affc81e
|
@ -111,10 +111,10 @@ void canCommand()
|
|||
break;
|
||||
|
||||
case 'S': // send code version
|
||||
for (unsigned int sig = 0; sig < sizeof(displaySignature) - 1; sig++)
|
||||
{
|
||||
CANSerial.write(displaySignature[sig]);
|
||||
}
|
||||
for (unsigned int revn = 0; revn < sizeof( TSfirmwareVersion) - 1; revn++)
|
||||
{
|
||||
CANSerial.write( TSfirmwareVersion[revn]);
|
||||
}
|
||||
//Serial3.print("speeduino 201609-dev");
|
||||
break;
|
||||
|
||||
|
|
|
@ -30,16 +30,16 @@ byte tsCanId = 0; // current tscanid requested
|
|||
|
||||
const char pageTitles[] PROGMEM //This is being stored in the avr flash instead of SRAM which there is not very much of
|
||||
{
|
||||
"\nVolumetric Efficiancy Map\0"//This is an alternative to using a 2D array which would waste space because of the different lengths of the strings
|
||||
"\nPage 1 Config\0"//The configuration page titles' indexes are found by counting the chars
|
||||
"\nVE Map\0"//This is an alternative to using a 2D array which would waste space because of the different lengths of the strings
|
||||
"\nPg 1 Config\0"//The configuration page titles' indexes are found by counting the chars
|
||||
"\nIgnition Map\0"//The map page titles' indexes are put into a var called currentTitleIndex. That represents the first char of each string.
|
||||
"\nPage 2 Config\0"
|
||||
"\nAir/Fuel Ratio Map\0"
|
||||
"\nPage 3 Config\0"
|
||||
"\nPage 4 Config\0"
|
||||
"\nPg 2 Config\0"
|
||||
"\nAFR Map\0"
|
||||
"\nPg 3 Config\0"
|
||||
"\nPg 4 Config\0"
|
||||
"\nBoost Map\0"
|
||||
"\nVVT Map\0"//No need to put a trailing null because it's the last string and the compliler does it for you.
|
||||
"\nPage 10 Config"
|
||||
"\nPg 10 Config"
|
||||
};
|
||||
|
||||
void command();//This is the heart of the Command Line Interpeter. All that needed to be done was to make it human readable.
|
||||
|
|
|
@ -16,7 +16,7 @@ A detailed description of each call can be found at: http://www.msextra.com/doc/
|
|||
void command()
|
||||
{
|
||||
int valueOffset; //cannot use offset as a variable name, it is a reserved word for several teensy libraries
|
||||
|
||||
|
||||
if (cmdPending == false) { currentCommand = Serial.read(); }
|
||||
|
||||
switch (currentCommand)
|
||||
|
@ -948,7 +948,7 @@ void sendPage(bool useChar)
|
|||
break;
|
||||
|
||||
default:
|
||||
Serial.println(F("\nPage has not been implemented yet. Change to another page."));
|
||||
Serial.println(F("\nPage has not been implemented yet"));
|
||||
//Just set default Values to avoid warnings
|
||||
pnt_configPage = &configPage11;
|
||||
currentTable = fuelTable;
|
||||
|
@ -1179,7 +1179,7 @@ byte getPageValue(byte page, uint16_t valueAddress)
|
|||
break;
|
||||
|
||||
default:
|
||||
Serial.println(F("\nPage has not been implemented yet. Change to another page."));
|
||||
Serial.println(F("\nPage has not been implemented yet"));
|
||||
//Just set default Values to avoid warnings
|
||||
pnt_configPage = &configPage11;
|
||||
break;
|
||||
|
|
|
@ -139,15 +139,11 @@
|
|||
#define FUEL_PUMP_ON() *pump_pin_port |= (pump_pin_mask)
|
||||
#define FUEL_PUMP_OFF() *pump_pin_port &= ~(pump_pin_mask)
|
||||
|
||||
const byte signature = 20;
|
||||
|
||||
//const char signature[] = "speeduino";
|
||||
const char displaySignature[] = "speeduino 201609-dev";
|
||||
const char TSfirmwareVersion[] = "Speeduino 2016.09";
|
||||
|
||||
const byte data_structure_version = 2; //This identifies the data structure when reading / writing.
|
||||
//const byte page_size = 64;
|
||||
const int npage_size[11] = {0,288,128,288,128,288,128,160,192,128,192};
|
||||
const uint16_t npage_size[11] = {0,288,128,288,128,288,128,160,192,128,192};
|
||||
//const byte page11_size = 128;
|
||||
#define MAP_PAGE_SIZE 288
|
||||
|
||||
|
|
|
@ -133,9 +133,7 @@ void setup()
|
|||
{
|
||||
initialiseTimers();
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
//Setup the dummy fuel and ignition tables
|
||||
//dummyFuelTable(&fuelTable);
|
||||
//dummyIgnitionTable(&ignitionTable);
|
||||
|
||||
table3D_setSize(&fuelTable, 16);
|
||||
table3D_setSize(&ignitionTable, 16);
|
||||
table3D_setSize(&afrTable, 16);
|
||||
|
|
Loading…
Reference in New Issue