Add G90
This commit is contained in:
parent
cb64502a02
commit
b72c601a25
23
red/src/printer/gcode/g90.rs
Normal file
23
red/src/printer/gcode/g90.rs
Normal file
|
@ -0,0 +1,23 @@
|
|||
use super::*;
|
||||
|
||||
/// Relative Positioning
|
||||
#[derive(Debug)]
|
||||
pub struct G90Command;
|
||||
|
||||
impl GcodeCommand for G90Command {
|
||||
fn command(&self) -> String {
|
||||
"G90".into()
|
||||
}
|
||||
|
||||
fn parse_reply(&self, reply: &str) -> Result<GcodeReply> {
|
||||
if !reply.is_empty() {
|
||||
Err(GcodeReplyError {
|
||||
sent_command: self.command(),
|
||||
parsed_input: reply.to_string(),
|
||||
problem: "Expected no reply".to_string(),
|
||||
})
|
||||
} else {
|
||||
Ok(GcodeReply::NoReply)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,11 +11,13 @@
|
|||
/// ```
|
||||
mod g0;
|
||||
mod g28;
|
||||
mod g90;
|
||||
mod g91;
|
||||
mod m114;
|
||||
mod m997;
|
||||
pub use g0::G0Command;
|
||||
pub use g28::G28Command;
|
||||
pub use g90::G90Command;
|
||||
pub use g91::G91Command;
|
||||
pub use m114::M114Command;
|
||||
pub use m997::M997Command;
|
||||
|
|
Loading…
Reference in a new issue