@@ -75,7 +75,7 @@ CLIDictItem forceGaugeCLIDict[] = {
75
75
{ "gaugeHelp" , "Description on how to use the force gauge firmware." , cliFunc_gaugeHelp },
76
76
{ "imadaComm" , "Send specific commands to the Imada force gauge. See \033[35mgaugeHelp\033[0m for more details." , cliFunc_imadaComm },
77
77
{ "read" , "Query a force/distance measurement. See \033[35mgaugeHelp\033[0m for more details." , cliFunc_read },
78
- { "start" , "Mark the current distance as the start/end position." , cliFunc_start },
78
+ { "start" , "Mark the current distance as the start/end position, offset is optional ." , cliFunc_start },
79
79
{ "stop" , "Stop free reporting or read loop." , cliFunc_stop },
80
80
{ "zeroForce" , "Zero out the force gauge." , cliFunc_zeroForce },
81
81
{ "zeroPosition" , "Mark the minimum distance for this measurement (bottom)." , cliFunc_zeroPosition },
@@ -589,6 +589,7 @@ void cliFunc_gaugeHelp( char* args )
589
589
" Distance marker \033[35m[start]\033[0m for the start/end of a force curve measurement." NL
590
590
" While in free running mode, a special message is displayed when reaching the \033[35m[start]\033[0m point." NL
591
591
" \033[35m[start]\033[0m is defined by positioning the distance sensor at the position to start and running this command." NL
592
+ " The argument is an offset integer." NL
592
593
);
593
594
}
594
595
@@ -617,8 +618,17 @@ void cliFunc_read( char* args )
617
618
618
619
void cliFunc_start ( char * args )
619
620
{
621
+ // Parse number from argument
622
+ // NOTE: Only first argument is used
623
+ char * arg1Ptr ;
624
+ char * arg2Ptr ;
625
+ argumentIsolation_cli ( args , & arg1Ptr , & arg2Ptr );
626
+
627
+ // Convert the argument into an int
628
+ int offset = decToInt ( arg1Ptr ) + 1 ;
629
+
620
630
// Read the current distance and set the new start/end position
621
- distanceStart = readDistanceGauge ();
631
+ distanceStart = readDistanceGauge () + offset ;
622
632
623
633
print ( NL );
624
634
info_msg ("New start/end position: " );
0 commit comments