1.6 version - fixed ble pairing menu

This commit is contained in:
Lubos Petrovic
2020-06-30 09:29:52 +02:00
parent 683661c8e4
commit b6f3f8a887
3 changed files with 8 additions and 4 deletions

View File

@@ -44,6 +44,10 @@ Screen list
## Release notes ## Release notes
### v1.6 2020-06-30
- fixed ble device pairing
- added command to set protocol ISO 15765-4 CAN (11 bit ID, 500 kbit/s) - some vgate adapters freezes during "init at command" phase
### v1.5 2020-06-03 ### v1.5 2020-06-03
- added support for different units (miles, fahrenheits, psi) - added support for different units (miles, fahrenheits, psi)

Binary file not shown.

View File

@@ -1,6 +1,6 @@
/* /*
KIA eNiro Dashboard 1.5, 2020-06-03 KIA eNiro Dashboard 1.6, 2020-06-30
!! working only with OBD BLE 4.0 adapters !! working only with OBD BLE 4.0 adapters
!! Supported adapter is Vgate ICar Pro (must be BLE4.0 version) !! Supported adapter is Vgate ICar Pro (must be BLE4.0 version)
!! Not working with standard BLUETOOTH 3 adapters !! Not working with standard BLUETOOTH 3 adapters
@@ -193,7 +193,7 @@ MENU_ITEM menuItems[menuItemsCount] = {
{4032, 403, -1, "Psi"}, {4032, 403, -1, "Psi"},
{9999, 9998, 0, "List of BLE devices"}, {9999, 9998, 0, "List of BLE devices"},
{10000, 9999, -1, "empty list"}, {10000, 9999, 0, "<- parent menu"},
{10001, 9999, -1, "-"}, {10001, 9999, -1, "-"},
{10002, 9999, -1, "-"}, {10002, 9999, -1, "-"},
{10003, 9999, -1, "-"}, {10003, 9999, -1, "-"},
@@ -1150,7 +1150,7 @@ bool menuItemClick() {
} else { } else {
Serial.println(tmpMenuItem.id); Serial.println(tmpMenuItem.id);
// Device list // Device list
if (tmpMenuItem.id >= 10000 && tmpMenuItem.id < 10100) { if (tmpMenuItem.id > 10000 && tmpMenuItem.id < 10100) {
strlcpy((char*)settings.obdMacAddress, (char*)tmpMenuItem.obdMacAddress, 20); strlcpy((char*)settings.obdMacAddress, (char*)tmpMenuItem.obdMacAddress, 20);
Serial.print("Selected adapter MAC address "); Serial.print("Selected adapter MAC address ");
Serial.println(settings.obdMacAddress); Serial.println(settings.obdMacAddress);
@@ -1613,7 +1613,7 @@ class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
String tmpStr; String tmpStr;
if (scanningDeviceIndex < 10/* && advertisedDevice.haveServiceUUID()*/) { if (scanningDeviceIndex < 10/* && advertisedDevice.haveServiceUUID()*/) {
for (uint16_t i = 0; i < menuItemsCount; ++i) { for (uint16_t i = 0; i < menuItemsCount; ++i) {
if (menuItems[i].id == 10000 + scanningDeviceIndex) { if (menuItems[i].id == 10001 + scanningDeviceIndex) {
tmpStr = advertisedDevice.toString().c_str(); tmpStr = advertisedDevice.toString().c_str();
tmpStr.replace("Name: ", ""); tmpStr.replace("Name: ", "");
tmpStr.replace("Address: ", ""); tmpStr.replace("Address: ", "");