Signal handler that will be called when Ctrl+C is pressed to stop the program
| 54 | |
| 55 | // Signal handler that will be called when Ctrl+C is pressed to stop the program |
| 56 | void exit_signal_handler(int signo){ |
| 57 | if(signo == SIGINT){ |
| 58 | GPG.reset_all(); // Reset everything so there are no run-away motors |
| 59 | exit(-2); |
| 60 | } |
| 61 | } |