Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
feat: pass robotType to block generators (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoesbergen authored and koen1711 committed Nov 9, 2023
1 parent fe07683 commit 99be96c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"productName": "Leaphy Webbased",
"author": "Leaphy Robotics",
"description": "Build Leaphy Arduino programs",
"version": "1.7.4",
"version": "1.8.0",
"license": "GPLv3",
"main": "src/main.ts",
"scripts": {
Expand All @@ -29,7 +29,7 @@
"@angular/platform-browser-dynamic": "~15.2.9",
"@angular/router": "~15.2.9",
"@fortawesome/fontawesome-free": "^6.1.1",
"@leaphy-robotics/leaphy-blocks": "1.4.1",
"@leaphy-robotics/leaphy-blocks": "1.5.0",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
"@serialport/parser-readline": "^10.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/effects/blockly-editor.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class BlocklyEditorEffects {
workspace.clearUndo();
workspace.addChangeListener(Blockly.Events.disableOrphans);
workspace.addChangeListener(async () => {
this.blocklyState.setCode(Arduino.workspaceToCode(workspace));
this.blocklyState.setCode(Arduino.workspaceToCode(workspace, this.appState.getSelectedRobotType().id));
const xml = Blockly.Xml.workspaceToDom(workspace);
const prettyXml = Blockly.Xml.domToPrettyText(xml);
this.blocklyState.setWorkspaceXml(prettyXml);
Expand Down
6 changes: 3 additions & 3 deletions src/assets/blockly/leaphy-toolbox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
<block type="leaphy_flitz_nano_read_hand_sensor">
</block>
<sep gap="8"></sep>
<block type="leaphy_flitz_nano_led">
<block type="leaphy_flitz_led">
<value name="FLITZ_LED_R">
<shadow type="math_number">
<field name="NUM">
Expand Down Expand Up @@ -739,7 +739,7 @@
</value>
</block>
<sep gap="8"></sep>
<block type="leaphy_nano_set_motor">
<block type="leaphy_original_set_motor">
<value name="MOTOR_SPEED">
<shadow type="math_number">
<field name="NUM">
Expand All @@ -749,7 +749,7 @@
</value>
</block>
<sep gap="8"></sep>
<block type="leaphy_nano_move_motors">
<block type="leaphy_original_move_motors">
<value name="MOTOR_SPEED">
<shadow type="math_number">
<field name="NUM">
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1737,10 +1737,10 @@
"@jridgewell/resolve-uri" "3.1.0"
"@jridgewell/sourcemap-codec" "1.4.14"

"@leaphy-robotics/leaphy-blocks@1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@leaphy-robotics/leaphy-blocks/-/leaphy-blocks-1.4.1.tgz#706b81557793e8f5882b77c37bc44a49286c74fa"
integrity sha512-t2ffPywVv/G5zSrLqqPApyOYyGkfUrfUdTdc80RMdjbpR+OIVd0RQct2mOikX0AOFtx3MtbefQzF9rU8eQ+xxA==
"@leaphy-robotics/leaphy-blocks@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@leaphy-robotics/leaphy-blocks/-/leaphy-blocks-1.5.0.tgz#04a9142775b4eae4cdb41268ed2853c45014136f"
integrity sha512-rEv35BkRTPFUDA1maQJCsBSIBpSsnHMEAVBUKcGczcok5RnYkuamt0DLhX51WZyy7iYP/5+SddMRiyYczAXq0w==
dependencies:
blockly "^10.1.3"
typescript "4.3.2"
Expand Down

0 comments on commit 99be96c

Please sign in to comment.