Add doc comments

This commit is contained in:
Frederik Menke 2023-11-18 15:26:24 +01:00
parent 19decf59bd
commit 6e8b60bf37
5 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,4 @@
/// Functionality for retrieving and interpreting gamepad input
use gilrs::Axis::*;
use gilrs::EventType::*;
use gilrs::Gilrs;

View file

@ -1,5 +1,6 @@
use super::*;
/// Linear Move
#[derive(Debug)]
pub struct G0Command {
pub x: Option<f64>,

View file

@ -1,5 +1,6 @@
use super::*;
/// Auto Home
#[derive(Debug)]
pub struct G28Command {
home_x: bool,

View file

@ -2,6 +2,7 @@ use super::*;
use lazy_static::lazy_static;
use regex::Regex;
/// Get Current Position
#[derive(Debug, Default)]
pub struct M114Command;

View file

@ -1,3 +1,14 @@
/// Structs that implement `GcodeCommand` such that for a command
/// - it is known how to invoke it through `GcodeCommand::command()`
/// - and the meaning of the reply can be parsed with `GcodeCommand::parse_reply(reply)`
///
/// The intended use is though the `Printer::send_gcode()` function.
/// Example:
/// ```rust
/// let mut printer = Printer::connect(DEFAULT_TTY).await.unwrap();
/// let command = Box::new(G0Command::new(true, true, true));
/// let reply: GcodeReply = printer.send_gcode(command).await.unwrap();
/// ```
mod g0;
mod g28;
mod m114;