Library version for DC_Stepper_Controller_Lib with PWM speed control

Dependencies:   mbed QEI PID

Dependents:   DR-ArmServoTest Auto_DC_pick_class MBed_TR1 ros_button_2021

Revision:
17:3df885fa2ea9
Parent:
16:3a1b95e2ecb8
--- a/DC_Motor_Controller.cpp	Thu Jun 03 07:41:52 2021 +0000
+++ b/DC_Motor_Controller.cpp	Wed Jun 09 02:38:41 2021 +0000
@@ -23,7 +23,7 @@
         direction = tar_pulse > cur_pulse; // cw 1 ; acw 0
       
         // if margin of error is less than +-3 (+- 1 degree), give up 
-        if(abs(tar_pulse - cur_pulse) < 10)
+        if(abs(tar_pulse - cur_pulse) < 5)
         {
             #ifdef DEBUG_MODE 
             device.printf("GIVEUP ");
@@ -88,7 +88,7 @@
             device.printf("PID NOT SET BUT CALLED! NULL POINTER ");
         #endif
         // if margin of error is less than +-3 (+- 1 degree), give up 
-        if(abs(tar_pulse - cur_pulse) < 2)
+        if(abs(tar_pulse - cur_pulse) < 5)
         {
             #ifdef DEBUG_MODE 
             device.printf("GIVEUP ");