A collection of helper functions that contain PID Control code used for object tracking.
int16_t pixy_PID_X |
( |
int16_t |
x, |
|
|
int16_t |
w |
|
) |
| |
Execute one step of PID regulation for the X-servo.
- Parameters
-
x | desired value (e.g. current x-position of the biggest block) |
w | actual value (e.g desired x-position) |
- Returns
- The offset which needs to be added to the X-Servo position
Definition at line 67 of file pixy_control.c.
70 static float esum = 0;
71 static float eold = 0;
int16_t pixy_PID_Y |
( |
int16_t |
x, |
|
|
int16_t |
w |
|
) |
| |
Execute one step of PID regulation for the Y-servo.
- Parameters
-
x | desired value (e.g. current y-position of the biggest block) |
w | actual value (e.g desired y-position) |
- Returns
- The offset which needs to be added to the Y-Servo position
Definition at line 44 of file pixy_control.c.
47 static float esum = 0;
48 static float eold = 0;