Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lizard level fix for U4 #236

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions field_friend/hardware/y_axis_stepper_hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ def __init__(self, robot_brain: rosys.hardware.RobotBrain, *,
{name}_end_l.inverted = {str(end_stops_inverted).lower()}
{name}_end_r = {expander.name + "." if end_stops_on_expander and expander else ""}Input({end_r_pin})
{name}_end_r.inverted = {str(end_stops_inverted).lower()}
# TODO: remove when lizard issue 66 is fixed.
{name}_alarm.level = 0
{name}_alarm.active = false
{name}_end_l.level = 0
{name}_end_l.active = false
{name}_end_r.level = 0
{name}_end_r.active = false
{name} = {expander.name + "." if motor_on_expander and expander else ""}MotorAxis({name}_motor, {name + "_end_l" if reversed_direction else name + "_end_r"}, {name + "_end_r" if reversed_direction else name + "_end_l"})
''')
core_message_fields = [
Expand Down
5 changes: 2 additions & 3 deletions field_friend/hardware/z_axis_canopen_hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ def __init__(self, robot_brain: rosys.hardware.RobotBrain, *,
{name}_motor = {expander.name + "." if motor_on_expander and expander else ""}CanOpenMotor({can.name}, {can_address})
{name}_end_t = {expander.name + "." if end_stops_on_expander and expander else ""}Input({end_t_pin})
{name}_end_t.inverted = {str(end_stops_inverted).lower()}
# TODO: remove when lizard issue 66 is fixed.
{name}_end_b.level = 0
{name}_end_t.active = false
{name}_end_b = {expander.name + "." if end_stops_on_expander and expander else ""}Input({end_b_pin})
{name}_end_b.inverted = {str(end_stops_inverted).lower()}
# TODO: remove when lizard issue 66 is fixed.
{name}_end_t.level = 0
{name}_end_t.active = false
{name}_end_b.level = 0
{name}_end_b.active = false
{name} = {expander.name + "." if motor_on_expander and expander else ""}MotorAxis({name}_motor, {name + "_end_t" if reversed_direction else name + "_end_b"}, {name + "_end_b" if reversed_direction else name + "_end_t"})
Expand Down
5 changes: 5 additions & 0 deletions field_friend/hardware/z_axis_stepper_hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def __init__(self, robot_brain: rosys.hardware.RobotBrain, *,
{name}_end_t.inverted = {str(end_stops_inverted).lower()}
{name}_end_b = {expander.name + "." if end_stops_on_expander and expander else ""}Input({end_b_pin})
{name}_end_b.inverted = {str(end_stops_inverted).lower()}
# TODO: remove when lizard issue 66 is fixed.
{name}_end_t.level = 0
{name}_end_t.active = false
{name}_end_b.level = 0
{name}_end_b.active = false
{name} = {expander.name + "." if motor_on_expander and expander else ""}MotorAxis({name}_motor, {name + "_end_t" if reversed_direction else name + "_end_b"}, {name + "_end_b" if reversed_direction else name + "_end_t"})
''')
core_message_fields = [
Expand Down