cope with unavailable flrig
This commit is contained in:
parent
bd23149ce5
commit
6bcb06a32f
1 changed files with 6 additions and 3 deletions
|
@ -21,8 +21,11 @@ fn main() {
|
||||||
let mut changes_detected = false;
|
let mut changes_detected = false;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let radio_data_new =
|
let radio_data_new = match flrig::get_radio_data(&settings.flrig.host, &settings.flrig.port)
|
||||||
flrig::get_radio_data(&settings.flrig.host, &settings.flrig.port).unwrap();
|
{
|
||||||
|
Ok(res) => res,
|
||||||
|
Err(_) => continue,
|
||||||
|
};
|
||||||
|
|
||||||
if radio_data_current.frequency != radio_data_new.frequency
|
if radio_data_current.frequency != radio_data_new.frequency
|
||||||
|| radio_data_current.mode != radio_data_new.mode
|
|| radio_data_current.mode != radio_data_new.mode
|
||||||
|
|
Loading…
Reference in a new issue