Updates for V4 (#197)

* update yotta defaults for 16kb devices

* refactor deprecated blocks

* updates for button events

* update button events

* update refference

* update docs

* update docs

* update button event blocks

* update docs

* update block id
This commit is contained in:
Juri Wolf
2022-08-10 18:36:19 +02:00
committed by GitHub
parent 32783f38ba
commit 5f7a8e5301
107 changed files with 1218 additions and 706 deletions

View File

@ -19,7 +19,7 @@ export function patchBlocks(pkgTargetVersion: string, dom: Element) {
<block type="device_button_selected_event" x="35" y="429">
<field name="NAME">Button.B</field>
<value name="eventType">
<shadow type="control_button_event_value_id">
<shadow type="control_button_event_value">
<field name="id">ButtonEvent.Click</field>
</shadow>
</value>
@ -27,7 +27,7 @@ export function patchBlocks(pkgTargetVersion: string, dom: Element) {
<block type="device_pin_custom_event" x="368" y="428">
<field name="NAME">TouchPin.P2</field>
<value name="eventType">
<shadow type="control_button_event_value_id">
<shadow type="control_button_event_value">
<field name="id">ButtonEvent.Up</field>
</shadow>
</value>
@ -51,7 +51,7 @@ const inputNodes = pxt.U.toArray(dom.querySelectorAll("block[type=device_button_
valueNode.setAttribute("name", "eventType")
const shadowNode = node.ownerDocument.createElement("shadow");
shadowNode.setAttribute("type", "control_button_event_value_id")
shadowNode.setAttribute("type", "control_button_event_value")
const fieldNode = node.ownerDocument.createElement("field");
fieldNode.setAttribute("name", "id")