Skip to content

Commit

Permalink
remove SET_LIM_SWITCH_POLARITY from the software (feature not impleme…
Browse files Browse the repository at this point in the history
…nted)
  • Loading branch information
hongquanli committed Jan 18, 2025
1 parent 35d2d3d commit fbbeed0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -986,37 +986,6 @@ void loop() {
}
}
break;
}
case SET_LIM_SWITCH_POLARITY:
{
switch (buffer_rx[2])
{
case AXIS_X:
{
if (buffer_rx[3] != DISABLED)
{
LIM_SWITCH_X_ACTIVE_LOW = (buffer_rx[3] == ACTIVE_LOW);
}
break;
}
case AXIS_Y:
{
if (buffer_rx[3] != DISABLED)
{
LIM_SWITCH_Y_ACTIVE_LOW = (buffer_rx[3] == ACTIVE_LOW);
}
break;
}
case AXIS_Z:
{
if (buffer_rx[3] != DISABLED)
{
LIM_SWITCH_Z_ACTIVE_LOW = (buffer_rx[3] == ACTIVE_LOW);
}
break;
}
}
break;
}
case SET_HOME_SAFETY_MERGIN:
{
Expand Down
2 changes: 1 addition & 1 deletion software/control/_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class CMD_SET:
MOVETO_Y = 7
MOVETO_Z = 8
SET_LIM = 9
SET_LIM_SWITCH_POLARITY = 20
# SET_LIM_SWITCH_POLARITY = 20
CONFIGURE_STEPPER_DRIVER = 21
SET_MAX_VELOCITY_ACCELERATION = 22
SET_LEAD_SCREW_PITCH = 23
Expand Down
7 changes: 0 additions & 7 deletions software/control/microcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,13 +573,6 @@ def set_lim(self, limit_code, usteps):
cmd[6] = payload & 0xFF
self.send_command(cmd)

def set_limit_switch_polarity(self, axis, polarity):
cmd = bytearray(self.tx_buffer_length)
cmd[1] = CMD_SET.SET_LIM_SWITCH_POLARITY
cmd[2] = axis
cmd[3] = polarity
self.send_command(cmd)

def set_home_safety_margin(self, axis, margin):
margin = abs(margin)
if margin > 0xFFFF:
Expand Down

0 comments on commit fbbeed0

Please sign in to comment.