cli: pollperiod fix (#387)

This commit is contained in:
rongli
2016-08-17 00:08:50 +08:00
committed by Jonathan Hui
parent 01a3f7aea9
commit 1144982a06
5 changed files with 45 additions and 29 deletions
+2 -2
View File
@@ -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: