update input blocks in docs and tests
This commit is contained in:
@ -126,7 +126,4 @@
|
||||
<block type="device_pin_event" x="555" y="96">
|
||||
<field name="name">TouchPin.P2</field>
|
||||
</block>
|
||||
<block type="device_pin_released" x="188" y="435">
|
||||
<field name="NAME">TouchPin.P2</field>
|
||||
</block>
|
||||
</xml>
|
@ -350,9 +350,6 @@
|
||||
<shadow type="math_number" id="RP?w4vFS1wB4I0nNyldb">
|
||||
<field name="NUM">0</field>
|
||||
</shadow>
|
||||
<block type="device_pin_is_pressed">
|
||||
<field name="NAME">TouchPin.P2</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="variables_set">
|
||||
|
@ -22,10 +22,10 @@ enum RadioMessage {
|
||||
heart,
|
||||
skull
|
||||
}
|
||||
input.onButtonPressed(Button.A, function () {
|
||||
input.input.onButtonEvent(Button.A, ButtonEvent.Click, function () {
|
||||
radio.sendMessage(RadioMessage.heart)
|
||||
})
|
||||
input.onButtonPressed(Button.B, function () {
|
||||
input.input.onButtonEvent(Button.B, ButtonEvent.Click, function () {
|
||||
radio.sendMessage(RadioMessage.skull)
|
||||
})
|
||||
radio.onReceivedMessage(RadioMessage.heart, function () {
|
||||
|
@ -20,10 +20,10 @@ enum RadioMessage {
|
||||
heart,
|
||||
skull
|
||||
}
|
||||
input.onButtonPressed(Button.A, function () {
|
||||
input.input.onButtonEvent(Button.A, ButtonEvent.Click, function () {
|
||||
radio.sendMessage(RadioMessage.heart)
|
||||
})
|
||||
input.onButtonPressed(Button.B, function () {
|
||||
input.input.onButtonEvent(Button.B, ButtonEvent.Click, function () {
|
||||
radio.sendMessage(RadioMessage.skull)
|
||||
})
|
||||
radio.onReceivedMessage(RadioMessage.heart, function () {
|
||||
|
@ -332,12 +332,12 @@ function checkBufferEqual(a: Buffer, b: Buffer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
input.onButtonPressed(Button.A, function () {
|
||||
input.input.onButtonEvent(Button.A, ButtonEvent.Click, function () {
|
||||
basic.showString("S");
|
||||
initSender();
|
||||
})
|
||||
|
||||
input.onButtonPressed(Button.B, function () {
|
||||
input.input.onButtonEvent(Button.B, ButtonEvent.Click, function () {
|
||||
basic.showString("R");
|
||||
initReceiver();
|
||||
})
|
||||
|
Reference in New Issue
Block a user