Closed diinngg closed 3 years ago
Looks good. Could you tell me a little bit more about why the 1 second sleep is needed in stop_program?
(On the hardware I'm working with at least) If MotorControl is already running on the brick it takes around a second for it to stop, during which time the request to start MotorControl appears to be dropped. So calls to mc.start() actually just end up toggling whether MotorControl is running or not.
I admit I haven't spent a lot of time looking at this, there may be a better solution than just waiting for a second, if you feel that would be better I can take another look at it in a couple of weeks.
Change interval to use given delay
Cast reply to char for comparisons to work correctly
Add a 1 second sleep after stop_program() to give it time to stop