Skip to content

Commit

Permalink
more feedrate checks
Browse files Browse the repository at this point in the history
  • Loading branch information
md8n committed Dec 20, 2024
1 parent 77e7ccd commit a4b35e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion www/js/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function SendJogcommand(cmd, feedrate) {
if (errorList.length) {
// error text was "(something) Feedrate value must be at least 1 mm/min!"
alertdlg(translate_text_item("Out of range"), errorList.join("\n"));
id(controlName).value = getPrefValue(prefName);
id(controlName).value = feedrate.startsWith("Z") ? preferenceslist[0].z_feedrate : preferenceslist[0].xy_feedrate ;
return;
}

Expand Down
4 changes: 2 additions & 2 deletions www/js/utilValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const valueIsInt = (value, valueDef) => {
const valueIsFloat = (value, valueDef) => {
const errorList = [];
const vFloat = Number.parseFloat(value);
if (Number.isNaN(vInt)) {
errorList.push(`'${valueDef.label}' ${translate_text_item("must be an float")}`);
if (Number.isNaN(vFloat)) {
errorList.push(`'${valueDef.label}' ${translate_text_item("must be a float")}`);
} else {
errorList.push(valueMinTest(vFloat, valueDef));
errorList.push(valueMaxTest(vFloat, valueDef));
Expand Down

0 comments on commit a4b35e2

Please sign in to comment.