refactoring
This commit is contained in:
40
evDash.ino
40
evDash.ino
@@ -1,9 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
Project renamed from eNiroDashboard to evDash
|
Project renamed from eNiroDashboard to evDash
|
||||||
|
|
||||||
!! working only with OBD BLE 4.0 adapters
|
!! Supported BLE4 adapter is Vgate ICar Pro BLE4 version
|
||||||
!! Supported adapter is Vgate ICar Pro (must be BLE4.0 version)
|
|
||||||
!! Not working with standard BLUETOOTH 3 adapters
|
|
||||||
|
|
||||||
Serial console commands
|
Serial console commands
|
||||||
|
|
||||||
@@ -221,21 +219,29 @@ void setup(void) {
|
|||||||
board->initBoard();
|
board->initBoard();
|
||||||
|
|
||||||
// Car interface
|
// Car interface
|
||||||
if (liveData->settings.carType == CAR_KIA_ENIRO_2020_64 || liveData->settings.carType == CAR_HYUNDAI_KONA_2020_64 ||
|
switch (liveData->settings.carType) {
|
||||||
liveData->settings.carType == CAR_KIA_ENIRO_2020_39 || liveData->settings.carType == CAR_HYUNDAI_KONA_2020_39) {
|
case CAR_KIA_ENIRO_2020_64:
|
||||||
car = new CarKiaEniro();
|
case CAR_HYUNDAI_KONA_2020_64:
|
||||||
} else if (liveData->settings.carType == CAR_HYUNDAI_IONIQ_2018) {
|
case CAR_KIA_ENIRO_2020_39:
|
||||||
car = new CarHyundaiIoniq();
|
case CAR_HYUNDAI_KONA_2020_39:
|
||||||
} else if (liveData->settings.carType == CAR_KIA_NIRO_PHEV) {
|
car = new CarKiaEniro();
|
||||||
car = new CarKiaNiroPhev();
|
break;
|
||||||
} else if(liveData->settings.carType == CAR_RENAULT_ZOE) {
|
case CAR_HYUNDAI_IONIQ_2018:
|
||||||
car = new CarRenaultZoe();
|
car = new CarHyundaiIoniq();
|
||||||
} else if(liveData->settings.carType == CAR_BMW_I3_2014) {
|
break;
|
||||||
car = new CarBmwI3();
|
case CAR_KIA_NIRO_PHEV:
|
||||||
} else {
|
car = new CarKiaNiroPhev();
|
||||||
// if (liveData->settings.carType == CAR_DEBUG_OBD2_KIA)
|
break;
|
||||||
car = new CarKiaDebugObd2();
|
case CAR_RENAULT_ZOE:
|
||||||
|
car = new CarRenaultZoe();
|
||||||
|
break;
|
||||||
|
case CAR_BMW_I3_2014:
|
||||||
|
car = new CarBmwI3();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
car = new CarKiaDebugObd2();
|
||||||
}
|
}
|
||||||
|
|
||||||
car->setLiveData(liveData);
|
car->setLiveData(liveData);
|
||||||
car->activateCommandQueue();
|
car->activateCommandQueue();
|
||||||
board->attachCar(car);
|
board->attachCar(car);
|
||||||
|
|||||||
Reference in New Issue
Block a user