|
#define RotateMotorPID |
( |
_ports, |
|
|
_pwr, |
|
|
_angle, |
|
|
_p, |
|
|
_i, |
|
|
_d |
|
) |
__RotateMotorExPID(_ports, _pwr, _angle, 0, FALSE, TRUE, _p, _i, _d) |
Rotate motor with PID factors.
Run the specified outputs forward for the specified number of degrees. Specify proportional, integral, and derivative factors.
- Parameters:
-
| _ports | Desired 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. |
| _pwr | Output power, 0 to 100. Can be negative to reverse direction. |
| _angle | Angle limit, in degree. Can be negative to reverse direction. |
| _p | Proportional factor used by the firmware's PID motor control algorithm. See PID constants. |
| _i | Integral factor used by the firmware's PID motor control algorithm. See PID constants. |
| _d | Derivative factor used by the firmware's PID motor control algorithm. See PID constants. |
|