Skip to content

Commit e1015cd

Browse files
committed
halui switch u32 to s32
s32 is more common the u32 (easier to connect to) also axis select uses -1 as 'unselected'
1 parent b204443 commit e1015cd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/emc/usr_intf/halui.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static int axis_mask = 0;
100100
FIELD(hal_bit_t,program_bd_off) /* pin for setting block delete off */ \
101101
FIELD(hal_bit_t,program_bd_is_on) /* status pin that block delete is on */ \
102102
\
103-
FIELD(hal_u32_t,tool_number) /* pin for current selected tool */ \
103+
FIELD(hal_s32_t,tool_number) /* pin for current selected tool */ \
104104
FIELD(hal_float_t,tool_length_offset_x) /* current applied x tool-length-offset */ \
105105
FIELD(hal_float_t,tool_length_offset_y) /* current applied y tool-length-offset */ \
106106
FIELD(hal_float_t,tool_length_offset_z) /* current applied z tool-length-offset */ \
@@ -135,8 +135,8 @@ static int axis_mask = 0;
135135
ARRAY(hal_bit_t,joint_on_hard_max_limit,EMCMOT_MAX_JOINTS+1) /* status pin that the joint is on the hardware max limit */ \
136136
ARRAY(hal_bit_t,joint_override_limits,EMCMOT_MAX_JOINTS+1) /* status pin that the joint is on the hardware max limit */ \
137137
ARRAY(hal_bit_t,joint_has_fault,EMCMOT_MAX_JOINTS+1) /* status pin that the joint has a fault */ \
138-
FIELD(hal_u32_t,joint_selected) /* status pin for the joint selected */ \
139-
FIELD(hal_u32_t,axis_selected) /* status pin for the axis selected */ \
138+
FIELD(hal_s32_t,joint_selected) /* status pin for the joint selected */ \
139+
FIELD(hal_s32_t,axis_selected) /* status pin for the axis selected */ \
140140
\
141141
ARRAY(hal_bit_t,joint_nr_select,EMCMOT_MAX_JOINTS) /* nr. of pins to select a joint */ \
142142
ARRAY(hal_bit_t,axis_nr_select,EMCMOT_MAX_AXIS) /* nr. of pins to select a axis */ \
@@ -853,11 +853,11 @@ int halui_hal_init(void)
853853
if (retval < 0) return retval;
854854
retval = hal_pin_float_newf(HAL_OUT, &(halui_data->ro_value), comp_id, "halui.rapid-override.value");
855855
if (retval < 0) return retval;
856-
retval = hal_pin_u32_newf(HAL_OUT, &(halui_data->joint_selected), comp_id, "halui.joint.selected");
856+
retval = hal_pin_s32_newf(HAL_OUT, &(halui_data->joint_selected), comp_id, "halui.joint.selected");
857857
if (retval < 0) return retval;
858-
retval = hal_pin_u32_newf(HAL_OUT, &(halui_data->axis_selected), comp_id, "halui.axis.selected");
858+
retval = hal_pin_s32_newf(HAL_OUT, &(halui_data->axis_selected), comp_id, "halui.axis.selected");
859859
if (retval < 0) return retval;
860-
retval = hal_pin_u32_newf(HAL_OUT, &(halui_data->tool_number), comp_id, "halui.tool.number");
860+
retval = hal_pin_s32_newf(HAL_OUT, &(halui_data->tool_number), comp_id, "halui.tool.number");
861861
if (retval < 0) return retval;
862862
retval = hal_pin_float_newf(HAL_OUT, &(halui_data->tool_length_offset_x), comp_id, "halui.tool.length_offset.x");
863863
if (retval < 0) return retval;

0 commit comments

Comments
 (0)