altos: For telelco discovery packets, retry 5 times with shorter timeout
[fw/altos] / src / drivers / ao_lco_func.c
index 99e58b76f872bc014e992ae622242cce1bc80701..9e64283696eaf3c25c68510764e57c79750ca1f4 100644 (file)
@@ -26,7 +26,6 @@ static __xdata uint8_t                        ao_lco_mutex;
 int8_t
 ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset)
 {
-       uint8_t         i;
        int8_t          r;
        uint16_t        sent_time;
 
@@ -37,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);