On Mon, Mar 18, 2019 at 03:51:30PM -0700, Vedang Patel wrote:
> @@ -98,8 +114,21 @@ double servo_sample(struct servo *servo,
>
> r = servo->sample(servo, offset, local_ts, weight, state);
>
> - if (*state != SERVO_UNLOCKED)
> + switch (*state) {
> + case SERVO_UNLOCKED:
> + servo->curr_offset_values = servo->num_offset_values;
> + break;
> + case SERVO_LOCKED:
> + if (check_offset_threshold(servo, offset)) {
> + *state = SERVO_LOCKED_STABLE;
> + }
> + /* fall through. */
> + case SERVO_JUMP:
> servo->first_update = 0;
> + break;
> + case SERVO_LOCKED_STABLE:
Once you are in this state, and the offset exceeds the threshold,
shouldn't the FSM transition back to SERVO_LOCKED?
In this case I would expect the slave to request the higher Sync rate
once again.
Thoughts?
Thanks,
Richard
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel