NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
void OnRevSyncExPID ( byte  outputs,
char  pwr,
char  turnpct,
const byte  reset,
byte  p,
byte  i,
byte  d 
)
inline

Run motors backward synchronised and reset counters with PID factors.

Run the specified outputs in reverse with regulated synchronization using the specified turn ratio. Specify proportional, integral, and derivative factors.

Parameters
outputsDesired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function.
pwrOutput power, 0 to 100. Can be negative to reverse direction.
turnpctTurn ratio, -100 to 100. The direction of your vehicle will depend on its construction.
resetPosition counters reset control. It must be a constant, see Tachometer counter reset flags.
pProportional factor used by the firmware's PID motor control algorithm. See PID constants.
iIntegral factor used by the firmware's PID motor control algorithm. See PID constants.
dDerivative factor used by the firmware's PID motor control algorithm. See PID constants.
Examples:
ex_onrevsyncexpid.nxc.