Skip to content

Commit 7a4574e

Browse files
committed
ev: new params: parametrize instead of hardcode
1 parent 1dc5a0a commit 7a4574e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

contrib/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,9 @@
8888
# Path to script executed when Android Auto session starts/stops and EV battery data is needed
8989
# Argument "start" or "stop" is appended automatically when invoked
9090
# ev_battery_logger = "/usr/bin/some_script"
91+
92+
# Traction battery capacity [Wh]
93+
ev_battery_capacity = 22000
94+
95+
# Some unknown parameter - change this to have a correct range (u2->u3)
96+
ev_factor = 0.075

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ pub struct AppConfig {
141141
dhu: bool,
142142
ev: bool,
143143
ev_battery_logger: Option<PathBuf>,
144+
ev_battery_capacity: u64,
145+
ev_factor: f32,
144146
}
145147

146148
impl Default for AppConfig {
@@ -172,6 +174,8 @@ impl Default for AppConfig {
172174
dhu: false,
173175
ev: false,
174176
ev_battery_logger: None,
177+
ev_battery_capacity: 22000,
178+
ev_factor: 0.075,
175179
}
176180
}
177181
}

0 commit comments

Comments
 (0)