Signal handler that will be called when Ctrl+C is pressed to stop the program
| 65 | |
| 66 | // Signal handler that will be called when Ctrl+C is pressed to stop the program |
| 67 | void exit_signal_handler(int signo){ |
| 68 | if(signo == SIGINT){ |
| 69 | GPG.reset_all(); // Reset everything so there are no run-away motors |
| 70 | exit(-2); |
| 71 | } |
| 72 | } |