From 883c72ff24090401eb9f01e8e1ce3ad8d2b79c4b Mon Sep 17 00:00:00 2001 From: Marc Planard Date: Sat, 10 Jun 2023 18:53:10 +0200 Subject: [PATCH] cleanups --- src/main.rs | 8 ++++---- src/transformer/rotate.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 95c0dfa..020dce3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -102,10 +102,10 @@ fn get_next_frame( rs: &mut RedisCtrl, _black: bool, ) -> LJResult> { - //let line = rs.get(&format!("/pl/{}/0", config.laser_id))?; - let line = vec![(300.0,200.0,0),(500.0,200.0,65280),(500.0,400.0,65280),(300.0,400.0,65280),(300.0,200.0,65280),(300.0,200.0,0),(200.0,100.0,0),(600.0,100.0,65280),(600.0,500.0,65280),(200.0,500.0,65280),(200.0,100.0,65280)]; - - let mut line: Vec = line.into_iter().map(|tpl| tpl.into()).collect(); + let line = rs.get(&format!("/pl/{}/0", config.laser_id))?; + let mut line: Vec = line.into_iter() + .map(|tpl| tpl.into()) + .collect(); for transformer in transformers { line = transformer.apply(&line); diff --git a/src/transformer/rotate.rs b/src/transformer/rotate.rs index 2cb9cac..60fc109 100644 --- a/src/transformer/rotate.rs +++ b/src/transformer/rotate.rs @@ -1,7 +1,7 @@ use crate::transformer::Transformers; use crate::point::Point; use serde::{Serialize,Deserialize}; -use std::f32::consts::PI; +//use std::f32::consts::PI; /// Rotate