mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-01-31 00:48:41 +03:00
update
This commit is contained in:
24
qds_test_tools/qds_gcode_checker/main.cpp
Normal file
24
qds_test_tools/qds_gcode_checker/main.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "GCodeChecker.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace QIDIStudio;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc != 2) {
|
||||
cout << "Invalid input arguments" << endl;
|
||||
return -1;
|
||||
}
|
||||
string path(argv[1]);
|
||||
cout << "Start to check file " << path << endl;
|
||||
GCodeChecker checker;
|
||||
|
||||
//QDS: parse and check whether has invalid gcode
|
||||
if (checker.parse_file(path) != GCodeCheckResult::Success) {
|
||||
cout << "Failed to parse and check file " << path << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
cout << "Success to parse and check file" << path << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user