Add doc comments
This commit is contained in:
parent
19decf59bd
commit
6e8b60bf37
5 changed files with 15 additions and 0 deletions
red/src
|
@ -1,3 +1,4 @@
|
||||||
|
/// Functionality for retrieving and interpreting gamepad input
|
||||||
use gilrs::Axis::*;
|
use gilrs::Axis::*;
|
||||||
use gilrs::EventType::*;
|
use gilrs::EventType::*;
|
||||||
use gilrs::Gilrs;
|
use gilrs::Gilrs;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
/// Linear Move
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct G0Command {
|
pub struct G0Command {
|
||||||
pub x: Option<f64>,
|
pub x: Option<f64>,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
/// Auto Home
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct G28Command {
|
pub struct G28Command {
|
||||||
home_x: bool,
|
home_x: bool,
|
||||||
|
|
|
@ -2,6 +2,7 @@ use super::*;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
|
||||||
|
/// Get Current Position
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct M114Command;
|
pub struct M114Command;
|
||||||
|
|
||||||
|
|
|
@ -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 g0;
|
||||||
mod g28;
|
mod g28;
|
||||||
mod m114;
|
mod m114;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue