Skip to content

Commit

Permalink
if no return-value is read, set _value to 0.0f so that we don't carry…
Browse files Browse the repository at this point in the history
… previous returns
  • Loading branch information
skasti committed Oct 9, 2024
1 parent 4044167 commit 161fe25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ngc_flowctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,10 @@ status_code_t ngc_flowctrl (uint32_t o_label, char *line, uint_fast8_t *pos, boo
if(read_real_value(line, pos, &value) == Status_OK) {
ngc_named_param_set("_value", value);
ngc_named_param_set("_value_returned", 1.0f);
} else
} else {
ngc_named_param_set("_value", 0.0f);
ngc_named_param_set("_value_returned", 0.0f);
}

if(g65_return)
grbl.on_macro_return();
Expand Down

0 comments on commit 161fe25

Please sign in to comment.