From 972c0f74e6d1bae8f19de90d77cdce623c720ac6 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sun, 2 Oct 2022 21:01:14 -0500 Subject: [PATCH] Use read byte data for ENE detect --- .../ENESMBusController/ENESMBusControllerDetect.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Controllers/ENESMBusController/ENESMBusControllerDetect.cpp b/Controllers/ENESMBusController/ENESMBusControllerDetect.cpp index 7ef9d0e56..00ebcdfc2 100644 --- a/Controllers/ENESMBusController/ENESMBusControllerDetect.cpp +++ b/Controllers/ENESMBusController/ENESMBusControllerDetect.cpp @@ -128,7 +128,12 @@ bool TestForENESMBusController(i2c_smbus_interface* bus, unsigned char address) int res = bus->i2c_smbus_read_byte(address); - if (res >= 0) + if(res < 0) + { + res = bus->i2c_smbus_read_byte_data(address, 0x00); + } + + if(res >= 0) { pass = true;