Compare commits

...

2 commits

Author SHA1 Message Date
b575c0bf7e Remove unused 2025-02-22 22:46:18 +01:00
9d1a5e223d Remove unused imports 2025-02-22 22:44:48 +01:00
4 changed files with 0 additions and 20 deletions

View file

@ -1,7 +1,6 @@
#![warn(rust_2018_idioms)]
use anyhow::{Context, Result, anyhow};
use futures::never::Never;
use red::gamepad::Gamepad;
use red::jogger;
use red::printer::{AutoReportSetting, Printer};
@ -43,12 +42,3 @@ fn jog() -> Result<()> {
jogger::jog(&mut gamepad, printer).with_context(|| anyhow!("Running jog mode"))
}
fn print_gamepad_events() -> Never {
let mut gamepad = Gamepad::new().expect("Failed to open gamepad");
loop {
let events = gamepad.get_pending();
println!("speed setpoint: {:?}", gamepad.speed_set_point(&events));
std::thread::sleep(std::time::Duration::from_millis(500));
}
}

View file

@ -1,8 +1,5 @@
use crate::printer::PrinterPosition;
use super::*;
use lazy_static::lazy_static;
use regex::Regex;
/// Get Current Position
#[derive(Debug, Default)]

View file

@ -18,7 +18,6 @@ mod m154;
mod m155;
mod m997;
use crate::printer::PrinterPosition;
pub use g0::G0Command;
pub use g28::G28Command;
pub use g90::G90Command;
@ -88,11 +87,6 @@ pub fn parse_autoreport_line(line: &str) -> AutoReport {
}
}
/// Can the line be interpreted as an auto-report by the printer
fn is_auto_report(line: &str) -> bool {
matches!(parse_autoreport_line(line), AutoReport::NotRecognized) && is_temperature_report(line)
}
pub fn is_temperature_report(line: &str) -> bool {
lazy_static! {
static ref RE: Regex = Regex::new(r" T:(-?\d+(?:\.\d+)) /").unwrap();

View file

@ -22,7 +22,6 @@ use std::sync::mpsc;
use std::sync::mpsc::Receiver;
use std::sync::mpsc::RecvTimeoutError;
use std::sync::mpsc::Sender;
use std::sync::mpsc::TryRecvError;
use std::time::{Duration, Instant};
use std::{io, str};