MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / exit_signal_handler

Function exit_signal_handler

Software/C/Examples/grove_led.cpp:52–57  ·  view source on GitHub ↗

Signal handler that will be called when Ctrl+C is pressed to stop the program

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

reset_allMethod · 0.45

Tested by

no test coverage detected