refactoring

This commit is contained in:
Lubos Petrovic
2020-12-20 15:40:47 +01:00
parent c096858db4
commit 7bf4c1fdcc

View File

@@ -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:
case CAR_HYUNDAI_KONA_2020_64:
case CAR_KIA_ENIRO_2020_39:
case CAR_HYUNDAI_KONA_2020_39:
car = new CarKiaEniro(); car = new CarKiaEniro();
} else if (liveData->settings.carType == CAR_HYUNDAI_IONIQ_2018) { break;
case CAR_HYUNDAI_IONIQ_2018:
car = new CarHyundaiIoniq(); car = new CarHyundaiIoniq();
} else if (liveData->settings.carType == CAR_KIA_NIRO_PHEV) { break;
case CAR_KIA_NIRO_PHEV:
car = new CarKiaNiroPhev(); car = new CarKiaNiroPhev();
} else if(liveData->settings.carType == CAR_RENAULT_ZOE) { break;
case CAR_RENAULT_ZOE:
car = new CarRenaultZoe(); car = new CarRenaultZoe();
} else if(liveData->settings.carType == CAR_BMW_I3_2014) { break;
case CAR_BMW_I3_2014:
car = new CarBmwI3(); car = new CarBmwI3();
} else { break;
// if (liveData->settings.carType == CAR_DEBUG_OBD2_KIA) default:
car = new CarKiaDebugObd2(); car = new CarKiaDebugObd2();
} }
car->setLiveData(liveData); car->setLiveData(liveData);
car->activateCommandQueue(); car->activateCommandQueue();
board->attachCar(car); board->attachCar(car);