Commit 28a5e429 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk Committed by Alessandro Rubini

tests/measure_t24p: preserve right SYNC, Follow_up order

parent 41c3a04f
...@@ -56,6 +56,7 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max, ...@@ -56,6 +56,7 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max,
purge_socket(sock); purge_socket(sock);
i = 0; i = 0;
ts_sync.correct = 0;
while (setpoint <= phase_max) { while (setpoint <= phase_max) {
ptpd_netif_get_dmtd_phase(sock, &phase); ptpd_netif_get_dmtd_phase(sock, &phase);
...@@ -66,7 +67,7 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max, ...@@ -66,7 +67,7 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max,
msgUnpackHeader(buf, &mhdr); msgUnpackHeader(buf, &mhdr);
if (mhdr.messageType == 0) if (mhdr.messageType == 0)
ts_sync = ts_rx; ts_sync = ts_rx;
else if (mhdr.messageType == 8) { else if (mhdr.messageType == 8 && ts_sync.correct == 1) {
MsgFollowUp fup; MsgFollowUp fup;
msgUnpackFollowUp(buf, &fup); msgUnpackFollowUp(buf, &fup);
...@@ -87,6 +88,7 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max, ...@@ -87,6 +88,7 @@ static int meas_phase_range(wr_socket_t * sock, int phase_min, int phase_max,
while (spll_shifter_busy(0)) ; while (spll_shifter_busy(0)) ;
purge_socket(sock); purge_socket(sock);
ts_sync.correct = 0;
i++; i++;
} }
} }
......
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