Commit 66f9cecc authored by Amine AIT-GANI's avatar Amine AIT-GANI
Browse files

Modification des fichiers de test

Merge branch 'master' of https://git.cyu.fr/gaussier/drone_flyMonitor2
parents 99e0cd04 53a90fa3
Pipeline #1549 failed with stage
in 1 minute and 34 seconds
......@@ -323,21 +323,30 @@ void signalHandler(int number)
{
case SIGINT :
printf("SIGINT caught\n"); //CTRL+C
<<<<<<< HEAD
exit(0);
=======
>>>>>>> 53a90fa35840947532eddd812b272932ee8fe7c6
//TODO handle SIGINT reception situation
break;
case SIGTERM :
printf("SIGTERM caught\n"); //kill (term command)
//TODO handle SIGTERM reception situation
<<<<<<< HEAD
exit(0);
=======
>>>>>>> 53a90fa35840947532eddd812b272932ee8fe7c6
break;
case SIGFPE :
printf("SIGFPE caught\n"); //Floating-Point arithmetic Exception
//TODO handle SIGFPE reception situation
exit(0); //to prevent infinite loop
<<<<<<< HEAD
=======
>>>>>>> 53a90fa35840947532eddd812b272932ee8fe7c6
break;
default :
......@@ -356,7 +365,11 @@ int main(int argc, char *argv[])
struct sigaction action;
if(argc>1) {strcpy(device_path ,argv[1]); printf("port = %s \n",device_path);}
<<<<<<< HEAD
=======
>>>>>>> 53a90fa35840947532eddd812b272932ee8fe7c6
//signal handler initialisation
sigfillset(&action.sa_mask);
action.sa_handler = signalHandler;
......@@ -365,7 +378,11 @@ 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
>>>>>>> 53a90fa35840947532eddd812b272932ee8fe7c6
drone1.open(device_path, device_baudrate);
string buffer1="";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment