Kleine Arbeiten

This commit is contained in:
chk
2026-06-14 10:32:31 +02:00
parent 87cbd51bd2
commit 319fae944a
25 changed files with 1631 additions and 504 deletions

View File

@@ -43,7 +43,14 @@ class GCodeParser {
const params = {};
for (let i = 1; i < tokens.length; i++) {
const token = tokens[i].trim();
if (token.length < 2) {
if (token.length === 0) {
continue;
}
if (token.length === 1) {
// Einzelner Buchstabe = Flag ohne Zahlenwert (z. B. 'R' in 'M114 R').
if (/^[A-Za-z]$/.test(token)) {
params[token.toUpperCase()] = true;
}
continue;
}