Mid level control code

Dependencies:   ros_lib_kinetic

Revision:
15:59471daef4cb
Parent:
14:54c3759e76ed
Child:
16:1e2804a4e5bd
--- a/main.cpp	Wed Aug 29 16:31:42 2018 +0000
+++ b/main.cpp	Fri Aug 31 13:54:50 2018 +0000
@@ -121,7 +121,7 @@
             if( dblTargetChambLen_mm[ii] < 0.0 ) continue;
             //check to see if positions are achievable
             dblTargetActPos_mm[ii] = dblTargetChambLen_mm[ii]*FLT_ACTUATOR_CONVERSION[ii];
-            dblTargetActPos_mm[ii] = min( max( 0.0 , dblTargetActPos_mm[ii] ) , 25.0 );
+            dblTargetActPos_mm[ii] = min( max( 0.0 , dblTargetActPos_mm[ii] ) , 40.0 );
             //!! LIMIT CHAMBER LENGTHS TOO
         }
         // Calculate achievable velocities, and hence time, for the requested move to complete within tolerance
@@ -233,7 +233,7 @@
                 dblVelocity_mmps[jj] = 0.0; // Stop linear path generation when linear path is within tolerance of target position
             }
             dblLinearPathCurrentPos_mm[jj] = dblLinearPathCurrentPos_mm[jj] + dblVelocity_mmps[jj]*dblMeasuredSampleTime;
-            dblLinearPathCurrentPos_mm[jj] = min( max( 0.0 , dblLinearPathCurrentPos_mm[jj] ) , 25.0 );
+            dblLinearPathCurrentPos_mm[jj] = min( max( 0.0 , dblLinearPathCurrentPos_mm[jj] ) , 40.0 );
             mutPathIn.unlock(); // Unlock relevant mutex
             
             // Calculate next step in smooth path