Improve docs
This commit is contained in:
parent
eaab62ab88
commit
a65f523636
|
@ -180,11 +180,23 @@ impl Printer {
|
|||
.map_err(|_| make_err())
|
||||
}
|
||||
|
||||
/// Switch the printer to absolute movement mode.
|
||||
///
|
||||
/// This is generally necessary before sending consecutive `self.move_absolute()` commands.
|
||||
/// Otherwise, the motion planner on the printer will stop the printer between all movements
|
||||
/// as `self.move_absolute()` will call `use_absolute_movements` and `use_relative_movements`
|
||||
/// itself. (See its documentation)
|
||||
pub async fn use_absolute_movements(&mut self) -> Result<(), PrinterError> {
|
||||
self.state.movement_mode = MovementMode::AbsoluteMovements;
|
||||
self.send_gcode(G90Command).await
|
||||
}
|
||||
|
||||
/// Switch the printer to relative movement mode.
|
||||
///
|
||||
/// This is generally necessary before sending consecutive `self.move_relative()` commands.
|
||||
/// Otherwise, the motion planner on the printer will stop the printer between all movements
|
||||
/// as `self.move_relative()` will call `use_absolute_movements` and `use_relative_movements`
|
||||
/// itself. (See its documentation)
|
||||
pub async fn use_relative_movements(&mut self) -> Result<(), PrinterError> {
|
||||
self.state.movement_mode = MovementMode::RelativeMovements;
|
||||
self.send_gcode(G91Command).await
|
||||
|
@ -194,7 +206,7 @@ impl Printer {
|
|||
///
|
||||
/// # Arguments
|
||||
/// * `x, y, z` - Whether the axis should be homed. Axis that are set to `false` will not be
|
||||
/// homed.
|
||||
/// homed.,
|
||||
pub async fn auto_home(&mut self, x: bool, y: bool, z: bool) -> Result<(), PrinterError> {
|
||||
let res = self.send_gcode(G28Command::new(x, y, z)).await?;
|
||||
self.state.position = PrinterPosition {
|
||||
|
|
Loading…
Reference in a new issue