diff --git a/Board320_240.cpp b/Board320_240.cpp index c492f20..3064358 100644 --- a/Board320_240.cpp +++ b/Board320_240.cpp @@ -46,12 +46,14 @@ void Board320_240::afterSetup() { loadTestData(); } - // Init from parent class - syslog->println("BoardInterface::afterSetup"); - BoardInterface::afterSetup(); + bool afterSetup = false; // Check if bard was sleeping if (bootCount > 1) { + // Init comm device + afterSetup = true; + BoardInterface::afterSetup(); + // Wake or continue with sleeping afterSleep(); } @@ -115,6 +117,11 @@ void Board320_240::afterSetup() { if (liveData->settings.gprsHwSerialPort <= 2) { sim800lSetup(); } + + // Init comm device + if (!afterSetup) { + BoardInterface::afterSetup(); + } } /** @@ -1170,16 +1177,16 @@ void Board320_240::menuItemClick() { case 4031: liveData->settings.pressureUnit = 'b'; showParentMenu = true; break; case 4032: liveData->settings.pressureUnit = 'p'; showParentMenu = true; break; // Pair ble device - case 2: + case 2: if (liveData->settings.commType == COMM_TYPE_OBD2CAN) { - displayMessage("Not supported", "in CAN mode"); - delay(3000); - hideMenu(); - return; + displayMessage("Not supported", "in CAN mode"); + delay(3000); + hideMenu(); + return; } - scanDevices = true; - liveData->menuCurrent = 9999; - commInterface->scanDevices(); + scanDevices = true; + liveData->menuCurrent = 9999; + commInterface->scanDevices(); return; // Reset settings case 8: resetSettings(); hideMenu(); return; @@ -1543,12 +1550,10 @@ bool Board320_240::sdcardMount() { while (1) { syslog->print("Initializing SD card..."); -#ifdef BOARD_TTGO_T4 - syslog->print(" TTGO-T4 "); - SPIClass * hspi = new SPIClass(HSPI); - spiSD.begin(pinSdcardSclk, pinSdcardMiso, pinSdcardMosi, pinSdcardCs); //SCK,MISO,MOSI,ss - SdState = SD.begin(pinSdcardCs, *hspi, SPI_FREQUENCY); -#endif BOARD_TTGO_T4 + /* syslog->print(" TTGO-T4 "); + SPIClass * hspi = new SPIClass(HSPI); + spiSD.begin(pinSdcardSclk, pinSdcardMiso, pinSdcardMosi, pinSdcardCs); //SCK,MISO,MOSI,ss + SdState = SD.begin(pinSdcardCs, *hspi, SPI_FREQUENCY);*/ syslog->print(" M5STACK "); SdState = SD.begin(pinSdcardCs); diff --git a/BoardInterface.cpp b/BoardInterface.cpp index a8f059a..b7198c4 100644 --- a/BoardInterface.cpp +++ b/BoardInterface.cpp @@ -220,6 +220,8 @@ void BoardInterface::loadSettings() { */ void BoardInterface::afterSetup() { + syslog->println("BoardInterface::afterSetup"); + // Init Comm iterface syslog->print("Init communication device: "); syslog->println(liveData->settings.commType); diff --git a/README.md b/README.md index 738ed7a..51c9af5 100644 --- a/README.md +++ b/README.md @@ -50,21 +50,19 @@ See INSTALLATION.md Screen list - no0. blank screen, lcd off -- no1. auto mode (summary info / speed kmh / charging graph) -- no2. summary info (default) -- no3. speed kmh + kwh/100km (or kw for discharge) +- no1. automatic mode (summary info / speed kmh / charging graph) +- no2. summary info +- no3. speed kmh + kwh/100km - no4. battery cells + battery module temperatures - no5. charging graph -- no6. consumption table. Can be used to measure available battery capacity! -- no7. debug screen (default off in the menu) +- no6. consumption table. Can be used to measure available battery capacity. -![image](https://github.com/nickn17/evDash/blob/master/screenshots/v1.jpg) - -[![Watch the video](https://github.com/nickn17/evDash/blob/master/screenshots/v0.9.jpg)](https://www.youtube.com/watch?v=Jg5VP2P58Yg&) +![image](https://github.com/nickn17/evDash/blob/master/screenshots/v2.jpg) +![image](https://github.com/nickn17/evDash/blob/master/screenshots/v2_m5charging2.jpg) ## Supporting me - nick.n17@gmail.com (Lubos Petrovic / Slovakia) - Buy Me a Beer via paypal https://www.paypal.me/nickn17 -- Many thanks to Blas, Jens, Калин, Aleš Dokupil and others for help with first releases. +- Many thanks to all evDash contributors. diff --git a/RELEASENOTES.md b/RELEASENOTES.md index f79447e..d465ee7 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,9 +1,20 @@ # RELEASE NOTES ### Next version -- removed debug screen -- sdcard working only with m5stack -- M5 COMMU (CAN) module support. + +### v2.2.0 2020-12-29 +- Direct CAN support with m5 COMMU module (instead obd2 BLE4 adapter). RECOMMENDED +- EvDash deep sleep & wake up for Hyundai Ioniq/Kona & Kia e-Niro (kolaCZek). +- Send data via GPRS to own server (kolaCZek). Simple web api project https://github.com/kolaCZek/evDash_serverapi) +- Better support for Hyundai Ioniq (kolaCZek). +- Kia e-niro - added support for open doors/hood/trunk. +- Serial console off/on and improved logging & debug level setting +- Avoid GPS on UART0 collision with serial console. +- DEV initial support for Bmw i3 (Janulo) +- Command queue refactoring (Janulo) +- Sdcard is working only with m5stack +- Removed debug screen +- M5 mute speaker fix ### v2.1.1 2020-12-14 - tech refactoring: `hexToDecFromResponse`, `decFromResponse` diff --git a/config.h b/config.h index bb68689..3c145c6 100644 --- a/config.h +++ b/config.h @@ -2,8 +2,8 @@ #include -#define APP_VERSION "v2.2.0-dev" -#define APP_RELEASE_DATE "2020-12-14" +#define APP_VERSION "v2.2.0" +#define APP_RELEASE_DATE "2020-12-29" // TFT COLORS FOR TTGO #define TFT_BLACK 0x0000 /* 0, 0, 0 */ diff --git a/dist/m5stack_core1/evDash.ino.bin b/dist/m5stack_core1/evDash.ino.bin index deff462..b64dbec 100644 Binary files a/dist/m5stack_core1/evDash.ino.bin and b/dist/m5stack_core1/evDash.ino.bin differ diff --git a/dist/ttgo_t4_v13/evDash.ino.bin b/dist/ttgo_t4_v13/evDash.ino.bin index 45e88e8..bb9b62b 100644 Binary files a/dist/ttgo_t4_v13/evDash.ino.bin and b/dist/ttgo_t4_v13/evDash.ino.bin differ diff --git a/screenshots/v2.jpg b/screenshots/v2.jpg new file mode 100644 index 0000000..d86a39f Binary files /dev/null and b/screenshots/v2.jpg differ diff --git a/screenshots/v2_m5charging2.jpg b/screenshots/v2_m5charging2.jpg new file mode 100644 index 0000000..4083beb Binary files /dev/null and b/screenshots/v2_m5charging2.jpg differ diff --git a/screenshots/v2_m5speed.jpg b/screenshots/v2_m5speed.jpg new file mode 100644 index 0000000..a28e9d8 Binary files /dev/null and b/screenshots/v2_m5speed.jpg differ