Compare commits
2 commits
bf74c5c678
...
6bcb06a32f
Author | SHA1 | Date | |
---|---|---|---|
Martin Brodbeck | 6bcb06a32f | ||
Martin Brodbeck | bd23149ce5 |
|
@ -20,8 +20,6 @@ pub fn get_radio_data(fl_host: &str, fl_port: &str) -> Result<RadioData, Error>
|
|||
let mode = parse_xml(&mode);
|
||||
let power = parse_xml(&power);
|
||||
|
||||
println!("{freq} --- {mode} --- {power}");
|
||||
|
||||
let radio_data = RadioData {
|
||||
key: String::from(""),
|
||||
radio: String::from(""),
|
||||
|
|
|
@ -19,10 +19,13 @@ fn main() {
|
|||
};
|
||||
|
||||
let mut changes_detected = false;
|
||||
|
||||
|
||||
loop {
|
||||
let radio_data_new =
|
||||
flrig::get_radio_data(&settings.flrig.host, &settings.flrig.port).unwrap();
|
||||
let radio_data_new = match flrig::get_radio_data(&settings.flrig.host, &settings.flrig.port)
|
||||
{
|
||||
Ok(res) => res,
|
||||
Err(_) => continue,
|
||||
};
|
||||
|
||||
if radio_data_current.frequency != radio_data_new.frequency
|
||||
|| radio_data_current.mode != radio_data_new.mode
|
||||
|
|
Loading…
Reference in a new issue