Allow RBR To Recognize Device When Bootstraping And Hotswaping#388
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed?
Check the last time data has been received from the RBR agnostic of the value being properly parsed.
Always probe for attached RBR if
_typeisUNKNOWN.How does it make Bristlemouth better?
This allows the RBR application to set the RBR if one has not been set yet and reinstates hot swapping RBR modules as this bug also broke that functionality.
This happened due to the fact that
_last_data_timewould never get set becausehandleDataStringwould always returnfalse(the function could not parse the string because the application did not know the_typeof RBR attached)._last_data_timeshould be set no matter ifhandleDataStringreturnstrueorfalseas this variable is meant to be used to determine when valid data was last received, not if the data was parsed properly. This allows the application to properly probe the RBR sensor.Testing
The following setup was used for testing:
Initially I deleted the
rbrCodaTypeconfig in the system configs:I would repeatedly get
attempting FTL recoveryprint statements and therbrCodaTypewould never get set.I then proceeded to flash the fix in this PR.
Immediately the
rbrCodaTypewas set:I then hot swapped from the RBR coda³ T.D to the RBR coda³ T and was able to see the config get set and changed upon the next probing window:
I then hot-swapped back to the RBR coda³ T.D and it was properly recognized and the configuration was set upon the next probing window:
Where should reviewers focus?
I added an extra safety rail when the
_typeis not set (UNKNOWN).Do you believe this is needed?
It could mess with the probing window, but also data should not be getting transmitted up Bristlemouth if
_typeis not set.Checklist