DarthAffe / OBD.NET

C#-Library to read data from car through an ELM327-/STN1170-Adapter
GNU General Public License v2.0
184 stars 83 forks source link

Move to System.IO.Ports, combine projects into a single NuGet package #29

Closed julian-baumann closed 2 years ago

julian-baumann commented 2 years ago

Solves a part of #22. Changed the SerialConnector to use the cross-platform System.IO.Ports package, because the earlier used EnhancedSerialConnector raised an exception when trying to use it with .NET 5/6 on Linux or macOS.

This PR also aims to combine the OBD.NET.Desktop with the OBD.NET.Common project, to simplify the use of this package. The code was also refactored to C# 10.

The OBD.NET.Universal project should continue to work with this implementation, though I couldn't test it on my own due to a lack of the required hardware. It build successfully and I couldn't see any reasons, why it shouldn't continue to work.

The new OBD.NET package was tested on macOS/Linux (Raspberry Pi) and worked just fine.

Note: I also renamed the NuGet package in the csproj file from OBD.NET.Common to OBD.NET

DarthAffe commented 2 years ago

Hey, thanks for contributing :)

To give you a status update on this: I'm done looking through the changes, but with the removal of the enhanced serial port you broke everything < .net 5 - I'm currently fixing this. Sadly my car-pc died recently which makes testing currently a bit of a hassle - i'll need a bit more time here :)

julian-baumann commented 2 years ago

Ahh didn't check for that. Also sorry for the incredible messy PR. I should've created a separate PR regarding the System.IO.Ports changes. Must've been hard to review the changes since the renaming of the projects probably broke the git diff in a way.

DarthAffe commented 2 years ago

Finally got some time to finish reviewing and testing this - thanks again for contributing :)

This should indeed fix #22