diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 68 |
1 files changed, 34 insertions, 34 deletions
@@ -18,7 +18,7 @@ pub struct PrinterState { #[derive(Debug, Deserialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] -pub enum PrusaState { +enum PrusaState { Idle, Printing, Paused, @@ -31,7 +31,7 @@ pub enum PrusaState { #[derive(Debug, Deserialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] -pub enum BambuState { +enum BambuState { Idle, Running, Pause, @@ -40,52 +40,52 @@ pub enum BambuState { } #[derive(Debug, Deserialize)] -pub struct PrusaJob { - pub id: u32, - pub progress: f32, - pub time_remaining: u32, - pub time_printing: u32, +struct PrusaJob { + id: u32, + progress: f32, + time_remaining: u32, + time_printing: u32, } #[derive(Debug, Deserialize)] -pub struct PrusaPrinterInfo { - pub state: PrusaState, - pub temp_nozzle: f32, - pub target_nozzle: f32, - pub temp_bed: f32, - pub target_bed: f32, - pub axis_x: f32, - pub axis_y: f32, - pub axis_z: f32, - pub flow: u32, - pub speed: u32, - pub fan_hotend: u32, - pub fan_print: u32, +struct PrusaPrinterInfo { + state: PrusaState, + temp_nozzle: f32, + target_nozzle: f32, + temp_bed: f32, + target_bed: f32, + axis_x: f32, + axis_y: f32, + axis_z: f32, + flow: u32, + speed: u32, + fan_hotend: u32, + fan_print: u32, } #[derive(Debug, Deserialize)] pub struct PrusaStatus { - pub job: Option<PrusaJob>, - pub printer: PrusaPrinterInfo, + job: Option<PrusaJob>, + printer: PrusaPrinterInfo, } #[derive(Deserialize)] -pub struct BambuPrintMessage { - pub bed_target_temper: Option<f32>, - pub bed_temper: Option<f32>, - pub gcode_state: Option<BambuState>, - pub layer_num: Option<u32>, - pub mc_percent: Option<u32>, - pub mc_remaining_time: Option<u32>, - pub nozzle_target_temper: Option<f32>, - pub nozzle_temper: Option<f32>, - pub print_speed: Option<String>, - pub total_layer_num: Option<u32>, +struct BambuPrintMessage { + bed_target_temper: Option<f32>, + bed_temper: Option<f32>, + gcode_state: Option<BambuState>, + layer_num: Option<u32>, + mc_percent: Option<u32>, + mc_remaining_time: Option<u32>, + nozzle_target_temper: Option<f32>, + nozzle_temper: Option<f32>, + print_speed: Option<String>, + total_layer_num: Option<u32>, } #[derive(Deserialize)] pub struct BambuStatus { - pub print: Option<BambuPrintMessage>, + print: Option<BambuPrintMessage>, } #[derive(Debug, Deserialize)] |
