[diag] add new command to factory diags (#11001)

Commit adds new command to factory diag called `radio`.
	- `enable` for enabling the interface to default mode,
	- `disable` for disabling the interface
This commit is contained in:
Przemysław Bida
2024-12-12 20:28:52 -08:00
committed by GitHub
parent 9fefeedb0d
commit d83ddf7137
2 changed files with 26 additions and 0 deletions
+18
View File
@@ -227,6 +227,24 @@ Return the state of the radio.
sleep
```
### diag radio enable
Enable radio interface and put it in receive mode.
```bash
> diag radio enable
Done
```
### diag radio disable
Disable radio interface.
```bash
> diag radio disable
Done
```
### diag rawpowersetting
Show the raw power setting for diagnostics module.
+8
View File
@@ -635,6 +635,14 @@ Error Diags::ProcessRadio(uint8_t aArgsLength, char *aArgs[])
break;
}
}
else if (StringMatch(aArgs[0], "enable"))
{
SuccessOrExit(error = Get<Radio>().Enable());
}
else if (StringMatch(aArgs[0], "disable"))
{
SuccessOrExit(error = Get<Radio>().Disable());
}
exit:
AppendErrorResult(error);