Add a color (2 colors can be now defined for a machine).
[temp2RGB.git] / src / settings.rs
index 9939178..511cb8c 100644 (file)
@@ -17,8 +17,10 @@ pub enum MachineName {
 #[derive(Debug, Deserialize, Serialize)]
 pub struct Settings {
     pub machine_name: MachineName,
-    pub cold_color: RGB,
-    pub hot_color: RGB,
+    pub cold_color_1: RGB,
+    pub hot_color_1: RGB,
+    pub cold_color_2: Option<RGB>,
+    pub hot_color_2: Option<RGB>,
     // Average temperature between CPU and GPU.
     pub cold_temperature: f32,
     pub hot_temperature: f32,
@@ -30,16 +32,18 @@ impl Settings {
     fn default() -> Self {
         Settings {
             machine_name: MachineName::Jiji,
-            cold_color: RGB {
+            cold_color_1: RGB {
                 red: 0,
                 green: 255,
                 blue: 40,
             },
-            hot_color: RGB {
+            hot_color_1: RGB {
                 red: 255,
                 green: 0,
                 blue: 0,
             },
+            cold_color_2: None,
+            hot_color_2: None,
             cold_temperature: 55.,
             hot_temperature: 75.,
         }