Can read consumption from a file

This commit is contained in:
2024-06-30 20:14:23 +02:00
parent c5c11970a1
commit f468f192d8
2 changed files with 31 additions and 1 deletions

View File

@ -6,7 +6,7 @@ use std::path::{Path, PathBuf};
pub enum ConsumptionBackend {
/// Constant consumption value
Constant {
#[clap(long, default_value_t = 500)]
#[clap(short, long, default_value_t = 500)]
value: i32,
},
@ -17,6 +17,12 @@ pub enum ConsumptionBackend {
#[clap(long, default_value_t = 20000)]
max: i32,
},
/// Read consumption value in a file, on the filesystem
File {
#[clap(short, long, default_value = "/dev/shm/consumption.txt")]
path: String,
},
}
/// Solar system central backend