Endprogram (#884)

* moving end program logic to c++

* typo

* always stop on reset
This commit is contained in:
Peli de Halleux
2019-08-28 08:52:01 -07:00
committed by GitHub
parent 75cf8da396
commit aa40e7b169
2 changed files with 11 additions and 3 deletions

View File

@ -162,7 +162,6 @@ namespace brick {
// this needs to be done in query(), which is run without the main JS execution mutex
// otherwise, while(true){} will lock the device
if (ret & DAL.BUTTON_ID_ESCAPE) {
motors.stopAll(); // ensuring that all motors are off
control.reset()
}
return ret