Commit f71a2b5a authored by Aurelio Colosimo's avatar Aurelio Colosimo

change WRS_PRESENT_TIMEOUT to 1s

This patch fixes a bug during synchronization between a ppsi slave and a
ppsi master. It was caused by a short timeout while waiting signaling msg
from master in WRS_PRESENT wr-state.
Signed-off-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent f44b3f9a
......@@ -17,7 +17,7 @@ int wr_present(struct pp_instance *ppi, unsigned char *pkt, int plen)
DSPOR(ppi)->portState = PPS_UNCALIBRATED;
DSPOR(ppi)->wrPortState = WRS_PRESENT;
DSPOR(ppi)->wrMode = WR_SLAVE;
pp_timer_start(DSPOR(ppi)->wrStateTimeout,
pp_timer_start(WR_WRS_PRESENT_TIMEOUT_MS,
ppi->timers[PP_TIMER_WRS_PRESENT]);
st_com_restart_annrec_timer(ppi);
e = msg_issue_wrsig(ppi, SLAVE_PRESENT);
......
......@@ -23,6 +23,7 @@
#define WR_DEFAULT_CAL_PATTERN_LEN 0xA /* 10 bits */
#define WR_DEFAULT_STATE_TIMEOUT_MS 300 /* [ms] */
#define WR_WRS_PRESENT_TIMEOUT_MS 1000
#define WR_M_LOCK_TIMEOUT_MS 10000
#define WR_S_LOCK_TIMEOUT_MS 10000
#define WR_DEFAULT_STATE_REPEAT 3
......
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