projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Use AO_TICK_TYPE/AO_TICK_SIGNED for lco/pad code
[fw/altos]
/
src
/
drivers
/
ao_lco_func.c
diff --git
a/src/drivers/ao_lco_func.c
b/src/drivers/ao_lco_func.c
index 06350694145d4bda978ac894eb2a011160543ada..1960683fa6b214a56cd7fd87800cd1a7c6e7562d 100644
(file)
--- a/
src/drivers/ao_lco_func.c
+++ b/
src/drivers/ao_lco_func.c
@@
-28,8
+28,8
@@
int8_t
ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset)
{
int8_t r;
ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset)
{
int8_t r;
-
uint16_t
sent_time;
-
uint16_t
timeout = AO_MS_TO_TICKS(10);
+
AO_TICK_TYPE
sent_time;
+
AO_TICK_TYPE
timeout = AO_MS_TO_TICKS(10);
#if HAS_RADIO_RATE
switch (ao_config.radio_rate) {
#if HAS_RADIO_RATE
switch (ao_config.radio_rate) {
@@
-62,7
+62,7
@@
void
ao_lco_arm(uint16_t box, uint8_t channels, uint16_t tick_offset)
{
ao_mutex_get(&ao_lco_mutex);
ao_lco_arm(uint16_t box, uint8_t channels, uint16_t tick_offset)
{
ao_mutex_get(&ao_lco_mutex);
- command.tick = ao_time() - tick_offset;
+ command.tick =
(uint16_t)
ao_time() - tick_offset;
command.box = box;
command.cmd = AO_PAD_ARM;
command.channels = channels;
command.box = box;
command.cmd = AO_PAD_ARM;
command.channels = channels;