diff rust/src/types.rs @ 615:f153aec221be rust

move Params, epoch code
author Matt Johnston <matt@ucc.asn.au>
date Tue, 07 Mar 2017 23:56:12 +0800
parents 5fc41e0833b4
children 87a78343140e
line wrap: on
line diff
--- a/rust/src/types.rs	Tue Mar 07 23:04:02 2017 +0800
+++ b/rust/src/types.rs	Tue Mar 07 23:56:12 2017 +0800
@@ -14,53 +14,6 @@
 use curl;
 use serde_json;
 
-#[derive(Deserialize, Serialize, Debug)]
-pub struct Params {
-    pub fridge_setpoint: f32,
-    pub fridge_difference: f32,
-    pub overshoot_delay: u32,
-    pub overshoot_factor: f32,
-    pub disabled: bool,
-    pub nowort: bool,
-    pub fridge_range_lower: f32,
-    pub fridge_range_upper: f32,
-}
-
-impl Params {
-    pub fn defaults() -> Params {
-        Params {
-            fridge_setpoint: 16.0,
-            fridge_difference: 0.2,
-            overshoot_delay: 720, // 12 minutes
-            overshoot_factor: 1.0,
-            disabled: false,
-            nowort: false,
-            fridge_range_lower: 3.0,
-            fridge_range_upper: 3.0,
-            }
-    }
-}
-
-#[derive(Debug)]
-pub struct ParamHolder {
-    pub p: Params,
-    epoch: String,
-}
-
-impl ParamHolder {
-    pub fn new() -> ParamHolder {
-        ParamHolder {
-            p: Params::defaults(),
-            epoch: String::new(),
-        }
-    }
-
-    pub fn receive(&mut self, p: &Params, epoch: &String)
-    {
-
-    }
-}
-
 #[derive(Debug)]
 pub struct Readings {
     pub temps: HashMap<String, f32>,