Rust Ver
This commit is contained in:
22
src/config.rs
Normal file
22
src/config.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Config {
|
||||
pub status_pin: u8,
|
||||
pub fan_pin: u8,
|
||||
pub fan_on_temp_c: f64,
|
||||
pub fan_off_temp_c: f64,
|
||||
pub poll_interval_s: f64,
|
||||
pub error_temp_c: f64,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
status_pin: 4,
|
||||
fan_pin: 17,
|
||||
fan_on_temp_c: 40.0,
|
||||
fan_off_temp_c: 35.0,
|
||||
poll_interval_s: 2.0,
|
||||
error_temp_c: 80.0,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user