From a58d9deedefa97ae2a527b4bd7a6b6d9f461b53d Mon Sep 17 00:00:00 2001 From: Jim Whitelaw Date: Wed, 8 May 2024 00:25:19 -0600 Subject: [PATCH] Set default back to BT. Fix for ELMulator class constructor. --- src/ATCommands.cpp | 2 +- src/ELMulator.cpp | 4 ++-- src/definitions.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ATCommands.cpp b/src/ATCommands.cpp index 126a0bf..8c8f304 100644 --- a/src/ATCommands.cpp +++ b/src/ATCommands.cpp @@ -82,12 +82,12 @@ void ATCommands::ATD() { // reset all void ATCommands::ATZ() { connection->setToDefaults(); + connection->writeTo(ID); connection->writeEndOK(); } // Print the version ID void ATCommands::ATI() { - connection->setStatus(connection->READY); connection->writeTo(ID); connection->writeEndOK(); } diff --git a/src/ELMulator.cpp b/src/ELMulator.cpp index 46955c2..58ec398 100644 --- a/src/ELMulator.cpp +++ b/src/ELMulator.cpp @@ -11,9 +11,9 @@ ELMulator::ELMulator() elmRequest = ""; } #else -ELMulator::ELMulator(uint32_t baudRate, uint8_t rxPin, uint8_t txPin) +ELMulator::ELMulator() { - _connection = new OBDSerialComm(baudRate, rxPin, txPin); + _connection = new OBDSerialComm(); _atProcessor = new ATCommands(_connection); _pidProcessor = new PidProcessor(_connection); _lastCommand = ""; diff --git a/src/definitions.h b/src/definitions.h index 6fb508f..c1b030b 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -7,7 +7,7 @@ // false == We are using hardware that has BT module attached via GPIO pins #define BLUETOOTH_BUILTIN true -#define USE_WIFI true +#define USE_WIFI false #define DO_DEBUG true #define DEBUG(x) do {if (DO_DEBUG) { Serial.println(x); } } while (0) @@ -19,7 +19,7 @@ #define N_CHARS_IN_BYTE 2 // Device ID -#define ID "ELM327 - ELMulator V1.0.0" +#define ID "ELM327 / ELMulator V1.3.0" #define DESC "ELMulator OBD2 Arduino library, based on ELM327 protocol" #define PROTOCOL "6" // canbus 500k 11 bit protocol id for elm.