slight cleanup

This commit is contained in:
Cooper Quintin
2024-01-19 15:32:01 -08:00
parent 64bcd32aeb
commit 28d9377a08
3 changed files with 5 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ rustflags = ["-C", "target-feature=+crt-static"]
[alias]
test_pc = "test --target=x86_64-unknown-linux-gnu"
debug_pc = "--target=x86_64-unknown-linux-gnu"
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

View File

@@ -1,2 +1,2 @@
cargo build --release
adb push target/armv7-unknown-linux-gnueabihf/release/wavehunter /data/wavehunter/wavehunter
cargo build
adb push target/armv7-unknown-linux-gnueabihf/debug/wavehunter /data/wavehunter/wavehunter

View File

@@ -19,7 +19,7 @@ pub struct Config {
impl Default for Config {
fn default() -> Self {
Config {
qmdl_store_path: "/data/wavehunter".to_string(),
qmdl_store_path: "/data/wavehunter/qmdl".to_string(),
port: 8080,
readonly_mode: false,
}
@@ -33,7 +33,7 @@ pub fn parse_config<P>(path: P) -> Result<Config, WavehunterError> where P: AsRe
.map_err(WavehunterError::ConfigFileParsingError)?;
if let Some(path) = parsed_config.qmdl_store_path { config.qmdl_store_path = path }
if let Some(port) = parsed_config.port { config.port = port }
if let Some(debug_mode) = parsed_config.readonly_mode { config.readonly_mode = debug_mode }
if let Some(readonly_mode) = parsed_config.readonly_mode { config.readonly_mode = readonly_mode }
}
Ok(config)
}