projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Support normalized axes in mpu6000 and mmc5983
[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 92b344ed66c8d3a8b367c51f285f6bf75968823f..1960683fa6b214a56cd7fd87800cd1a7c6e7562d 100644
(file)
--- a/
src/drivers/ao_lco_func.c
+++ b/
src/drivers/ao_lco_func.c
@@
-21,15
+21,15
@@
#include <ao_radio_cmac.h>
#include <ao_lco_func.h>
#include <ao_radio_cmac.h>
#include <ao_lco_func.h>
-static
__xdata
struct ao_pad_command command;
-static
__xdata
uint8_t ao_lco_mutex;
+static struct ao_pad_command command;
+static uint8_t ao_lco_mutex;
int8_t
ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset)
{
int8_t r;
int8_t
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;