Skip to content

Commit 6afae25

Browse files
authored
Merge pull request #1940 from petterreinholdtsen/drop-depricated-axes
Remove deprecated axis and deprecated_axes fields
2 parents fd3ff88 + ffe664c commit 6afae25

17 files changed

Lines changed: 2 additions & 46 deletions

File tree

docs/src/code/code-notes.adoc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,13 +1519,8 @@ FIXME: `axis_mask` and `axes` overspecify the number of axes
15191519
of 0x5, an XYZ machine would have 0x7, and an XYZB machine would
15201520
have an `axis_mask` of 0x17.
15211521

1522-
`status.motion.traj.axes` (deprecated)::
1523-
The value of this variable is one more than the index of the
1524-
highest-numbered axis present on the machine. As in the `axis_mask`,
1525-
the index of X in 0, Y is 1, etc. An XZ machine has `axes` value
1526-
of 3, as does an XYZ machine. An XYZW machine has `axes` value 9.
1527-
This variable is not terribly helpful, and its use is deprecated.
1528-
Use `axis_mask` instead.
1522+
`status.motion.traj.axes` (removed)::
1523+
This value was removed in LinuxCNC version 2.9. Use `axis_mask` instead.
15291524

15301525
`status.motion.traj.joints`::
15311526
A count of the number of joints the machine has. A normal lathe

lib/python/linuxcnc_util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def wait_for_linuxcnc_startup(self, timeout=10.0):
4444
while time.time() - start_time < timeout:
4545
self.status.poll()
4646
if (self.status.angular_units == 0.0) \
47-
or (self.status.axes == 0) \
4847
or (self.status.axis_mask == 0) \
4948
or (self.status.cycle_time == 0.0) \
5049
or (self.status.exec_state != linuxcnc.EXEC_DONE) \

src/emc/nml_intf/emc.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2371,7 +2371,6 @@ void EMC_TRAJ_STAT::update(CMS * cms)
23712371
cms->update(linearUnits);
23722372
cms->update(angularUnits);
23732373
cms->update(cycleTime);
2374-
cms->update(deprecated_axes);
23752374
cms->update(axis_mask);
23762375
cms->update((int *) &mode, 1);
23772376
cms->update(enabled);

src/emc/nml_intf/emc_nml.hh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,10 +1033,6 @@ class EMC_TRAJ_STAT:public EMC_TRAJ_STAT_MSG {
10331033
double cycleTime; // cycle time, in seconds
10341034
int joints; // maximum joint number
10351035
int spindles; // maximum spindle number
1036-
union {
1037-
int deprecated_axes;
1038-
int axes __attribute__((deprecated)); // maximum axis number
1039-
};
10401036
int axis_mask; // mask of axes actually present
10411037
enum EMC_TRAJ_MODE_ENUM mode; // EMC_TRAJ_MODE_FREE,
10421038
// EMC_TRAJ_MODE_COORD

src/emc/nml_intf/emcglb.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ typedef struct TrajConfig_t {
9393
int Spindles;
9494
double MaxAccel;
9595
double MaxVel;
96-
int DeprecatedAxes;
9796
int AxisMask;
9897
double LinearUnits;
9998
double AngularUnits;

src/emc/nml_intf/emcops.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ EMC_TRAJ_STAT_MSG(EMC_TRAJ_STAT_TYPE, sizeof(EMC_TRAJ_STAT)),
5959
angularUnits = 1.0;
6060
cycleTime = 0.0;
6161
joints = 1;
62-
deprecated_axes = 1;
6362
axis_mask = 1;
6463
mode = EMC_TRAJ_MODE_FREE;
6564
enabled = OFF;

src/emc/task/taskintf.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,6 @@ int emcTrajSetAxes(int axismask)
10211021
for(int i=0; i<EMCMOT_MAX_AXIS; i++)
10221022
if(axismask & (1<<i)) axes = i+1;
10231023

1024-
TrajConfig.DeprecatedAxes = axes;
10251024
TrajConfig.AxisMask = axismask;
10261025

10271026
if (emc_debug & EMC_DEBUG_CONFIG) {
@@ -1284,7 +1283,6 @@ int emcTrajInit()
12841283
TrajConfig.Inited = 0;
12851284
TrajConfig.Joints = 0;
12861285
TrajConfig.MaxAccel = DBL_MAX;
1287-
TrajConfig.DeprecatedAxes = 0;
12881286
TrajConfig.AxisMask = 0;
12891287
TrajConfig.LinearUnits = 1.0;
12901288
TrajConfig.AngularUnits = 1.0;
@@ -1545,7 +1543,6 @@ int emcTrajUpdate(EMC_TRAJ_STAT * stat)
15451543

15461544
stat->joints = TrajConfig.Joints;
15471545
stat->spindles = TrajConfig.Spindles;
1548-
stat->deprecated_axes = TrajConfig.DeprecatedAxes;
15491546
stat->axis_mask = TrajConfig.AxisMask;
15501547
stat->linearUnits = TrajConfig.LinearUnits;
15511548
stat->angularUnits = TrajConfig.AngularUnits;

src/emc/task/taskmodule.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ struct TaskWrap : public Task, public bp::wrapper<Task> {
168168

169169
};
170170

171-
typedef pp::array_1_t< EMC_AXIS_STAT, EMCMOT_MAX_AXIS> axis_array, (*axis_w)( EMC_MOTION_STAT &m );
172171
typedef pp::array_1_t< EMC_SPINDLE_STAT, EMCMOT_MAX_SPINDLES> spindle_array, (*spindle_w)( EMC_MOTION_STAT &m );
173172
typedef pp::array_1_t< int, EMCMOT_MAX_DIO> synch_dio_array, (*synch_dio_w)( EMC_MOTION_STAT &m );
174173
typedef pp::array_1_t< double, EMCMOT_MAX_AIO> analog_io_array, (*analog_io_w)( EMC_MOTION_STAT &m );
@@ -185,10 +184,6 @@ static tool_array tool_wrapper ( EMC_TOOL_STAT & t) {
185184
}
186185
#endif //}
187186

188-
static axis_array axis_wrapper ( EMC_MOTION_STAT & m) {
189-
return axis_array(m.axis);
190-
}
191-
192187
static spindle_array spindle_wrapper ( EMC_MOTION_STAT & m) {
193188
return spindle_array(m.spindle);
194189
}
@@ -329,13 +324,10 @@ BOOST_PYTHON_MODULE(emctask) {
329324
.def_readonly("tooltable_filename", &Task::tooltable_filename)
330325
;
331326

332-
#pragma GCC diagnostic push
333-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
334327
class_ <EMC_TRAJ_STAT, boost::noncopyable>("EMC_TRAJ_STAT",no_init)
335328
.def_readwrite("linearUnits", &EMC_TRAJ_STAT::linearUnits )
336329
.def_readwrite("angularUnits", &EMC_TRAJ_STAT::angularUnits )
337330
.def_readwrite("cycleTime", &EMC_TRAJ_STAT::cycleTime )
338-
.def_readwrite("axes", &EMC_TRAJ_STAT::axes )
339331
.def_readwrite("axis_mask", &EMC_TRAJ_STAT::axis_mask )
340332
.def_readwrite("mode", &EMC_TRAJ_STAT::mode )
341333
.def_readwrite("enabled", &EMC_TRAJ_STAT::enabled )
@@ -365,7 +357,6 @@ BOOST_PYTHON_MODULE(emctask) {
365357
.def_readwrite("adaptive_feed_enabled", &EMC_TRAJ_STAT::adaptive_feed_enabled )
366358
.def_readwrite("feed_hold_enabled", &EMC_TRAJ_STAT::feed_hold_enabled )
367359
;
368-
#pragma GCC diagnostic pop
369360
class_ <EMC_JOINT_STAT, boost::noncopyable>("EMC_JOINT_STAT",no_init)
370361
.def_readwrite("units", &EMC_JOINT_STAT::units)
371362
.def_readwrite("backlash", &EMC_JOINT_STAT::backlash)
@@ -414,9 +405,6 @@ BOOST_PYTHON_MODULE(emctask) {
414405

415406
class_ <EMC_MOTION_STAT, boost::noncopyable>("EMC_MOTION_STAT",no_init)
416407
.def_readwrite("traj", &EMC_MOTION_STAT::traj)
417-
.add_property( "axis",
418-
bp::make_function( axis_w(&axis_wrapper),
419-
bp::with_custodian_and_ward_postcall< 0, 1 >()))
420408
.add_property( "spindle",
421409
bp::make_function( spindle_w(&spindle_wrapper),
422410
bp::with_custodian_and_ward_postcall< 0, 1 >()))

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -722,11 +722,6 @@ static PyObject *Stat_tool_table(pyStatChannel *s) {
722722
return res;
723723
}
724724

725-
static PyObject *Stat_axes(pyStatChannel *s) {
726-
PyErr_WarnEx(PyExc_DeprecationWarning, "stat.axes is deprecated and will be removed in the future", 0);
727-
return PyLong_FromLong(s->status.motion.traj.deprecated_axes);
728-
}
729-
730725
// XXX io.tool.toolTable
731726
// XXX EMC_JOINT_STAT motion.joint[]
732727

@@ -761,7 +756,6 @@ static PyGetSetDef Stat_getsetlist[] = {
761756
(char*)"The tooltable, expressed as a list of tools. Each tool is a dict with the\n"
762757
"tool id (tool number), diameter, offsets, etc."
763758
},
764-
{(char*)"axes", (getter)Stat_axes},
765759
{NULL}
766760
};
767761

tests/abort/feed-rate/test-ui.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def wait_for_linuxcnc_startup(status, timeout=10.0):
2323
while time.time() - start_time < timeout:
2424
status.poll()
2525
if (status.angular_units == 0.0) \
26-
or (status.axes == 0) \
2726
or (status.axis_mask == 0) \
2827
or (status.cycle_time == 0.0) \
2928
or (status.exec_state != linuxcnc.EXEC_DONE) \

0 commit comments

Comments
 (0)