syntax
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -126,17 +126,16 @@ async fn gpsd_client_loop(
|
|||||||
match msg {
|
match msg {
|
||||||
GpsdResponse::JsonResponse(_) => continue,
|
GpsdResponse::JsonResponse(_) => continue,
|
||||||
GpsdResponse::NMEAResponse(mut n) => {
|
GpsdResponse::NMEAResponse(mut n) => {
|
||||||
if let Some(msgs) = &msgs
|
if let Some(msgs) = &msgs {
|
||||||
&& !msgs.contains(&n.id)
|
if !msgs.contains(&n.id) {
|
||||||
{
|
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if !chan.is_closed() {
|
if !chan.is_closed() {
|
||||||
n.msg.push(b'\r');
|
n.msg.push(b'\r');
|
||||||
n.msg.push(b'\n');
|
n.msg.push(b'\n');
|
||||||
if let Err(e) = chan.try_send(n.msg)
|
if let Err(e) = chan.try_send(n.msg) {
|
||||||
&& !e.is_closed()
|
if !e.is_closed() {
|
||||||
{
|
|
||||||
error!("Error sending to channel: {}", e)
|
error!("Error sending to channel: {}", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -146,6 +145,7 @@ async fn gpsd_client_loop(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async fn ptp_server_loop(
|
async fn ptp_server_loop(
|
||||||
mut conn: TcpStream,
|
mut conn: TcpStream,
|
||||||
|
|||||||
Reference in New Issue
Block a user