Skip to content

Commit 5ac53b4

Browse files
committed
renamed variable, added missing update in CMS
1 parent 9ef0943 commit 5ac53b4

5 files changed

Lines changed: 44 additions & 43 deletions

File tree

docs/src/config/python-interface.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ see <<python:reading-ini-values,ReadingINI file values>> for an example.
278278
*paused*:: '(returns boolean)' -
279279
`motion paused` flag.
280280

281-
*stepping*:: '(returns boolean)' -
282-
`motion stepping` flag.
281+
*single_stepping*:: '(returns boolean)' -
282+
`motion single_stepping` flag.
283283

284284
*pocket_prepped*:: '(returns integer)' -
285285
A Tx command completed, and this pocket is prepared. -1 if no

src/emc/nml_intf/emc.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,6 +1702,7 @@ void EMC_TRAJ_STAT::update(CMS * cms)
17021702
cms->update(queueFull);
17031703
cms->update(id);
17041704
cms->update(paused);
1705+
cms->update(single_stepping);
17051706
cms->update(scale);
17061707
cms->update(rapid_scale);
17071708
EmcPose_update(cms, &position);

src/emc/nml_intf/emc_nml.hh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,8 @@ class EMC_TRAJ_SET_TERM_COND:public EMC_TRAJ_CMD_MSG {
794794
void update(CMS * cms);
795795

796796
int cond;
797-
double tolerance; // used to set the precision/tolerance of path deviation
798-
// during CONTINUOUS motion mode.
797+
double tolerance; // used to set the precision/tolerance of path deviation
798+
// during CONTINUOUS motion mode.
799799
};
800800

801801
class EMC_TRAJ_SET_SPINDLESYNC:public EMC_TRAJ_CMD_MSG {
@@ -984,7 +984,7 @@ class EMC_TRAJ_STAT:public EMC_TRAJ_STAT_MSG {
984984
bool queueFull; // non-zero means can't accept another motion
985985
int id; // id of the currently executing motion
986986
bool paused; // non-zero means motion paused
987-
bool stepping; // non-zero means motion stepping single block
987+
bool single_stepping; // non-zero means motion stepping single block
988988
double scale; // velocity scale factor
989989
double rapid_scale; // rapid scale factor
990990
//double spindle_scale; // moved to EMC_SPINDLE_STAT
@@ -1380,7 +1380,7 @@ class EMC_TASK_PLAN_SET_OPTIONAL_STOP:public EMC_TASK_CMD_MSG {
13801380
// Sub-class update() calls base-class update()
13811381
// cppcheck-suppress duplInheritedMember
13821382
void update(CMS * cms);
1383-
1383+
13841384
bool state; //state == ON, optional stop is on (e.g. we stop on any stops)
13851385
};
13861386

@@ -1395,7 +1395,7 @@ class EMC_TASK_PLAN_SET_BLOCK_DELETE:public EMC_TASK_CMD_MSG {
13951395
// Sub-class update() calls base-class update()
13961396
// cppcheck-suppress duplInheritedMember
13971397
void update(CMS * cms);
1398-
1398+
13991399
bool state; //state == ON, block delete is on, we ignore lines starting with "/"
14001400
};
14011401

@@ -1409,7 +1409,7 @@ class EMC_TASK_PLAN_OPTIONAL_STOP:public EMC_TASK_CMD_MSG {
14091409
// Sub-class update() calls base-class update()
14101410
// cppcheck-suppress duplInheritedMember
14111411
void update(CMS * cms);
1412-
1412+
14131413
};
14141414

14151415

@@ -1461,7 +1461,7 @@ class EMC_TASK_STAT:public EMC_TASK_STAT_MSG {
14611461
double activeSettings[ACTIVE_SETTINGS];
14621462
CANON_UNITS programUnits; // CANON_UNITS_INCHES, MM, CM
14631463

1464-
int interpreter_errcode; // return value from rs274ngc function
1464+
int interpreter_errcode; // return value from rs274ngc function
14651465
// (only useful for new interpreter.)
14661466
int task_paused; // non-zero means task is paused
14671467
double delayLeft; // delay time left of G4, M66..
@@ -1748,7 +1748,7 @@ class EMC_SPINDLE_ORIENT:public EMC_SPINDLE_CMD_MSG {
17481748

17491749
int spindle;
17501750
double orientation; // desired spindle position
1751-
int mode;
1751+
int mode;
17521752
};
17531753

17541754
class EMC_SPINDLE_WAIT_ORIENT_COMPLETE:public EMC_SPINDLE_CMD_MSG {

src/emc/task/emctaskmain.cc

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Author:
88
* License: GPL Version 2
99
* System: Linux
10-
*
10+
*
1111
* Copyright (c) 2004 All rights reserved.
1212
*
1313
********************************************************************/
@@ -217,7 +217,7 @@ int emcOperatorError(const char *fmt, ...)
217217
error_msg.error[0] = 0;
218218
// append error string
219219
va_start(ap, fmt);
220-
vsnprintf(&error_msg.error[strlen(error_msg.error)],
220+
vsnprintf(&error_msg.error[strlen(error_msg.error)],
221221
sizeof(error_msg.error) - strlen(error_msg.error), fmt, ap);
222222
va_end(ap);
223223

@@ -466,7 +466,7 @@ static int checkInterpList(NML_INTERP_LIST * il, EMC_STAT * /*stat*/)
466466
emcOperatorError("%s", error_msg->error);
467467
break;
468468
}
469-
469+
470470
//FIXME: there was limit checking tests below, see if they were needed
471471
case EMC_TRAJ_LINEAR_MOVE_TYPE:
472472
break;
@@ -535,7 +535,7 @@ void readahead_reading(void)
535535
EMC_TASK_INTERP::WAITING;
536536
interp_list.clear();
537537
emcAbortCleanup(EMC_ABORT::INTERPRETER_ERROR,
538-
"interpreter error");
538+
"interpreter error");
539539
} else if (execRetval == -1
540540
|| execRetval == INTERP_EXIT ) {
541541
emcStatus->task.interpState =
@@ -585,7 +585,7 @@ void readahead_reading(void)
585585

586586
if (emcStatus->task.readLine < programStartLine &&
587587
emcTaskPlanLevel() == 0) {
588-
588+
589589
//update the position with our current position, as the other positions are only skipped through
590590
CANON_UPDATE_END_POINT(emcStatus->motion.traj.actualPosition.tran.x,
591591
emcStatus->motion.traj.actualPosition.tran.y,
@@ -648,7 +648,7 @@ static void mdi_execute_hook(void)
648648
emcTaskCommand == 0 &&
649649
emcStatus->task.execState ==
650650
EMC_TASK_EXEC::DONE) {
651-
emcTaskPlanClearWait();
651+
emcTaskPlanClearWait();
652652
mdi_execute_wait = 0;
653653
mdi_execute_hook();
654654
}
@@ -670,11 +670,11 @@ static void mdi_execute_hook(void)
670670
// determine when a MDI command actually finishes normally.
671671
if (interp_list.len() == 0 &&
672672
emcTaskCommand == 0 &&
673-
emcStatus->task.execState == EMC_TASK_EXEC::DONE &&
674-
emcStatus->task.interpState != EMC_TASK_INTERP::IDLE &&
673+
emcStatus->task.execState == EMC_TASK_EXEC::DONE &&
674+
emcStatus->task.interpState != EMC_TASK_INTERP::IDLE &&
675675
emcStatus->motion.traj.queue == 0 &&
676-
emcStatus->io.status == RCS_STATUS::DONE &&
677-
!mdi_execute_wait &&
676+
emcStatus->io.status == RCS_STATUS::DONE &&
677+
!mdi_execute_wait &&
678678
!mdi_execute_next) {
679679

680680
// finished. Check for dequeuing of queued MDI command is done in emcTaskPlan().
@@ -1076,7 +1076,7 @@ static int emcTaskPlan(void)
10761076
case EMC_TASK_PLAN_STEP_TYPE:
10771077
// handles case where first action is to step the program
10781078
taskPlanRunCmd.line = 0; // run from start
1079-
/*! \todo FIXME-- can have GUI set this; send a run instead of a
1079+
/*! \todo FIXME-- can have GUI set this; send a run instead of a
10801080
step */
10811081
retval = emcTaskIssueCommand(&taskPlanRunCmd);
10821082
if(retval != 0) break;
@@ -1174,7 +1174,7 @@ static int emcTaskPlan(void)
11741174
break;
11751175

11761176
case EMC_TASK_PLAN_STEP_TYPE:
1177-
emcStatus->motion.traj.stepping = 1;
1177+
emcStatus->motion.traj.single_stepping = 1;
11781178
stepping = 1; // set stepping mode in case it's not
11791179
steppingWait = 0; // clear the wait
11801180
break;
@@ -1189,7 +1189,7 @@ static int emcTaskPlan(void)
11891189

11901190
// handle interp readahead logic
11911191
readahead_reading();
1192-
1192+
11931193
break; // EMC_TASK_INTERP::READING
11941194

11951195
case EMC_TASK_INTERP::PAUSED: // ON, AUTO, PAUSED
@@ -1250,7 +1250,7 @@ static int emcTaskPlan(void)
12501250
break;
12511251

12521252
case EMC_TASK_PLAN_STEP_TYPE:
1253-
emcStatus->motion.traj.stepping = 1;
1253+
emcStatus->motion.traj.single_stepping = 1;
12541254
stepping = 1;
12551255
steppingWait = 0;
12561256
if (emcStatus->motion.traj.paused &&
@@ -1326,7 +1326,7 @@ static int emcTaskPlan(void)
13261326
break;
13271327

13281328
case EMC_TASK_PLAN_STEP_TYPE:
1329-
emcStatus->motion.traj.stepping = 1;
1329+
emcStatus->motion.traj.single_stepping = 1;
13301330
stepping = 1; // set stepping mode in case it's not
13311331
steppingWait = 0; // clear the wait
13321332
break;
@@ -1895,10 +1895,10 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
18951895

18961896
case EMC_TRAJ_PROBE_TYPE:
18971897
retval = emcTrajProbe(
1898-
((EMC_TRAJ_PROBE *) cmd)->pos,
1898+
((EMC_TRAJ_PROBE *) cmd)->pos,
18991899
((EMC_TRAJ_PROBE *) cmd)->type,
19001900
((EMC_TRAJ_PROBE *) cmd)->vel,
1901-
((EMC_TRAJ_PROBE *) cmd)->ini_maxvel,
1901+
((EMC_TRAJ_PROBE *) cmd)->ini_maxvel,
19021902
((EMC_TRAJ_PROBE *) cmd)->acc,
19031903
((EMC_TRAJ_PROBE *) cmd)->probe_type);
19041904
break;
@@ -1910,7 +1910,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
19101910
emcAuxInputWaitIndex = -1;
19111911
taskExecDelayTimeout = 0.0;
19121912
} else {
1913-
emcAuxInputWaitType = emcAuxInputWaitMsg->wait_type; // remember what we are waiting for
1913+
emcAuxInputWaitType = emcAuxInputWaitMsg->wait_type; // remember what we are waiting for
19141914
emcAuxInputWaitIndex = emcAuxInputWaitMsg->index; // remember the input to look at
19151915
emcStatus->task.input_timeout = 2; // set timeout flag, gets cleared if input changes before timeout happens
19161916
// set the timeout clock to expire at 'now' + delay time
@@ -1927,7 +1927,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
19271927
emcTrajUpdateTag(((EMC_TRAJ_LINEAR_MOVE *) cmd)->tag);
19281928
retval = emcTrajRigidTap(((EMC_TRAJ_RIGID_TAP *) cmd)->pos,
19291929
((EMC_TRAJ_RIGID_TAP *) cmd)->vel,
1930-
((EMC_TRAJ_RIGID_TAP *) cmd)->ini_maxvel,
1930+
((EMC_TRAJ_RIGID_TAP *) cmd)->ini_maxvel,
19311931
((EMC_TRAJ_RIGID_TAP *) cmd)->acc,
19321932
((EMC_TRAJ_RIGID_TAP *) cmd)->scale);
19331933
break;
@@ -2126,7 +2126,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
21262126
// clear out the interpreter state
21272127
emcStatus->task.interpState = EMC_TASK_INTERP::IDLE;
21282128
emcStatus->task.execState = EMC_TASK_EXEC::DONE;
2129-
emcStatus->motion.traj.stepping = 0;
2129+
emcStatus->motion.traj.single_stepping = 0;
21302130
stepping = 0;
21312131
steppingWait = 0;
21322132

@@ -2221,7 +2221,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
22212221
break;
22222222

22232223
case EMC_TASK_PLAN_EXECUTE_TYPE:
2224-
emcStatus->motion.traj.stepping = 0;
2224+
emcStatus->motion.traj.single_stepping = 0;
22252225
stepping = 0;
22262226
steppingWait = 0;
22272227
execute_msg = (EMC_TASK_PLAN_EXECUTE *) cmd;
@@ -2317,7 +2317,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
23172317
retval = -1;
23182318
break;
23192319
}
2320-
emcStatus->motion.traj.stepping = 0;
2320+
emcStatus->motion.traj.single_stepping = 0;
23212321
stepping = 0;
23222322
steppingWait = 0;
23232323
if (!taskplanopen && emcStatus->task.file[0] != 0) {
@@ -2366,7 +2366,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
23662366
emcTrajResume();
23672367
emcStatus->task.interpState = interpResumeState;
23682368
emcStatus->task.task_paused = 0;
2369-
emcStatus->motion.traj.stepping = 0;
2369+
emcStatus->motion.traj.single_stepping = 0;
23702370
stepping = 0;
23712371
steppingWait = 0;
23722372
retval = 0;
@@ -2597,7 +2597,7 @@ static int emcTaskExecute(void)
25972597
// clear out the interpreter state
25982598
emcStatus->task.interpState = EMC_TASK_INTERP::IDLE;
25992599
emcStatus->task.execState = EMC_TASK_EXEC::DONE;
2600-
emcStatus->motion.traj.stepping = 0;
2600+
emcStatus->motion.traj.single_stepping = 0;
26012601
stepping = 0;
26022602
steppingWait = 0;
26032603

@@ -2746,7 +2746,7 @@ static int emcTaskExecute(void)
27462746
}
27472747
// delay can be also be because we wait for an input
27482748
// if the index is set (not -1)
2749-
if (emcAuxInputWaitIndex >= 0) {
2749+
if (emcAuxInputWaitIndex >= 0) {
27502750
switch (emcAuxInputWaitType) {
27512751
case WAIT_MODE_HIGH:
27522752
if (emcStatus->motion.synch_di[emcAuxInputWaitIndex] != 0) {
@@ -2757,12 +2757,12 @@ static int emcTaskExecute(void)
27572757
}
27582758
break;
27592759

2760-
case WAIT_MODE_RISE:
2760+
case WAIT_MODE_RISE:
27612761
if (emcStatus->motion.synch_di[emcAuxInputWaitIndex] == 0) {
27622762
emcAuxInputWaitType = WAIT_MODE_HIGH;
27632763
}
27642764
break;
2765-
2765+
27662766
case WAIT_MODE_LOW:
27672767
if (emcStatus->motion.synch_di[emcAuxInputWaitIndex] == 0) {
27682768
emcStatus->task.input_timeout = 0; // clear timeout flag
@@ -2784,7 +2784,7 @@ static int emcTaskExecute(void)
27842784
emcStatus->task.execState = EMC_TASK_EXEC::DONE;
27852785
emcStatus->task.delayLeft = 0;
27862786
break;
2787-
2787+
27882788
default:
27892789
emcOperatorError("Unknown Wait Mode");
27902790
}
@@ -3443,7 +3443,7 @@ int main(int argc, char *argv[])
34433443

34443444
// check for subordinate errors, and halt task if so
34453445
if ( emcStatus->motion.status == RCS_STATUS::ERROR
3446-
&& emcStatus->motion.on_soft_limit) {
3446+
&& emcStatus->motion.on_soft_limit) {
34473447
if (!gave_soft_limit_message) {
34483448
emcOperatorError("On Soft Limit");
34493449
// if gui does not provide a means to switch to joint mode
@@ -3472,7 +3472,7 @@ int main(int argc, char *argv[])
34723472
}
34733473
// motion already should have reported this condition (and set RCS_STATUS::ERROR?)
34743474
// an M19 orient failed to complete within timeout
3475-
// if ((emcStatus->motion.status == RCS_STATUS::ERROR) &&
3475+
// if ((emcStatus->motion.status == RCS_STATUS::ERROR) &&
34763476
// (emcStatus->motion.spindle.orient_state == EMCMOT_ORIENT_FAULTED) &&
34773477
// (emcStatus->motion.spindle.orient_fault != 0)) {
34783478
// emcOperatorError("wait for orient complete timed out");
@@ -3505,7 +3505,7 @@ int main(int argc, char *argv[])
35053505
// clear out the interpreter state
35063506
emcStatus->task.interpState = EMC_TASK_INTERP::IDLE;
35073507
emcStatus->task.execState = EMC_TASK_EXEC::DONE;
3508-
emcStatus->motion.traj.stepping = 0;
3508+
emcStatus->motion.traj.single_stepping = 0;
35093509
stepping = 0;
35103510
steppingWait = 0;
35113511

src/emc/usr_intf/axis/extensions/emcmodule.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static PyMemberDef Stat_members[] = {
466466
{(char*)"queue_full", T_BOOL, O(motion.traj.queueFull), READONLY, NULL},
467467
{(char*)"motion_id", T_INT, O(motion.traj.id), READONLY, NULL},
468468
{(char*)"paused", T_BOOL, O(motion.traj.paused), READONLY, NULL},
469-
{(char*)"stepping", T_BOOL, O(motion.traj.stepping), READONLY, NULL},
469+
{(char*)"single_stepping", T_BOOL, O(motion.traj.single_stepping), READONLY, NULL},
470470
{(char*)"feedrate", T_DOUBLE, O(motion.traj.scale), READONLY, NULL},
471471
{(char*)"rapidrate", T_DOUBLE, O(motion.traj.rapid_scale), READONLY, NULL},
472472
{(char*)"velocity", T_DOUBLE, O(motion.traj.velocity), READONLY, NULL},
@@ -2593,7 +2593,7 @@ static struct PyModuleDef linuxcnc_moduledef = {
25932593
PyMODINIT_FUNC PyInit_linuxcnc(void);
25942594
PyMODINIT_FUNC PyInit_linuxcnc(void)
25952595
{
2596-
2596+
25972597
verbose_nml_error_messages = 0;
25982598
clear_rcs_print_flag(~0);
25992599

0 commit comments

Comments
 (0)