Disconnect from serial cleanly on SIGINT

Send the STOP opcode before exiting the program to ensure the robot is not left in a state that could potentially drain the battery.

Signed-off-by: Jacob Perron <jacobmperron@gmail.com>
This commit is contained in:
Jacob Perron 2019-08-27 00:11:29 -07:00 committed by Jacob Perron
parent 04ab2ccd80
commit f5044c7ec8
3 changed files with 17 additions and 3 deletions

View file

@ -15,8 +15,6 @@ namespace create {
namespace ublas = boost::numeric::ublas;
// TODO: Handle SIGINT to do clean disconnect
void Create::init() {
mainMotorPower = 0;
sideMotorPower = 0;