master/fsm_slave_config.c
changeset 2635 42b62867574d
parent 2633 3b61ec73acd2
parent 2608 ec0b5d9a2ff1
child 2663 b101637f503c
equal deleted inserted replaced
2634:f859d567f94e 2635:42b62867574d
  1397 
  1397 
  1398         if (diff_ms >= EC_DC_SYNC_WAIT_MS) {
  1398         if (diff_ms >= EC_DC_SYNC_WAIT_MS) {
  1399             EC_SLAVE_WARN(slave, "Slave did not sync after %lu ms.\n",
  1399             EC_SLAVE_WARN(slave, "Slave did not sync after %lu ms.\n",
  1400                     diff_ms);
  1400                     diff_ms);
  1401         } else {
  1401         } else {
  1402             EC_SLAVE_DBG(slave, 1, "Sync after %4lu ms: %10u ns\n",
  1402             static unsigned long last_diff_ms = 0;
  1403                     diff_ms, abs_sync_diff);
  1403             if ((diff_ms < last_diff_ms) || (diff_ms >= (last_diff_ms + 100))) {
       
  1404                 last_diff_ms = diff_ms;
       
  1405                 EC_SLAVE_DBG(slave, 1, "Sync after %4lu ms: %10u ns\n",
       
  1406                         diff_ms, abs_sync_diff);
       
  1407             }
  1404 
  1408 
  1405             // check synchrony again
  1409             // check synchrony again
  1406             ec_datagram_fprd(datagram, slave->station_address, 0x092c, 4);
  1410             ec_datagram_fprd(datagram, slave->station_address, 0x092c, 4);
  1407             fsm->retries = EC_FSM_RETRIES;
  1411             fsm->retries = EC_FSM_RETRIES;
  1408             return;
  1412             return;