Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Philippe Gaussier
Drone FlyMonitor2
Commits
dc396d86
Commit
dc396d86
authored
Oct 18, 2021
by
Léo Coquet
Browse files
Correction d'erreur de merge
parent
7b56e152
Changes
1
Hide whitespace changes
Inline
Side-by-side
Com_server/test/TestDroneRemoteControl.cpp
View file @
dc396d86
...
...
@@ -322,31 +322,21 @@ void signalHandler(int number)
switch
(
number
)
{
case
SIGINT
:
printf
(
"SIGINT caught
\n
"
);
//CTRL+C
<<<<<<<
HEAD
printf
(
"SIGINT caught
\n
"
);
//CTRL+C
exit
(
0
);
=======
>>>>>>>
53
a90fa35840947532eddd812b272932ee8fe7c6
//TODO handle SIGINT reception situation
break
;
case
SIGTERM
:
printf
(
"SIGTERM caught
\n
"
);
//kill (term command)
//TODO handle SIGTERM reception situation
<<<<<<<
HEAD
exit
(
0
);
=======
>>>>>>>
53
a90fa35840947532eddd812b272932ee8fe7c6
break
;
case
SIGFPE
:
printf
(
"SIGFPE caught
\n
"
);
//Floating-Point arithmetic Exception
//TODO handle SIGFPE reception situation
exit
(
0
);
//to prevent infinite loop
<<<<<<<
HEAD
=======
>>>>>>>
53
a90fa35840947532eddd812b272932ee8fe7c6
break
;
default
:
...
...
@@ -365,11 +355,7 @@ int main(int argc, char *argv[])
struct
sigaction
action
;
if
(
argc
>
1
)
{
strcpy
(
device_path
,
argv
[
1
]);
printf
(
"port = %s
\n
"
,
device_path
);}
<<<<<<<
HEAD
=======
>>>>>>>
53
a90fa35840947532eddd812b272932ee8fe7c6
//signal handler initialisation
sigfillset
(
&
action
.
sa_mask
);
action
.
sa_handler
=
signalHandler
;
...
...
@@ -378,11 +364,7 @@ int main(int argc, char *argv[])
//Make the list of all SIG to catch (will not be caught if not listed here, the list is not definitive and all are not necessarily usefull)
if
(
sigaction
(
SIGINT
,
&
action
,
NULL
)
!=
0
)
printf
(
"SIGINT couldn't be attached
\n
"
);
//ctrl+C
if
(
sigaction
(
SIGTERM
,
&
action
,
NULL
)
!=
0
)
printf
(
"SIGTERM couldn't be attached
\n
"
);
//kill [PID]
<<<<<<<
HEAD
if
(
sigaction
(
SIGFPE
,
&
action
,
NULL
)
!=
0
)
printf
(
"SIGFPE couldn't be attached
\n
"
);
//integer divided by 0
=======
if
(
sigaction
(
SIGFPE
,
&
action
,
NULL
)
!=
0
)
printf
(
"SIGFPE couldn't be attached
\n
"
);
//integer divided by 0
>>>>>>>
53
a90fa35840947532eddd812b272932ee8fe7c6
drone1
.
open
(
device_path
,
device_baudrate
);
string
buffer1
=
""
;
...
...
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