resetcause:restore to factory, factory to factory_inquiry#2596
Merged
xiaoxiang781216 merged 1 commit intoapache:masterfrom Oct 6, 2024
Merged
resetcause:restore to factory, factory to factory_inquiry#2596xiaoxiang781216 merged 1 commit intoapache:masterfrom
xiaoxiang781216 merged 1 commit intoapache:masterfrom
Conversation
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
cederom
requested changes
Sep 22, 2024
Contributor
There was a problem hiding this comment.
- I like the idea but this changes existing logic and may impact existing applications.
- After introducing
restoreexisting applications may not catch thefactoryevent and skip the factory defaults reset. factoryis already used to trigger the "perform reset to factory defaults".- After successful factory defaults reset one more reset can be triggered with
NULLand device should land in a state that should be handled by a firmware accordingly based on existing configuration. restorename is a bit ambiguous and may be confusing, its not self explanatory, maybe another keyword can be used?- Maybe something like
defaultswould fit here better?factoryas before would cause factory defaults reset, and then call reset withdefaultsmark to note everything is default or needs to be set default (this state should be also unambiguous)? - Documentation needs an update in this area. Will try to work more with documentation in a free moment.
- Long story short if new resetflag is to create new and unique state that would be fine, but if it changes existing behavior this will break compatibility and we do not want that.
- I would like to hear what other devs think about this idea :-)
xiaoxiang781216
approved these changes
Sep 23, 2024
Contributor
@cederom this change is to align with nuttx side definition: |
acassis
approved these changes
Oct 5, 2024
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.
Summary
add restore to indicate "restore the factory settings" and the previous "factory" represents the confirmation of restoring to factory settings.
Impact
resetcause
Testing
CI test