refactored One Shot Mode functionality #128
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this pull request, a node in Normal mode that sends a message will continuously send the same message over and over until another node in Normal mode appears on the bus and acknowledges receipt of this message.
With this pull request, if one calls .setNormalOneShotMode(); the 2515 is placed in One Shot Mode and a message will be sent only once regardless of if there is anybody else on the bus to acknowledge it as would be the case if all the other nodes in the bus are in ListenOnlyMode.
This PR merges the code from @DeltaC6 and the insight from @igorok107 on the correct mask to use to make it work
https://github.com/DeltaC6/arduino-mcp2515/tree/master
#65 (comment)
This pull request refactors the code introduced in PR#124
This code has been verified on the ArduinoEnigma CanBusTool
https://arduinoenigma.blogspot.com/2024/12/can-bus-tool.html