Commit 220d1945 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Properly setting group RTT for sending packets.

parent 293d07ce
...@@ -435,7 +435,7 @@ PrrtPacket *PrrtPacket_create_data_packet(uint8_t priority, const void *payloadP ...@@ -435,7 +435,7 @@ PrrtPacket *PrrtPacket_create_data_packet(uint8_t priority, const void *payloadP
packet->payload = dataPayload; packet->payload = dataPayload;
dataPayload->timestamp = PrrtClock_get_current_time(); dataPayload->timestamp = PrrtClock_get_current_time();
dataPayload->groupRTT_us = 95; // TODO: payload->rtt = CURRENT ESTIMATE dataPayload->groupRTT_us = 0;
dataPayload->packetTimeout_us = 110; // TODO: payload->packetTimeout_us = NOW + maximum delay dataPayload->packetTimeout_us = 110; // TODO: payload->packetTimeout_us = NOW + maximum delay
dataPayload->decodingTimeout_us = 150; // TODO: payload->decodingTimeout_us dataPayload->decodingTimeout_us = 150; // TODO: payload->decodingTimeout_us
dataPayload->feedbackTimeout_us = 170; // TODO: payload->feedback_timer dataPayload->feedbackTimeout_us = 170; // TODO: payload->feedback_timer
......
...@@ -82,7 +82,7 @@ void * send_data_loop(void *ptr) { ...@@ -82,7 +82,7 @@ void * send_data_loop(void *ptr) {
PrrtPacketDataPayload* payload = packet->payload; PrrtPacketDataPayload* payload = packet->payload;
// TODO: should lock here ! // TODO: should lock here !
payload->groupRTT_us = (prrtTimedelta_t) (sock_ptr->csi.rttMean / 1000); payload->groupRTT_us = sock_ptr->csi.rttMean;
PrrtPacket* packetToSend = PrrtPacket_copy(packet); PrrtPacket* packetToSend = PrrtPacket_copy(packet);
send_packet(sock_ptr, packetToSend); send_packet(sock_ptr, packetToSend);
......
...@@ -49,8 +49,6 @@ typedef struct prrtSocket { ...@@ -49,8 +49,6 @@ typedef struct prrtSocket {
prrtTimestamp_t lastReceivedTimestamp; prrtTimestamp_t lastReceivedTimestamp;
PrrtChannelStateInformation csi; PrrtChannelStateInformation csi;
prrtTimedelta_t rttMean;
prrtTimedelta_t rttDev;
} PrrtSocket; } PrrtSocket;
......
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