Commit 6f577f41 authored by Omar Gabella's avatar Omar Gabella

KM3NET BROADCAST : TX and RX deltas are irrelevant in broadcast mode but should remain fixed.

parent 7193caef
......@@ -29,7 +29,15 @@ int wrpc_read_calibration_data(struct pp_instance *ppi,
if (clock_period)
*clock_period = state.clock_period;
#ifdef BROADCAST
/* Fixed delays are irrelevant in broadcast but their
* settings should remain fixed.
*
* NB : I'm not sure if this point is relevant due to the rest of
* the modifications for the broadcast version. */
*deltaTx = 0;
*deltaRx = 0;
#else
/* check if tx is calibrated,
* if so read data */
if (state.calib.tx_calibrated) {
......@@ -49,7 +57,7 @@ int wrpc_read_calibration_data(struct pp_instance *ppi,
+ state.calib.delta_rx_board;
} else
return WR_HW_CALIB_NOT_FOUND;
#endif
return WR_HW_CALIB_OK;
}
......
......@@ -197,12 +197,19 @@ int wr_servo_init(struct pp_instance *ppi)
wrp->ops->adjust_phase(s->cur_setpoint);
s->missed_iters = 0;
s->state = WR_UNINITIALIZED;
#ifdef BROADCAST
/* Fixed delays are irrelevant in broadcast but
* their settings should remain fixed. */
s->delta_tx_m = 0;
s->delta_rx_m = 0;
s->delta_tx_s = 0;
s->delta_rx_s = 0;
#else
s->delta_tx_m = delta_to_ps(wrp->otherNodeDeltaTx);
s->delta_rx_m = delta_to_ps(wrp->otherNodeDeltaRx);
s->delta_tx_s = delta_to_ps(wrp->deltaTx);
s->delta_rx_s = delta_to_ps(wrp->deltaRx);
#endif
strcpy(s->servo_state_name, "Uninitialized");
s->flags |= WR_FLAG_VALID;
......
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