• 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
arch-bare-i386 Loading commit data...
arch-bare-x86-64 Loading commit data...
arch-sim Loading commit data...
arch-unix Loading commit data...
arch-wrpc Loading commit data...
arch-wrs Loading commit data...
configs Loading commit data...
doc Loading commit data...
etc Loading commit data...
include/ppsi Loading commit data...
lib Loading commit data...
lib-bare Loading commit data...
pp_printf Loading commit data...
proto-ext-whiterabbit Loading commit data...
proto-standard Loading commit data...
scripts Loading commit data...
time-bare Loading commit data...
time-sim Loading commit data...
time-unix Loading commit data...
time-wrpc Loading commit data...
time-wrs Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
Kconfig Loading commit data...
MAKEALL Loading commit data...
Makefile Loading commit data...
Makefile.kconfig Loading commit data...
diag.c Loading commit data...
fsm.c Loading commit data...