Remove unused

This commit is contained in:
zaubentrucker 2025-02-22 22:46:18 +01:00
parent 9d1a5e223d
commit b575c0bf7e
2 changed files with 0 additions and 15 deletions
red/src
main.rs
printer/gcode

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

@ -87,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();