Projectupdate1 (#325)

* integrating test lesson from lego

* adding side card annotations
This commit is contained in:
Peli de Halleux
2018-02-14 08:56:12 -08:00
committed by GitHub
parent d6cbbcc3d9
commit 523c507c35
30 changed files with 404 additions and 223 deletions

View File

@ -161,7 +161,7 @@ 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.stopAllMotors(); // ensuring that all motors are off
motors.stopAll(); // ensuring that all motors are off
control.reset()
}
return ret

View File

@ -113,8 +113,8 @@ namespace motors {
//% blockId=motorStopAll block="stop all motors"
//% weight=1
//% group="Move"
//% help=motors/stop-all-motors
export function stopAllMotors() {
//% help=motors/stop-all
export function stopAll() {
const b = mkCmd(Output.ALL, DAL.opOutputStop, 0)
writePWM(b)
}

View File

@ -3,10 +3,10 @@ tests.onEvent(TestEvent.RunSetUp, function() {
console.sendToScreen();
})
tests.onEvent(TestEvent.TestSetUp, function() {
motors.stopAllMotors();
motors.stopAll();
motors.resetAllMotors();
})
tests.onEvent(TestEvent.TestTearDown, function() {
motors.stopAllMotors();
motors.stopAll();
motors.resetAllMotors();
})