mirror of
https://github.com/espressif/openthread.git
synced 2026-09-05 00:30:07 +00:00
cli: pollperiod fix (#387)
This commit is contained in:
+4
-4
@@ -567,20 +567,20 @@ Send an ICMPv6 Echo Request.
|
||||
|
||||
### pollperiod
|
||||
|
||||
Get the data poll period of sleepy end device
|
||||
Get the customized data poll period of sleepy end device (seconds). Only for certification test
|
||||
|
||||
```bash
|
||||
> pollperiod
|
||||
240
|
||||
0
|
||||
Done
|
||||
```
|
||||
|
||||
### pollperiod \<pollperiod>\
|
||||
|
||||
Set the data poll period for sleepy end device
|
||||
Set the customized data poll period for sleepy end device (seconds). Only for certification test
|
||||
|
||||
```bash
|
||||
> pollperiod 240
|
||||
> pollperiod 10
|
||||
Done
|
||||
```
|
||||
|
||||
|
||||
+2
-2
@@ -1040,12 +1040,12 @@ void Interpreter::ProcessPollPeriod(int argc, char *argv[])
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
sServer->OutputFormat("%d\r\n", otGetPollPeriod());
|
||||
sServer->OutputFormat("%d\r\n", (otGetPollPeriod() / 1000)); // ms->s
|
||||
}
|
||||
else
|
||||
{
|
||||
SuccessOrExit(error = ParseLong(argv[0], value));
|
||||
otSetPollPeriod(static_cast<uint32_t>(value));
|
||||
otSetPollPeriod(static_cast<uint32_t>(value * 1000)); // s->ms
|
||||
}
|
||||
|
||||
exit:
|
||||
|
||||
Reference in New Issue
Block a user