From 93c31e1ae916a2890c355cbe482acd9c0ce50642 Mon Sep 17 00:00:00 2001 From: Timur Iskhodzhanov Date: Mon, 15 Aug 2022 23:21:12 -0700 Subject: [PATCH] Minor change to allow this code to compile with ESP32 version of arduino-RaceChrono In case you haven't seen, please update your checkout of arduino-RaceChrono to make sure you have the latest goodies available, such as basic ESP32 support. --- README.md | 4 +++- RaceChronoDiyBleDevice.ino | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 444a8e8..9a193b6 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,9 @@ contributors to this project. This section describes how to build the hardware for the CAN bus reader with a JST SM connector. The connector can then be used to connect to a car-specific -harness for the CAN bus. +harness for the CAN bus. You can try other hardware (there's even experimental +support for ESP32 and RejsaCAN), but you'll need to figure some things yourself +if you do so. Recommended parts list: diff --git a/RaceChronoDiyBleDevice.ino b/RaceChronoDiyBleDevice.ino index f1ba8de..da745eb 100644 --- a/RaceChronoDiyBleDevice.ino +++ b/RaceChronoDiyBleDevice.ino @@ -198,9 +198,9 @@ void loop() { // First, verify that we have both Bluetooth and CAN up and running. - // Not clear how heavy is the Bluefruit.connected() call. Only check the - // connectivity every 100 iterations to avoid stalling the CAN bus loop. - if ((loop_iteration % 100) == 0 && !Bluefruit.connected()) { + // Not clear how heavy is the isConnected() call. Only check the connectivity + // every 100 iterations to avoid stalling the CAN bus loop. + if ((loop_iteration % 100) == 0 && !RaceChronoBle.isConnected()) { Serial.println("RaceChrono disconnected!"); raceChronoHandler.handleDisconnect(); stopCanBusReader();