From 2d1da2bbf58cbcec6ebff939ae029d8e663dd3e8 Mon Sep 17 00:00:00 2001 From: "93094049+kraemr@users.noreply.github.com" <93094049+kraemr@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:43:01 +0200 Subject: [PATCH] small refactor/cleanup --- server/src/machines/winder2/api.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/server/src/machines/winder2/api.rs b/server/src/machines/winder2/api.rs index 01f804d3..738a8b61 100644 --- a/server/src/machines/winder2/api.rs +++ b/server/src/machines/winder2/api.rs @@ -1,8 +1,3 @@ -use std::{ - sync::Arc, - time::{Duration, Instant}, -}; - use super::{Winder2, Winder2Mode, puller_speed_controller::PullerRegulationMode}; use control_core::{ machines::api::MachineApi, @@ -18,6 +13,10 @@ use serde::{Deserialize, Serialize}; use serde_json::Value; use smol::channel::Sender; use socketioxide::extract::SocketRef; +use std::{ + sync::Arc, + time::{Duration, Instant}, +}; use tracing::instrument; #[derive(Serialize, Deserialize, Debug, Clone)] @@ -110,7 +109,6 @@ pub struct LiveValuesEvent { pub spool_diameter: f64, /// tension arm angle in degrees pub tension_arm_angle: f64, - // spool progress in meters (pulled distance of filament) pub spool_progress: f64, } @@ -128,8 +126,8 @@ pub struct StateEvent { pub traverse_state: TraverseState, /// puller state pub puller_state: PullerState, + /// spool automatic action state and progress pub spool_automatic_action_state: SpoolAutomaticActionState, - /// mode state pub mode_state: ModeState, /// tension arm state