Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
AltiWx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Notupus
AltiWx
Commits
48c9d699
Commit
48c9d699
authored
Aug 23, 2020
by
Aang23
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proper SIGINT handler
parent
188b1d61
Pipeline
#287
passed with stage
in 2 minutes and 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
README.md
README.md
+7
-0
src/main.cpp
src/main.cpp
+15
-1
No files found.
README.md
0 → 100644
View file @
48c9d699
# AltiWx
*Yet another automated SDR-based station software*
## Why
TODO
\ No newline at end of file
src/main.cpp
View file @
48c9d699
#include "logger/logger.h"
#include <csignal>
#include "orbit/orbit_predictor.h"
#include "orbit/tle_manager.h"
#include "config/config.h"
...
...
@@ -15,6 +16,14 @@
#include "database/database.h"
#include "web/server.h"
bool
shouldExit
=
false
;
void
signalHandler
(
int
signum
)
{
logger
->
critical
(
"Exiting!!!!"
);
shouldExit
=
true
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
// Start logger first
...
...
@@ -62,7 +71,12 @@ int main(int argc, char *argv[])
//std::thread test([=] { processPass({21576, getTLEFromNORAD(21576), time(NULL), time(NULL) + 20, 10.0f, false, true}); });
//processPass({40069, getTLEFromNORAD(40069), time(NULL), time(NULL) + 20, 10.0f, false, true});
std
::
cin
.
get
();
// Register our custom shutdown signal
signal
(
SIGINT
,
signalHandler
);
// And wait
while
(
!
shouldExit
)
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
1
));
// Stop communication manager
communicationManager
.
stop
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment