@@ -416,7 +416,7 @@ typedef enum {
416416 scProgramAngularUnits, scUserLinearUnits, scUserAngularUnits, scDisplayLinearUnits,
417417 scDisplayAngularUnits, scLinearUnitConversion, scAngularUnitConversion, scProbeClear,
418418 scProbeTripped, scProbeValue, scProbe, scTeleopEnable, scKinematicsType, scOverrideLimits,
419- scSpindleOverride, scOptionalStop, scUnknown
419+ scSpindleOverride, scOptionalStop, scSetWait, scUnknown
420420 } cmdTokenType;
421421
422422typedef enum {
@@ -465,7 +465,7 @@ const char *cmdTokens[] = {
465465 " USER_LINEAR_UNITS" , " USER_ANGULAR_UNITS" , " DISPLAY_LINEAR_UNITS" , " DISPLAY_ANGULAR_UNITS" ,
466466 " LINEAR_UNIT_CONVERSION" , " ANGULAR_UNIT_CONVERSION" , " PROBE_CLEAR" , " PROBE_TRIPPED" ,
467467 " PROBE_VALUE" , " PROBE" , " TELEOP_ENABLE" , " KINEMATICS_TYPE" , " OVERRIDE_LIMITS" ,
468- " SPINDLE_OVERRIDE" , " OPTIONAL_STOP" , " " };
468+ " SPINDLE_OVERRIDE" , " OPTIONAL_STOP" , " SET_WAIT " , " " };
469469
470470const char *commands[] = {" HELLO" , " SET" , " GET" , " QUIT" , " SHUTDOWN" , " HELP" , " " };
471471
@@ -776,6 +776,13 @@ static cmdResponseType setWaitMode(connectionRecType *context)
776776 return rtNoError;
777777}
778778
779+ /* compatibility wrapper to deprecate set_wait command token - @todo remove at some point */
780+ static cmdResponseType setSetWait (connectionRecType *context)
781+ {
782+ dprintf (context->cliSock , " WARNING: \" set_wait\" command is depreciated and will be removed in the future. Please use \" wait_mode\" instead.\n " );
783+ return setWaitMode (context);
784+ }
785+
779786static cmdResponseType setMachine (connectionRecType *context)
780787{
781788 char *s = strtok (NULL , delims);
@@ -1457,6 +1464,7 @@ int commandSet(connectionRecType *context)
14571464 case scPlat: break ;
14581465 case scIni: break ;
14591466 case scDebug: ret = setDebug (context); break ;
1467+ case scSetWait: ret = setSetWait (context); break ; // remove this: deprecation alias for scWaitMode.
14601468 case scWaitMode: ret = setWaitMode (context); break ;
14611469 case scWait: ret = setWait (context); break ;
14621470 case scSetTimeout: ret = setTimeout (context); break ;
@@ -1611,6 +1619,13 @@ static cmdResponseType getWaitMode(connectionRecType *context)
16111619 return rtNoError;
16121620}
16131621
1622+ /* compatibility wrapper to deprecate set_wait command token - @todo remove at some point */
1623+ static cmdResponseType getSetWait (connectionRecType *context)
1624+ {
1625+ dprintf (context->cliSock , " WARNING: \" set_wait\" command is depreciated and will be removed in the future. Please use \" wait_mode\" instead.\n " );
1626+ return getWaitMode (context);
1627+ }
1628+
16141629static cmdResponseType getPlat (connectionRecType *context)
16151630{
16161631 OUT (" PLAT Linux" );
@@ -2579,6 +2594,7 @@ int commandGet(connectionRecType *context)
25792594 case scPlat: ret = getPlat (context); break ;
25802595 case scIni: break ;
25812596 case scDebug: ret = getDebug (context); break ;
2597+ case scSetWait: ret = getSetWait (context); break ; // remove this: deprecation alias for scWaitMode.
25822598 case scWaitMode: ret = getWaitMode (context); break ;
25832599 case scWait: break ;
25842600 case scSetTimeout: ret = getTimeout (context); break ;
0 commit comments