From 6867572dbde6587dd30c11cd9bf9a8de0bd1b4c7 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Sat, 8 Mar 2014 14:42:02 +0800 Subject: Update NanoLogger --- nanologger/MicroLCD.cpp | 8 ++++---- nanologger/nanologger.cbp | 1 + nanologger/nanologger.ino | 31 ------------------------------- 3 files changed, 5 insertions(+), 35 deletions(-) (limited to 'nanologger') diff --git a/nanologger/MicroLCD.cpp b/nanologger/MicroLCD.cpp index 4e99c83..b4caf3c 100644 --- a/nanologger/MicroLCD.cpp +++ b/nanologger/MicroLCD.cpp @@ -247,8 +247,8 @@ const PROGMEM unsigned char font8x16_terminal[][16] = { void LCD_Common::printInt(uint16_t value, int8_t padding) { - unsigned int den = 10000; - for (byte i = 5; i > 0; i--) { + uint16_t den = 10000; + for (int8_t i = 5; i > 0; i--) { byte v = (byte)(value / den); value -= v * den; den /= 10; @@ -265,8 +265,8 @@ void LCD_Common::printInt(uint16_t value, int8_t padding) void LCD_Common::printLong(uint32_t value, int8_t padding) { - unsigned long den = 1000000000; - for (byte i = 10; i > 0; i--) { + uint32_t den = 1000000000; + for (int8_t i = 10; i > 0; i--) { byte v = (byte)(value / den); value -= v * den; den /= 10; diff --git a/nanologger/nanologger.cbp b/nanologger/nanologger.cbp index b15120b..c45b7ad 100644 --- a/nanologger/nanologger.cbp +++ b/nanologger/nanologger.cbp @@ -583,6 +583,7 @@ + diff --git a/nanologger/nanologger.ino b/nanologger/nanologger.ino index 48891b9..d40b85b 100644 --- a/nanologger/nanologger.ino +++ b/nanologger/nanologger.ino @@ -48,9 +48,6 @@ public: COBDLogger():state(0) {} void setup() { -#if USE_GPS - lastGPSDataTime = 0; -#endif showStates(); #if USE_MPU6050 @@ -88,11 +85,6 @@ public: delay(100); #endif -#ifndef MEMORY_SAVING - //showECUCap(); - //delay(1000); -#endif - #if ENABLE_DATA_LOG // open file for logging if (!(state & STATE_SD_READY)) { @@ -240,27 +232,6 @@ private: // if OBD response is very fast, go on processing other data for a while } -#ifndef MEMORY_SAVING - void showECUCap() - { - char buffer[24]; - byte pidlist[] = {PID_RPM, PID_SPEED, PID_THROTTLE, PID_ENGINE_LOAD, PID_CONTROL_MODULE_VOLTAGE, PID_MAF_FLOW, PID_INTAKE_MAP, PID_FUEL_LEVEL, PID_FUEL_PRESSURE, PID_COOLANT_TEMP, PID_INTAKE_TEMP, PID_AMBIENT_TEMP, PID_TIMING_ADVANCE, PID_BAROMETRIC}; - const char* namelist[] = {"RPM", "SPEED", "THROTTLE", "ENG.LOAD", "CTRL VOLT", "MAF", "MAP", "FUEL LV.", "FUEL PRE.", "COOLANT", "INTAKE","AMBIENT", "IGNITION", "BARO"}; - byte i = 0; - lcd.clear(); - lcd.setFont(FONT_SIZE_SMALL); - for (; i < sizeof(pidlist) / sizeof(pidlist[0]) / 2; i++) { - lcd.setCursor(0, i); - sprintf(buffer, "%s:%c", namelist[i], isValidPID(pidlist[i]) ? 'Y' : 'N'); - lcd.print(buffer); - } - for (byte row = 0; i < sizeof(pidlist) / sizeof(pidlist[0]); i++, row++) { - lcd.setCursor(64, row); - sprintf(buffer, "%s:%c", namelist[i], isValidPID(pidlist[i]) ? 'Y' : 'N'); - lcd.print(buffer); - } - } -#endif void reconnect() { #if ENABLE_DATA_LOG @@ -389,8 +360,6 @@ void setup() lcd.setFont(FONT_SIZE_MEDIUM); lcd.setCursor(0, 2); logger.checkSD(); -#else - lcd.clear(); #endif logger.setup(); } -- cgit v1.2.3