Skip to content

Commit 5794409

Browse files
author
Sean Froome
committed
If statement should not be nested. This causes the hal component to ignore the enable state of each axis range.
1 parent cb814fd commit 5794409

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/hal/components/limit_axis.comp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ FUNCTION(_){
6565

6666
// Check all ranges
6767
for (i = 0; i < personality; i++){
68-
if (max_range(i) < min_range(i)){
69-
if(! enable(i)){
70-
continue;
71-
}
68+
if(! enable(i)){
69+
continue;
70+
}
7271

72+
if (max_range(i) < min_range(i)){
7373
// Throw Error and skip this range
7474
if (! error_range(i) ){
7575
rtapi_print_msg(RTAPI_MSG_ERR,

0 commit comments

Comments
 (0)