Skip to content

Commit d6b7997

Browse files
authored
Merge pull request #508 from KurtJacobson/multispindle_brake
fix #505: add optional spindle num argument to py interface `command.brake` method
2 parents aca39d5 + 9933ccd commit d6b7997

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,17 +1022,20 @@ static PyObject *flood(pyCommandChannel *s, PyObject *o) {
10221022

10231023
static PyObject *brake(pyCommandChannel *s, PyObject *o) {
10241024
int dir;
1025-
if(!PyArg_ParseTuple(o, "i", &dir)) return NULL;
1025+
int spindle = 0;
1026+
if(!PyArg_ParseTuple(o, "i|i", &dir, &spindle)) return NULL;
10261027
switch(dir) {
10271028
case LOCAL_BRAKE_ENGAGE:
10281029
{
10291030
EMC_SPINDLE_BRAKE_ENGAGE m;
1031+
m.spindle = spindle;
10301032
emcSendCommand(s, m);
10311033
}
10321034
break;
10331035
case LOCAL_BRAKE_RELEASE:
10341036
{
10351037
EMC_SPINDLE_BRAKE_RELEASE m;
1038+
m.spindle = spindle;
10361039
emcSendCommand(s, m);
10371040
}
10381041
break;

0 commit comments

Comments
 (0)