Skip to content
Snippets Groups Projects
Commit d02d2ada authored by Stephen D's avatar Stephen D
Browse files

Fix bug where we exit instantly if felinet is disabled

parent c90add52
No related branches found
No related tags found
No related merge requests found
Pipeline #4271 passed
......@@ -273,13 +273,13 @@ pub async fn felinet_send_forever(
pub async fn felinet_receive_forever(
mut client: HandlerClient<Channel>,
mut modem_send: mpsc::Sender<Vec<u8>>,
callsign: &str,
callsign: String,
ssid: u8,
uuid: Uuid,
) {
loop {
if let Err(e) =
felinet_receive_once(&mut client, &mut modem_send, callsign, ssid, uuid).await
felinet_receive_once(&mut client, &mut modem_send, &callsign, ssid, uuid).await
{
eprintln!("FELINET RX error: {e}. Reconnecting...");
};
......
......@@ -111,14 +111,6 @@ async fn gate_forever(
let temperature_mutex = radio.temperature_mutex();
tokio::task::spawn(async move {
loop {
if let Err(e) = radio.process_forever().await {
eprintln!("Radio error: {e}")
}
}
});
let tx = broadcast::Sender::new(16);
beacon_forever(
......@@ -190,8 +182,15 @@ async fn gate_forever(
});
}
felinet_receive_forever(client, packet_send, &callsign, config.ssid, uuid).await;
let ssid = config.ssid;
tokio::task::spawn(async move {
felinet_receive_forever(client, packet_send, callsign, ssid, uuid).await;
});
}
Ok(())
loop {
if let Err(e) = radio.process_forever().await {
eprintln!("Radio error: {e}")
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment