forked from openthread/openthread
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[diag] Refactor command processing to remove redundant code
All diagnostic commands (instead of `diag start`) should fail if device is not in diagnostic mode. Previously it was verified by each command's process method (with a missing check in `ProcessEcho` and `ProcessGpio`). This commit moves the check directly to `ProcessCmd` and cleans up redundant code. Additionally clean the documentation and align the code as for some commands `status 0x00` was added on success and for some not. Move `AppendErrorResult()` to `ProcessCmd()` as well. Signed-off-by: Maciej Baczmanski <[email protected]>
- Loading branch information
1 parent
971f05f
commit 8a3f7a8
Showing
6 changed files
with
44 additions
and
100 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.