• Alessandro Rubini's avatar
    standard servo: bugfix (introduced with pp_time) · cfed2306
    Alessandro Rubini authored
    If meanPathDelay is calculated negative at the first iteration, we
    must zero it immediately, or this will loop forever:
    
    	while (mpd_fltr->y >> (63 - s))
    		--s;
    
    The bug only appears with e2e mechanism, where t3 happens long after
    t2, if the slave clock when ppsi starts is running much slower than
    the master.
    
    Before changing data structures we used abs() in that loop (which was
    suboptimal), and I made a mistake in converting it in a check before
    the loop itlsef.
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    cfed2306
Name
Last commit
Last update
..
Makefile Loading commit data...
README-cfield Loading commit data...
arith.c Loading commit data...
bmc.c Loading commit data...
common-fun.c Loading commit data...
common-fun.h Loading commit data...
fsm-lib.c Loading commit data...
fsm-table.c Loading commit data...
hooks.c Loading commit data...
msg.c Loading commit data...
open-close.c Loading commit data...
servo.c Loading commit data...
state-disabled.c Loading commit data...
state-faulty.c Loading commit data...
state-initializing.c Loading commit data...
state-listening.c Loading commit data...
state-master.c Loading commit data...
state-passive.c Loading commit data...
state-slave.c Loading commit data...
state-uncalibrated.c Loading commit data...