mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[thci] update pollperiod command to accept ms resolution configuration (#3361)
This commit is contained in:
+3
-2
@@ -1996,12 +1996,13 @@ void Interpreter::ProcessPollPeriod(int argc, char *argv[])
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
mServer->OutputFormat("%d\r\n", (otLinkGetPollPeriod(mInstance) / 1000)); // ms->s
|
||||
mServer->OutputFormat("%d\r\n", otLinkGetPollPeriod(mInstance));
|
||||
}
|
||||
else
|
||||
{
|
||||
SuccessOrExit(error = ParseLong(argv[0], value));
|
||||
otLinkSetPollPeriod(mInstance, static_cast<uint32_t>(value * 1000)); // s->ms
|
||||
VerifyOrExit(value >= OPENTHREAD_CONFIG_MINIMUM_POLL_PERIOD, error = OT_ERROR_PARSE);
|
||||
otLinkSetPollPeriod(mInstance, static_cast<uint32_t>(value));
|
||||
}
|
||||
|
||||
exit:
|
||||
|
||||
Reference in New Issue
Block a user