You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2018/12/07 18:58:56 UTC

[mynewt-core] branch master updated: Convert milliseconds to ticks before polling.

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 0fff539  Convert milliseconds to ticks before polling.
0fff539 is described below

commit 0fff539b82d2141d577ffc37fa30ba12988c9579
Author: Nolan Lau <no...@juul.com>
AuthorDate: Fri Dec 7 10:31:33 2018 -0800

    Convert milliseconds to ticks before polling.
---
 hw/battery/src/battery.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/battery/src/battery.c b/hw/battery/src/battery.c
index 2b13266..98a45cf 100644
--- a/hw/battery/src/battery.c
+++ b/hw/battery/src/battery.c
@@ -506,7 +506,8 @@ battery_set_poll_rate_ms_delay(struct os_dev *battery, uint32_t poll_rate,
 
     bat->b_poll_rate = poll_rate;
     bat->b_next_run = os_time_get();
-    os_callout_reset(&battery_manager.bm_poll_callout, start_delay);
+    os_callout_reset(&battery_manager.bm_poll_callout,
+                     os_time_ms_to_ticks32(start_delay));
 
     return 0;
 }