Keep BLE probe packet cadence on absolute deadlines
This commit is contained in:
1 parent
4c097c0a34
commit
5957e01ae2
1 file changed
+2
-1
@@ -141,9 +141,10 @@ int main(int argc, char** argv) {
|
||||
for (unsigned i = 1; i < packet_size; i++) e->dgram[i] = (uint8_t)(sent + i * 37);
|
||||
if (etcp_send(conn, e)) { queue_dgram_free(e); queue_entry_free(e); failed = 1; }
|
||||
else {
|
||||
sent_at[sent % 64] = get_time_us(); next_send = sent_at[sent % 64] + (uint64_t)interval_ms * 1000;
|
||||
sent_at[sent % 64] = get_time_us();
|
||||
if (!transfer_started) transfer_started = sent_at[sent % 64];
|
||||
sent++;
|
||||
next_send = transfer_started + (uint64_t)sent * interval_ms * 1000;
|
||||
}
|
||||
}
|
||||
uint64_t measured_end = verified == packets ? transfer_finished : get_time_us();
|
||||
|
||||
Reference in new issue
Block a user