Set system time transmission delay during config.
authorFlorian Pose <fp@igh-essen.com>
Thu, 30 Apr 2009 16:04:44 +0000
changeset 1430 97ab86a9b1d7
parent 1429 07969876120f
child 1431 70e891465da1
Set system time transmission delay during config.
master/fsm_slave_config.c
--- a/master/fsm_slave_config.c	Thu Apr 30 15:56:53 2009 +0000
+++ b/master/fsm_slave_config.c	Thu Apr 30 16:04:44 2009 +0000
@@ -438,9 +438,10 @@
                 slave->ring_position, system_time, old_offset,
                 slave->master->app_time, new_offset);
 
-    // set DC system time offset
-    ec_datagram_fpwr(datagram, slave->station_address, 0x0920, 8);
+    // set DC system time offset and transmission delay
+    ec_datagram_fpwr(datagram, slave->station_address, 0x0920, 12);
     EC_WRITE_U64(datagram->data, new_offset);
+	EC_WRITE_U32(datagram->data + 8, slave->transmission_delay);
     fsm->retries = EC_FSM_RETRIES;
     fsm->state = ec_fsm_slave_config_state_dc_write_offset;
 }