Skip to content

Commit

Permalink
Merge pull request #13 from nickn17/master
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
nickn17 authored Dec 29, 2020
2 parents ceec907 + b01369d commit 32d4b1d
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 31 deletions.
39 changes: 22 additions & 17 deletions Board320_240.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -115,6 +117,11 @@ void Board320_240::afterSetup() {
if (liveData->settings.gprsHwSerialPort <= 2) {
sim800lSetup();
}

// Init comm device
if (!afterSetup) {
BoardInterface::afterSetup();
}
}

/**
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions BoardInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

17 changes: 14 additions & 3 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
4 changes: 2 additions & 2 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include <BLEDevice.h>

#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 */
Expand Down
Binary file modified dist/m5stack_core1/evDash.ino.bin
Binary file not shown.
Binary file modified dist/ttgo_t4_v13/evDash.ino.bin
Binary file not shown.
Binary file added screenshots/v2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/v2_m5charging2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/v2_m5speed.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 32d4b1d

Please sign in to comment.