File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -519,10 +519,16 @@ def _init_hal_gpio(self):
519519 for i in range (MAX_JOINTS * 2 ):
520520 self .g .newpin ("U32-in-" + str (i ).zfill (2 ), hal .HAL_U32 , hal .HAL_IN )
521521
522+ # joint limits
522523 for i in range (MAX_JOINTS ):
523524 self .g .newpin (str (i ) + ".min_limit" , hal .HAL_FLOAT , hal .HAL_OUT )
524525 self .g .newpin (str (i ) + ".max_limit" , hal .HAL_FLOAT , hal .HAL_OUT )
525526
527+ # axes limits
528+ for i in Axis :
529+ self .g .newpin (i .name + ".min_limit" , hal .HAL_FLOAT , hal .HAL_IN )
530+ self .g .newpin (i .name + ".max_limit" , hal .HAL_FLOAT , hal .HAL_IN )
531+
526532 self .g .newpin ("esp32-btn" , hal .HAL_BIT , hal .HAL_IN )
527533 self .g .newpin ("esp32-led" , hal .HAL_U32 , hal .HAL_OUT )
528534
@@ -1896,9 +1902,10 @@ def get_axis_limits(self):
18961902 """
18971903 self .s .poll ()
18981904 limits = []
1899- for i , limit in enumerate (self .s .limit ):
1900- if self .s .axis_mask & (1 << i ):
1901- limits .append (limit )
1905+ for i in Axis :
1906+ limits .append (self .g [i .name + ".min_limit" ])
1907+ limits .append (self .g [i .name + ".max_limit" ])
1908+
19021909 return limits
19031910
19041911 def set_mdi_mode (self ):
You can’t perform that action at this time.
0 commit comments