mirror of
https://github.com/DarthAffe/OBD.NET.git
synced 2025-12-12 16:58:30 +00:00
Added possibility to capture all data received events by registering with the interface
This commit is contained in:
parent
27fd4aba40
commit
78740de0e3
@ -88,7 +88,7 @@ namespace OBD.NET.Common.Devices
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends the AT command.
|
/// Sends the AT command.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -153,6 +153,9 @@ namespace OBD.NET.Common.Devices
|
|||||||
if (DataReceivedEventHandlers.TryGetValue(dataType, out IDataEventManager dataEventManager))
|
if (DataReceivedEventHandlers.TryGetValue(dataType, out IDataEventManager dataEventManager))
|
||||||
dataEventManager.RaiseEvent(this, obdData, timestamp);
|
dataEventManager.RaiseEvent(this, obdData, timestamp);
|
||||||
|
|
||||||
|
if (DataReceivedEventHandlers.TryGetValue(typeof(IOBDData), out IDataEventManager genericDataEventManager))
|
||||||
|
genericDataEventManager.RaiseEvent(this, obdData, timestamp);
|
||||||
|
|
||||||
return obdData;
|
return obdData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user