Buttons rename (#287)
* renaming up/down/click to released/pressed/bump * missing images * fixing signature issue * updated strings * white lego logo
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
tests.test("Detect color red", function () {
|
||||
brick.print("Point sensor to red", 0, 50)
|
||||
brick.print("and click enter", 0, 60)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Click)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped)
|
||||
brick.clearScreen()
|
||||
let actualColor = sensors.color1.color()
|
||||
tests.assertClose("Color", actualColor, ColorSensorColor.Red, 0)
|
||||
@ -10,7 +10,7 @@ tests.test("Detect color red", function () {
|
||||
tests.test("Bright ambient light", function () {
|
||||
brick.print("Point sensor to ceiling", 0, 50)
|
||||
brick.print("light and click enter", 0, 60)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Click)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped)
|
||||
brick.clearScreen()
|
||||
let actualLight: number
|
||||
for (let i = 0; i < 4; i++) {
|
||||
@ -24,7 +24,7 @@ tests.test("Bright reflected light", function () {
|
||||
brick.print("Point sensor to white", 0, 50)
|
||||
brick.print("desk surface", 0, 60)
|
||||
brick.print("and click enter", 0, 70)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Click)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped)
|
||||
brick.clearScreen()
|
||||
let actualLight: number
|
||||
for (let i = 0; i < 4; i++) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
tests.test("Touch sensor pressed", function () {
|
||||
brick.print("Press touch sensor", 0, 50)
|
||||
brick.print("and click enter", 0, 60)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Click)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped)
|
||||
brick.clearScreen()
|
||||
tests.assert("Pressed", sensors.touch1.isPressed())
|
||||
})
|
@ -3,7 +3,7 @@ tests.test("Ultrasonic sensor", function () {
|
||||
brick.print("one finger's length", 0, 60)
|
||||
brick.print("in front of sensor", 0, 70)
|
||||
brick.print("and click enter", 0, 80)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Click)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped)
|
||||
brick.clearScreen()
|
||||
tests.assertClose("Distance", sensors.ultrasonic1.distance(), 7, 6)
|
||||
})
|
Reference in New Issue
Block a user