Pressure control for drive segment in rebuild of control unit.
Dependencies: mbed QEI FastAnalogIn mbed-rtos FastPWM
Diff: main.cpp
- Revision:
- 4:3bab17dfae4e
- Parent:
- 3:9bd35e5b05ba
- Child:
- 5:4e710cef655e
diff -r 9bd35e5b05ba -r 3bab17dfae4e main.cpp --- a/main.cpp Tue Jan 29 14:57:57 2019 +0000 +++ b/main.cpp Wed Jan 30 13:05:42 2019 +0000 @@ -168,7 +168,7 @@ double dblErrorDot; //filter Variables -int intPosFilOrder = 1; +int intPosFilOrder = 0; int intVelFilOrder = 1; int intDemPosFilOrder = 6; int intDemVelFilOrder = 6; @@ -523,7 +523,7 @@ dblLinearPath = 0.0; } - dblPosD[intDemPosFilOrder] = 0.2*dblLinearPath + 0.8*dblPosD[intDemPosFilOrder]; + dblPosD[intDemPosFilOrder] = 0.07*dblLinearPath + 0.93*dblPosD[intDemPosFilOrder]; //make sure path is safe if (dblPosD[intDemPosFilOrder] > MAX_POSITION_MM) {