summaryrefslogtreecommitdiff
path: root/src/drivers/ao_lco_func.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-04-30 22:14:37 -0700
committerKeith Packard <keithp@keithp.com>2014-04-30 22:14:37 -0700
commit8e3842660274ac4bcd7b5a78f5db215222b1c4de (patch)
treeb465454a9ba9af402a63020d30b5cec909b92b20 /src/drivers/ao_lco_func.c
parent0223fced2c6d2b9f63ede6258afae46c3f55c200 (diff)
altos: For telelco discovery packets, retry 5 times with shorter timeout
A timeout of 10ms is more than enough to receive a query packet, but if we miss it during device discovery, it's a pain, so retry 5 times to make sure we find everyone. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_lco_func.c')
-rw-r--r--src/drivers/ao_lco_func.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/ao_lco_func.c b/src/drivers/ao_lco_func.c
index a5d28e61..9e642836 100644
--- a/src/drivers/ao_lco_func.c
+++ b/src/drivers/ao_lco_func.c
@@ -36,7 +36,7 @@ ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset)
command.channels = 0;
ao_radio_cmac_send(&command, sizeof (command));
sent_time = ao_time();
- r = ao_radio_cmac_recv(query, sizeof (*query), AO_MS_TO_TICKS(20));
+ r = ao_radio_cmac_recv(query, sizeof (*query), AO_MS_TO_TICKS(10));
if (r == AO_RADIO_CMAC_OK)
*tick_offset = sent_time - query->tick;
ao_mutex_put(&ao_lco_mutex);