![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
ManualControl
Dependencies: TPixy-Interface
Fork of MbedOS_Robot_Team by
Diff: PiControlThread.cpp
- Revision:
- 20:9118203f7c9c
- Parent:
- 19:4fbffc755ed7
- Child:
- 21:7fee709bb063
diff -r 4fbffc755ed7 -r 9118203f7c9c PiControlThread.cpp --- a/PiControlThread.cpp Fri Mar 23 19:03:35 2018 +0000 +++ b/PiControlThread.cpp Fri Mar 23 22:10:38 2018 +0000 @@ -86,7 +86,7 @@ // Specify address of the PeriodicInt ISR as PiControllerISR, specify the interval // in seconds between interrupts, and start interrupt generation: - PeriodicInt.attach(&PeriodicInterruptISR, 0.0125); // 12.5ms sampling period -> 80kHz + PeriodicInt.attach(&PeriodicInterruptISR, 0.010); // 10ms sampling period -> 100Hz } @@ -107,8 +107,8 @@ DE0_read(&sensors); // might not be needed - sensors.dp_right = SaturateValue(sensors.dp_right, 140); - sensors.dp_left = SaturateValue(sensors.dp_left, 140); + sensors.dp_right = SaturateValue(sensors.dp_right, 112); + sensors.dp_left = SaturateValue(sensors.dp_left, 112); // Maximum velocity at dPostition = 560 is vel = 703 velR = (float)((6135.92 * sensors.dp_right) / sensors.dt_right) ; @@ -123,8 +123,8 @@ mutexSetpoint.unlock(); // Make sure our limit is not exceeded - setpointR = SaturateValue(setpointR, 140); - setpointL = SaturateValue(setpointL, 140); + setpointR = SaturateValue(setpointR, 112); + setpointL = SaturateValue(setpointL, 112); /*********************Differential End*********************************/