Only the set speed/mode functions update the last activity time.
The timeout action now sets the forward speed to 0 rather than calling halt(). This avoids the need to worry about syncing the drive mode between the base station and drive controller when connectivity is poor. If the timeout occurs, the base station can be assured the drive mode has not changed, although the rover still stops.
Feature Additions
Config file parsing. Only one lonely configurable value for now.
Interrupt and Error Handling
Since SIGINT (Ctrl-C) is the standard method of terminating the program, the program now handles SIGINT, which tells it to shutdown peacefully after the main loop iteration completes.
Segmentation faults (SIGSEGV) and unhandled exceptions call a new routine, panic_shutdown(), which currently does nothing but should try to reopen a CAN socket and send stop commands to all subsystems.
Merging this PR will close #28
New additions from me
Behavior Changes
halt()
. This avoids the need to worry about syncing the drive mode between the base station and drive controller when connectivity is poor. If the timeout occurs, the base station can be assured the drive mode has not changed, although the rover still stops.Feature Additions
SIGINT
(Ctrl-C) is the standard method of terminating the program, the program now handlesSIGINT
, which tells it to shutdown peacefully after the main loop iteration completes.SIGSEGV
) and unhandled exceptions call a new routine,panic_shutdown()
, which currently does nothing but should try to reopen a CAN socket and send stop commands to all subsystems.