Commit 032fdea3 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Updating clock upon reception of data packet.

parent 871a5acd
......@@ -109,11 +109,11 @@ void *receive_data_loop(void *ptr)
prrtPacketType_t packetType = PrrtPacket_type(packet);
if(packetType == PACKET_TYPE_DATA) {
// TODO: make something useful with RTT approximation
PrrtPacketDataPayload *payload = packet->payload;
debug("RTT: %u, Packet Timeout: %u", payload->groupRTT_us, payload->packetTimeout_us);
sock_ptr->lastSentTimestamp = PrrtPacket_get_data_timestamp(packet);
prrtTimestamp_t dataTimestamp = payload->timestamp;
sock_ptr->lastSentTimestamp = dataTimestamp;
PrrtClock_update(sock_ptr->clock, dataTimestamp, payload->groupRTT_us);
check(send_feedback(sock_ptr, remote), "Sending feedback failed.");
......
Markdown is supported
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