diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-04-04 10:11:49 +0800 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-04-04 10:11:49 +0800 |
commit | d63a0d1a9f15df7cd8e6dd32badd5617aa758b6d (patch) | |
tree | 30d15f67bb7f5acb9bb4b84664bc4fafeb219240 /nanologger | |
parent | 0dbd65cf5602f36f30718869548fd9632ed8958a (diff) | |
download | 2021-arduino-obd-d63a0d1a9f15df7cd8e6dd32badd5617aa758b6d.tar.gz 2021-arduino-obd-d63a0d1a9f15df7cd8e6dd32badd5617aa758b6d.tar.bz2 2021-arduino-obd-d63a0d1a9f15df7cd8e6dd32badd5617aa758b6d.zip |
Update Nano Logger
Diffstat (limited to 'nanologger')
-rw-r--r-- | nanologger/nanologger.ino | 12 | ||||
-rw-r--r-- | nanologger/nanologger.layout | 39 |
2 files changed, 10 insertions, 41 deletions
diff --git a/nanologger/nanologger.ino b/nanologger/nanologger.ino index 83d439e..b866341 100644 --- a/nanologger/nanologger.ino +++ b/nanologger/nanologger.ino @@ -255,8 +255,16 @@ private: state &= ~(STATE_OBD_READY | STATE_ACC_READY); state |= STATE_SLEEPING; //digitalWrite(SD_CS_PIN, LOW); - for (int i = 0; !init(); i++) { - if (i == 10) lcd.clear(); + for (uint16_t i = 0; ; i++) { + if (i == 5) { + lcd.backlight(false); + lcd.clear(); + } + if (init()) { + int value; + if (read(PID_RPM, value) && value > 0) + break; + } } state &= ~STATE_SLEEPING; fileIndex++; diff --git a/nanologger/nanologger.layout b/nanologger/nanologger.layout deleted file mode 100644 index af8be4e..0000000 --- a/nanologger/nanologger.layout +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<CodeBlocks_layout_file> - <ActiveTarget name="Arduino Nano (328)" /> - <File name="config.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="835" topLine="0" /> - </Cursor> - </File> - <File name="datalogger.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="7072" topLine="295" /> - </Cursor> - </File> - <File name="images.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="415" topLine="0" /> - </Cursor> - </File> - <File name="nanologger.ino" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="5565" topLine="203" /> - </Cursor> - </File> - <File name="MicroLCD.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="30381" topLine="536" /> - </Cursor> - </File> - <File name="MicroLCD.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="2547" topLine="49" /> - </Cursor> - </File> - <File name="SH1106.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="12017" topLine="293" /> - </Cursor> - </File> -</CodeBlocks_layout_file> |