From 78740de0e31b74618ac9b68b92cb9e6af72978d8 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Sat, 29 Jul 2017 14:32:10 +0200 Subject: [PATCH] Added possibility to capture all data received events by registering with the interface --- OBD.NET/OBD.NET.Common/Devices/ELM327.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OBD.NET/OBD.NET.Common/Devices/ELM327.cs b/OBD.NET/OBD.NET.Common/Devices/ELM327.cs index 4f0218c..85594ad 100644 --- a/OBD.NET/OBD.NET.Common/Devices/ELM327.cs +++ b/OBD.NET/OBD.NET.Common/Devices/ELM327.cs @@ -88,7 +88,7 @@ namespace OBD.NET.Common.Devices throw; } } - + /// /// Sends the AT command. /// @@ -153,6 +153,9 @@ namespace OBD.NET.Common.Devices if (DataReceivedEventHandlers.TryGetValue(dataType, out IDataEventManager dataEventManager)) dataEventManager.RaiseEvent(this, obdData, timestamp); + if (DataReceivedEventHandlers.TryGetValue(typeof(IOBDData), out IDataEventManager genericDataEventManager)) + genericDataEventManager.RaiseEvent(this, obdData, timestamp); + return obdData; } }