Skip to content

Commit 58135a9

Browse files
committed
removed unused amplifier enable and disable cmd
1 parent 17d7b77 commit 58135a9

16 files changed

Lines changed: 0 additions & 209 deletions

File tree

src/emc/motion-logger/motion-logger.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,6 @@ int main(int argc, char* argv[]) {
321321
update_motion_state();
322322
break;
323323

324-
case EMCMOT_JOINT_ENABLE_AMPLIFIER:
325-
log_print("ENABLE_AMPLIFIER\n");
326-
break;
327-
328-
case EMCMOT_JOINT_DISABLE_AMPLIFIER:
329-
log_print("DISABLE_AMPLIFIER\n");
330-
break;
331-
332324
case EMCMOT_ENABLE_WATCHDOG:
333325
log_print("ENABLE_WATCHDOG\n");
334326
break;

src/emc/motion/command.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,26 +1342,6 @@ void emcmotCommandHandler_locked(void *arg, long servo_period)
13421342
}
13431343
SET_JOINT_ACTIVE_FLAG(joint, 0);
13441344
break;
1345-
case EMCMOT_JOINT_ENABLE_AMPLIFIER:
1346-
/* enable the amplifier directly, but don't enable calculations */
1347-
/* can be done at any time */
1348-
rtapi_print_msg(RTAPI_MSG_DBG, "JOINT_ENABLE_AMP");
1349-
rtapi_print_msg(RTAPI_MSG_DBG, " %d", joint_num);
1350-
if (joint == 0) {
1351-
break;
1352-
}
1353-
break;
1354-
1355-
case EMCMOT_JOINT_DISABLE_AMPLIFIER:
1356-
/* disable the joint calculations and amplifier, but don't disable
1357-
calculations */
1358-
/* can be done at any time */
1359-
rtapi_print_msg(RTAPI_MSG_DBG, "JOINT_DISABLE_AMP");
1360-
rtapi_print_msg(RTAPI_MSG_DBG, " %d", joint_num);
1361-
if (joint == 0) {
1362-
break;
1363-
}
1364-
break;
13651345

13661346
case EMCMOT_JOINT_HOME:
13671347
/* home the specified joint */

src/emc/motion/motion.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ extern "C" {
159159
EMCMOT_JOG_ABORT, /* abort one joint num or axis num */
160160
EMCMOT_JOINT_ACTIVATE, /* make joint active */
161161
EMCMOT_JOINT_DEACTIVATE, /* make joint inactive */
162-
EMCMOT_JOINT_ENABLE_AMPLIFIER, /* enable amp outputs */
163-
EMCMOT_JOINT_DISABLE_AMPLIFIER, /* disable amp outputs */
164162
EMCMOT_JOINT_HOME, /* home a joint or all joints */
165163
EMCMOT_JOINT_UNHOME, /* unhome a joint or all joints*/
166164
EMCMOT_SET_JOINT_POSITION_LIMITS, /* set the joint position +/- limits */

src/emc/nml_intf/emc.cc

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ int emcFormat(NMLTYPE type, void *buffer, CMS * cms)
5757
case EMC_AUX_STAT_TYPE:
5858
((EMC_AUX_STAT *) buffer)->update(cms);
5959
break;
60-
case EMC_JOINT_DISABLE_TYPE:
61-
((EMC_JOINT_DISABLE *) buffer)->update(cms);
62-
break;
63-
case EMC_JOINT_ENABLE_TYPE:
64-
((EMC_JOINT_ENABLE *) buffer)->update(cms);
65-
break;
6660
case EMC_JOINT_HALT_TYPE:
6761
((EMC_JOINT_HALT *) buffer)->update(cms);
6862
break;
@@ -424,10 +418,6 @@ const char *emc_symbol_lookup(uint32_t type)
424418
return "EMC_AUX_ESTOP_ON";
425419
case EMC_AUX_STAT_TYPE:
426420
return "EMC_AUX_STAT";
427-
case EMC_JOINT_DISABLE_TYPE:
428-
return "EMC_JOINT_DISABLE";
429-
case EMC_JOINT_ENABLE_TYPE:
430-
return "EMC_JOINT_ENABLE";
431421
case EMC_JOINT_HALT_TYPE:
432422
return "EMC_JOINT_HALT";
433423
case EMC_JOINT_HOME_TYPE:
@@ -1984,18 +1974,6 @@ void EMC_TASK_PLAN_STEP::update(CMS * cms)
19841974

19851975
}
19861976

1987-
/*
1988-
* NML/CMS Update function for EMC_JOINT_DISABLE
1989-
* Automatically generated by NML CodeGen Java Applet.
1990-
* on Sat Oct 11 13:45:17 UTC 2003
1991-
*/
1992-
void EMC_JOINT_DISABLE::update(CMS * cms)
1993-
{
1994-
1995-
EMC_JOINT_CMD_MSG::update(cms);
1996-
1997-
}
1998-
19991977
/*
20001978
* NML/CMS Update function for EMC_JOINT_SET_BACKLASH
20011979
* Manually generated - don't use NML CodeGen Java Applet.
@@ -2106,18 +2084,6 @@ void EMC_JOINT_UNHOME::update(CMS * cms)
21062084

21072085
}
21082086

2109-
/*
2110-
* NML/CMS Update function for EMC_JOINT_ENABLE
2111-
* Automatically generated by NML CodeGen Java Applet.
2112-
* on Sat Oct 11 13:45:17 UTC 2003
2113-
*/
2114-
void EMC_JOINT_ENABLE::update(CMS * cms)
2115-
{
2116-
2117-
EMC_JOINT_CMD_MSG::update(cms);
2118-
2119-
}
2120-
21212087
/*
21222088
* NML/CMS Update function for EMC_TRAJ_SET_MAX_ACCELERATION
21232089
* Automatically generated by NML CodeGen Java Applet.

src/emc/nml_intf/emc.hh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ struct PM_CARTESIAN;
6666
#define EMC_JOINT_SET_MIN_FERROR_TYPE ((NMLTYPE) 115)
6767
#define EMC_JOINT_SET_MAX_VELOCITY_TYPE ((NMLTYPE) 116)
6868
#define EMC_JOINT_HALT_TYPE ((NMLTYPE) 119)
69-
#define EMC_JOINT_ENABLE_TYPE ((NMLTYPE) 121)
70-
#define EMC_JOINT_DISABLE_TYPE ((NMLTYPE) 122)
7169
#define EMC_JOINT_HOME_TYPE ((NMLTYPE) 123)
7270
#define EMC_JOG_CONT_TYPE ((NMLTYPE) 124)
7371
#define EMC_JOG_INCR_TYPE ((NMLTYPE) 125)
@@ -338,8 +336,6 @@ extern int emcJointSetMaxAcceleration(int joint, double acc);
338336

339337
extern int emcJointInit(int joint);
340338
extern int emcJointHalt(int joint);
341-
extern int emcJointEnable(int joint);
342-
extern int emcJointDisable(int joint);
343339
extern int emcJointHome(int joint);
344340
extern int emcJointUnhome(int joint);
345341
extern int emcJointActivate(int joint);

src/emc/nml_intf/emc_nml.hh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -302,26 +302,6 @@ class EMC_JOINT_HALT:public EMC_JOINT_CMD_MSG {
302302
void update(CMS * cms);
303303
};
304304

305-
class EMC_JOINT_ENABLE:public EMC_JOINT_CMD_MSG {
306-
public:
307-
EMC_JOINT_ENABLE():EMC_JOINT_CMD_MSG(EMC_JOINT_ENABLE_TYPE,
308-
sizeof(EMC_JOINT_ENABLE)) {
309-
};
310-
311-
// For internal NML/CMS use only.
312-
void update(CMS * cms);
313-
};
314-
315-
class EMC_JOINT_DISABLE:public EMC_JOINT_CMD_MSG {
316-
public:
317-
EMC_JOINT_DISABLE():EMC_JOINT_CMD_MSG(EMC_JOINT_DISABLE_TYPE,
318-
sizeof(EMC_JOINT_DISABLE)) {
319-
};
320-
321-
// For internal NML/CMS use only.
322-
void update(CMS * cms);
323-
};
324-
325305
class EMC_JOINT_HOME:public EMC_JOINT_CMD_MSG {
326306
public:
327307
EMC_JOINT_HOME():EMC_JOINT_CMD_MSG(EMC_JOINT_HOME_TYPE,

src/emc/task/emctask.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,6 @@ int emcTaskSetState(EMC_TASK_STATE state)
319319
emcMotionAbort();
320320
// turn the machine servos off-- go into READY state
321321
for (t = 0; t < emcStatus->motion.traj.spindles; t++) emcSpindleAbort(t);
322-
for (t = 0; t < emcStatus->motion.traj.joints; t++) {
323-
emcJointDisable(t);
324-
}
325322
emcTrajDisable();
326323
emcIoAbort(EMC_ABORT_TASK_STATE_OFF);
327324
emcLubeOff();
@@ -334,9 +331,6 @@ int emcTaskSetState(EMC_TASK_STATE state)
334331
case EMC_TASK_STATE::ON:
335332
// turn the machine servos on
336333
emcTrajEnable();
337-
for (t = 0; t < emcStatus->motion.traj.joints; t++){
338-
emcJointEnable(t);
339-
}
340334
emcLubeOn();
341335
break;
342336

@@ -356,9 +350,6 @@ int emcTaskSetState(EMC_TASK_STATE state)
356350
for (t = 0; t < emcStatus->motion.traj.spindles; t++) emcSpindleAbort(t);
357351
// go into estop-- do both IO estop and machine servos off
358352
emcAuxEstopOn();
359-
for (t = 0; t < emcStatus->motion.traj.joints; t++) {
360-
emcJointDisable(t);
361-
}
362353
emcTrajDisable();
363354
emcLubeOff();
364355
emcTaskAbort();

src/emc/task/emctaskmain.cc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,6 @@ int emcSystemCmd(char *s)
359359

360360
// shorthand typecasting ptrs
361361
static EMC_JOINT_HALT *joint_halt_msg;
362-
static EMC_JOINT_DISABLE *disable_msg;
363-
static EMC_JOINT_ENABLE *enable_msg;
364362
static EMC_JOINT_HOME *home_msg;
365363
static EMC_JOINT_UNHOME *unhome_msg;
366364
static EMC_JOG_CONT *jog_cont_msg;
@@ -806,8 +804,6 @@ static int emcTaskPlan(void)
806804
// immediate commands
807805
case EMC_JOINT_SET_BACKLASH_TYPE:
808806
case EMC_JOINT_SET_HOMING_PARAMS_TYPE:
809-
case EMC_JOINT_DISABLE_TYPE:
810-
case EMC_JOINT_ENABLE_TYPE:
811807
case EMC_JOINT_SET_FERROR_TYPE:
812808
case EMC_JOINT_SET_MIN_FERROR_TYPE:
813809
case EMC_JOINT_LOAD_COMP_TYPE:
@@ -898,8 +894,6 @@ static int emcTaskPlan(void)
898894

899895
// immediate commands
900896

901-
case EMC_JOINT_DISABLE_TYPE:
902-
case EMC_JOINT_ENABLE_TYPE:
903897
case EMC_JOINT_SET_BACKLASH_TYPE:
904898
case EMC_JOINT_SET_HOMING_PARAMS_TYPE:
905899
case EMC_JOINT_SET_FERROR_TYPE:
@@ -1671,16 +1665,6 @@ static int emcTaskIssueCommand(NMLmsg * cmd)
16711665

16721666
// joint commands
16731667

1674-
case EMC_JOINT_DISABLE_TYPE:
1675-
disable_msg = (EMC_JOINT_DISABLE *) cmd;
1676-
retval = emcJointDisable(disable_msg->joint);
1677-
break;
1678-
1679-
case EMC_JOINT_ENABLE_TYPE:
1680-
enable_msg = (EMC_JOINT_ENABLE *) cmd;
1681-
retval = emcJointEnable(enable_msg->joint);
1682-
break;
1683-
16841668
case EMC_JOINT_HOME_TYPE:
16851669
home_msg = (EMC_JOINT_HOME *) cmd;
16861670
retval = emcJointHome(home_msg->joint);
@@ -3356,9 +3340,6 @@ int main(int argc, char *argv[])
33563340
emcMotionAbort();
33573341
for (int s = 0; s < emcStatus->motion.traj.spindles; s++) emcSpindleAbort(s);
33583342
emcAuxEstopOn();
3359-
for (int t = 0; t < emcStatus->motion.traj.joints; t++) {
3360-
emcJointDisable(t);
3361-
}
33623343
emcTrajDisable();
33633344
emcLubeOff();
33643345
emcIoAbort(EMC_ABORT_TASK_STATE_ESTOP);

src/emc/task/taskintf.cc

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -740,30 +740,6 @@ int emcJointOverrideLimits(int joint)
740740
return usrmotWriteEmcmotCommand(&emcmotCommand);
741741
}
742742

743-
int emcJointEnable(int joint)
744-
{
745-
if (joint < 0 || joint >= EMCMOT_MAX_JOINTS) {
746-
return 0;
747-
}
748-
749-
emcmotCommand.command = EMCMOT_JOINT_ENABLE_AMPLIFIER;
750-
emcmotCommand.joint = joint;
751-
752-
return usrmotWriteEmcmotCommand(&emcmotCommand);
753-
}
754-
755-
int emcJointDisable(int joint)
756-
{
757-
if (joint < 0 || joint >= EMCMOT_MAX_JOINTS) {
758-
return 0;
759-
}
760-
761-
emcmotCommand.command = EMCMOT_JOINT_DISABLE_AMPLIFIER;
762-
emcmotCommand.joint = joint;
763-
764-
return usrmotWriteEmcmotCommand(&emcmotCommand);
765-
}
766-
767743
int emcJointHome(int joint)
768744
{
769745
if (joint < -1 || joint >= EMCMOT_MAX_JOINTS) {

src/emc/usr_intf/emcsh.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,8 +3089,6 @@ static int emc_joint_enable(ClientData clientdata,
30893089
setresult(interp,"emc_joint_enable: need 0, 1 for disable, enable");
30903090
return TCL_ERROR;
30913091
}
3092-
3093-
sendJointEnable(joint, val);
30943092
return TCL_OK;
30953093
}
30963094

0 commit comments

Comments
 (0)