Open-Agriculture / AgIsoStack-plus-plus

AgIsoStack++ is the completely free open-source C++ ISOBUS library for everyone
https://agisostack.com/
MIT License
167 stars 40 forks source link

[Core]: Made preferred address optional #441

Closed ad3154 closed 4 months ago

ad3154 commented 4 months ago

Describe your changes

This changes internal control functions and the address claim state machine to allow no preferred address or the null address (0xFE) as preferred. If no preferred address (or null) is provided, and the NAME allows for arbitrary addressing, we'll just find an address in the arbitrary address range for the user. If the user provides no address, and a NAME which doesn't support arbitration, we'll assert to tell them they made an error.

Also, clamped the range we were using for the arbitrary address range to max out at 235, where it was previously 247.

Closes #439

How has this been tested?

Updated unit test to use the new functionality and verified an address was claimed using debugger.

image

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
2 New issues

Measures
0 Security Hotspots
68.2% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud