projects
/
temp2RGB.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a color (2 colors can be now defined for a machine).
[temp2RGB.git]
/
src
/
settings.rs
diff --git
a/src/settings.rs
b/src/settings.rs
index
9939178
..
511cb8c
100644
(file)
--- a/
src/settings.rs
+++ b/
src/settings.rs
@@
-17,8
+17,10
@@
pub enum MachineName {
#[derive(Debug, Deserialize, Serialize)]
pub struct Settings {
pub machine_name: 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,
// 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,
fn default() -> Self {
Settings {
machine_name: MachineName::Jiji,
- cold_color: RGB {
+ cold_color
_1
: RGB {
red: 0,
green: 255,
blue: 40,
},
red: 0,
green: 255,
blue: 40,
},
- hot_color: RGB {
+ hot_color
_1
: RGB {
red: 255,
green: 0,
blue: 0,
},
red: 255,
green: 0,
blue: 0,
},
+ cold_color_2: None,
+ hot_color_2: None,
cold_temperature: 55.,
hot_temperature: 75.,
}
cold_temperature: 55.,
hot_temperature: 75.,
}