minimal version

This commit is contained in:
2022-07-30 10:44:45 +02:00
parent 2e52d8901b
commit 8fc83e0ba6
5 changed files with 52836 additions and 16 deletions
+22
View File
@@ -0,0 +1,22 @@
use std::env;
use std::fs;
//use gcode::Mnemonic;
const FILENAME:&str = "./calibrationCube.gcode";
fn main() {
println!("Gcode in the file : {}",FILENAME);
let contents = fs::read_to_string(FILENAME).expect("Could not read the file");
//we use the gcode crate rather than just a string parser because it negates comments and not correct lines
let got: Vec<_> = gcode::parse(contents.as_str()).collect();
let mut line_counter:i32 = 0;
let mut command = "";
for line in &got {
line_counter += 1;
//command =
println!("{}: {}",line_counter,line);
}
}