Reduce frequency of DC Sync debug messages
This commit is contained in:
parent
42745f4ebb
commit
f9dfaf3f9b
|
|
@ -54,7 +54,7 @@
|
|||
// uint8_t reserved
|
||||
// uint32_t PacketNo, Password, ErrorCode
|
||||
|
||||
//#define DEBUG_FOE
|
||||
#define DEBUG_FOE
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1399,8 +1399,12 @@ void ec_fsm_slave_config_state_dc_sync_check(
|
|||
EC_SLAVE_WARN(slave, "Slave did not sync after %lu ms.\n",
|
||||
diff_ms);
|
||||
} else {
|
||||
EC_SLAVE_DBG(slave, 1, "Sync after %4lu ms: %10u ns\n",
|
||||
diff_ms, abs_sync_diff);
|
||||
static unsigned long last_diff_ms = 0;
|
||||
if ((diff_ms < last_diff_ms) || (diff_ms >= (last_diff_ms + 100))) {
|
||||
last_diff_ms = diff_ms;
|
||||
EC_SLAVE_DBG(slave, 1, "Sync after %4lu ms: %10u ns\n",
|
||||
diff_ms, abs_sync_diff);
|
||||
}
|
||||
|
||||
// check synchrony again
|
||||
ec_datagram_fprd(datagram, slave->station_address, 0x092c, 4);
|
||||
|
|
|
|||
Loading…
Reference in New Issue