Commit b5e2e865 authored by Reto Da Forno's avatar Reto Da Forno
Browse files

minor adjustment

parent ce74686d
......@@ -303,7 +303,7 @@ void discosync_rx_done(uint8_t* payload, uint16_t size, int16_t rssi, int8_t sn
rx_done_cnt++;
uint64_t estimated_start_time = radio_get_last_sync_timestamp() -
gloria_timings[DISCOSYNC_MODULATION].txSync -
DISCOSYNC_TX_SYNC -
DISCOSYNC_TX_OFS -
DISCOSYNC_SLOT_TIME * rcvd_pkt->slot_idx;
if (rcvd_pkt->slot_idx >= pkt.slot_idx) {
......
......@@ -94,7 +94,8 @@
#define DISCOSYNC_PKT_LEN 2
#define DISCOSYNC_PKT_TYPE 0xb // 4 random bits
#define DISCOSYNC_SLOT_TIME (2 * DISCOSYNC_TX_OFS + radio_get_toa_hs(DISCOSYNC_PKT_LEN, DISCOSYNC_MODULATION) + gloria_timings[DISCOSYNC_MODULATION].txSync) // Slot duration in hstimer ticks
#define DISCOSYNC_TX_SYNC gloria_timings[DISCOSYNC_MODULATION].txSync
#define DISCOSYNC_SLOT_TIME (2 * DISCOSYNC_TX_OFS + radio_get_toa_hs(DISCOSYNC_PKT_LEN, DISCOSYNC_MODULATION) + DISCOSYNC_TX_SYNC) // Slot duration in hstimer ticks
#define DISCOSYNC_SLOT_TIME_MS (DISCOSYNC_SLOT_TIME / HS_TIMER_FREQUENCY_MS)
......
......@@ -137,7 +137,7 @@ void elwb_wait_until(elwb_time_t timeout)
void elwb_schedule_received_callback(void)
{
ELWB_TIMER_SET(0, 0); /* cancel timer */
ELWB_TIMER_STOP();
elwb_notify();
}
......
......@@ -135,7 +135,7 @@ void lwb_wait_until(lwb_time_t timeout)
void lwb_schedule_received_callback(void)
{
LWB_TIMER_SET(0, 0); /* cancel timer */
LWB_TIMER_STOP();
lwb_notify();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment