MCPcopy Create free account
hub / github.com/Schildkroet/Candle2 / parseGCodes

Method parseGCodes

src/parser/gcodepreprocessorutils.cpp:105–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105QList<int> GcodePreprocessorUtils::parseGCodes(QString command)
106{
107 static QRegExp re("[Gg]0*(\\d+)");
108
109 QList<int> codes;
110 int pos = 0;
111
112 while ((pos = re.indexIn(command, pos)) != -1) {
113 codes.append(re.cap(1).toInt());
114 pos += re.matchedLength();
115 }
116
117 return codes;
118}
119
120QList<int> GcodePreprocessorUtils::parseMCodes(QString command)
121{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected