Skip to content

Commit

Permalink
Add compatibility with grblHAL using default compatibility level.
Browse files Browse the repository at this point in the history
  • Loading branch information
bullestock committed Jan 21, 2024
1 parent 8fe77bc commit 7abde9e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/frmmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1743,10 +1743,12 @@ bool frmMain::DataIsFloating(QString data)

bool frmMain::DataIsReset(QString data)
{
//return QRegExp("^GRBL\\s\\d\\.\\d").indexIn(data.toUpper()) != -1;
QString g("GRBL 1.1");

return data.toUpper().contains(g);
// "GRBL" in either case, optionally followed by a number of non-whitespace characters,
// followed by a version number in the format x.y.
// This matches e.g.
// Grbl 1.1h ['$' for help]
// GrblHAL 1.1f ['$' or '' for help]
return QRegExp("^GRBL[^ ]*\\s\\d\\.\\d").indexIn(data.toUpper()) != -1;
}

QString frmMain::FeedOverride(QString command)
Expand Down

0 comments on commit 7abde9e

Please sign in to comment.