• Alessandro Rubini's avatar
    wr-servo: fix a synchronization bug · 4070caf1
    Alessandro Rubini authored
    This is likely the result of my cleanup of wr-servo, where I forgot
    some pieces.
    
    Greg collected some interesting logs in wrpc where the setpoint
    was calculated wrongly. This fixes the thing and removes some redundancy.
    
    I "git diff" order:
    
    - avoid WR_UNINITIALIZED, really unused. Do what's needed at
      wr_servo_init() time
    
    - adjust phase to 0 at init time, where s->cur_setpoint is set (we
      really should set and use in a single unified place)
    
    - set delta_ms_prev before entering TRACK_PHASE, not earlier where it
      doesn't fit
    
    - avoid extra checks of non-zero offset.seconds and
    offset.nanoseconds, because they are checked at the beginning anyways.
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    4070caf1
Name
Last commit
Last update
..
Makefile Loading commit data...
common-fun.c Loading commit data...
fsm-table.c Loading commit data...
hooks.c Loading commit data...
state-wr-calibrated.c Loading commit data...
state-wr-calibration.c Loading commit data...
state-wr-link-on.c Loading commit data...
state-wr-locked.c Loading commit data...
state-wr-m-lock.c Loading commit data...
state-wr-present.c Loading commit data...
state-wr-resp-calib-req.c Loading commit data...
state-wr-s-lock.c Loading commit data...
wr-api.h Loading commit data...
wr-constants.h Loading commit data...
wr-msg.c Loading commit data...
wr-servo.c Loading commit data...