Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Igate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CATS
Igate
Commits
d02d2ada
Commit
d02d2ada
authored
1 year ago
by
Stephen D
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug where we exit instantly if felinet is disabled
parent
c90add52
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#4271
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gate.rs
+2
-2
2 additions, 2 deletions
src/gate.rs
src/main.rs
+9
-10
9 additions, 10 deletions
src/main.rs
with
11 additions
and
12 deletions
src/gate.rs
+
2
−
2
View file @
d02d2ada
...
...
@@ -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..."
);
};
...
...
This diff is collapsed.
Click to expand it.
src/main.rs
+
9
−
10
View file @
d02d2ada
...
...
@@ -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}"
)
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment