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

feat: add leaphy_compass_degrees block #85

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.8.0",
"version": "1.8.1",
"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.5.0",
"@leaphy-robotics/leaphy-blocks": "1.5.1",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
"@serialport/parser-readline": "^10.3.0",
Expand Down
2 changes: 2 additions & 0 deletions src/app/effects/backend.wired.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ import * as Blockly from 'blockly/core';

const fileExtensions = [
".l_flitz",
".l_flitz_nano",
".l_original",
".l_click",
".l_uno",
".l_nano",
".l_wifi",
".ino",
]
Expand Down
21 changes: 11 additions & 10 deletions src/app/state/app.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,32 @@ import { SelectRobotTypeDialog } from '../modules/core/dialogs/robot-select/robo
})
export class AppState {
/* eslint-disable max-len */
private static defaultLibraries = [
'Leaphy Original Extension', 'Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor'
]
private static leaphyOriginalRobotType = new RobotType('l_original', 'Leaphy Original', 'orig.svg', 'Arduino UNO', 'arduino:avr:uno', 'hex', 'arduino:avr',
['Leaphy Original Extension', 'Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor']
AppState.defaultLibraries.concat(['QMC5883LCompass'])
);
private static leaphyFlitzRobotType = new RobotType('l_flitz', 'Leaphy Flitz', 'flitz.svg', 'Arduino UNO', 'arduino:avr:uno', 'hex', 'arduino:avr',
['Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor'], true, false
AppState.defaultLibraries, true, false
);
private static leaphyClickRobotType = new RobotType('l_click', 'Leaphy Click', 'click.svg', 'Arduino UNO', 'arduino:avr:uno', 'hex', 'arduino:avr',
['Leaphy Extra Extension', 'Servo']
AppState.defaultLibraries
);
private static arduinoUnoRobotType = new RobotType('l_uno', 'Arduino Uno', 'uno.svg', 'Arduino UNO', 'arduino:avr:uno', 'hex', 'arduino:avr',
['Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor']
AppState.defaultLibraries.concat(['QMC5883LCompass'])
);
private static leaphyWiFiRobotType = new RobotType('l_wifi', 'Leaphy WiFi', 'wifi.svg', 'NodeMCU', 'esp8266:esp8266:nodemcuv2', 'bin', 'esp8266:esp8266',
['Leaphy WiFi Extension', 'Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor']
AppState.defaultLibraries.concat(['Leaphy WiFi Extension'])
);
public static genericRobotType = new RobotType('l_code', 'Generic Robot', null, 'Arduino UNO', 'arduino:avr:uno', 'hex', 'arduino:avr',
['Leaphy Original Extension', 'Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor']
AppState.defaultLibraries.concat(['QMC5883LCompass'])
);

private static leaphyFlitzNanoRobotType = new RobotType('l_flitz_nano', 'Flitz Nano', 'flitz_nano.svg', 'Arduino Nano', 'arduino:avr:nano', 'hex', 'arduino:avr',
['Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor'], true, false
AppState.defaultLibraries, true, false
);

private static arduinoNanoRobotType = new RobotType('l_nano', 'Arduino Nano', 'nano.svg', 'Arduino NANO', 'arduino:avr:nano', 'hex', 'arduino:avr',
['Leaphy Original Extension', 'Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor']
AppState.defaultLibraries.concat(['QMC5883LCompass'])
);

public static idToRobotType = {
Expand Down
9 changes: 9 additions & 0 deletions src/assets/blockly/leaphy-toolbox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@
<sep gap="8"></sep>
<block type="leaphy_display_display">
</block>
<sep gap="8"></sep>
<block type="leaphy_compass_degrees">
</block>
</category>
<category id="l_click_extra" toolboxitemid="l_extra" name="%{BKY_LEAPHY_EXTRA_CATEGORY}" categorystyle="leaphy_category">
<block type="leaphy_sonar_read">
Expand Down Expand Up @@ -702,6 +705,9 @@
<sep gap="8"></sep>
<block type="leaphy_display_display">
</block>
<sep gap="8"></sep>
<block type="leaphy_compass_degrees">
</block>
</category>
<category id="l_nano" toolboxitemid="l_nano" name="%{BKY_SENSOREN_CATEGORY}" categorystyle="leaphy_category">
<block type="leaphy_original_get_distance">
Expand All @@ -719,6 +725,9 @@
<sep gap="8"></sep>
<block type="leaphy_rgb_color_raw">
</block>
<sep gap="8"></sep>
<block type="leaphy_compass_degrees">
</block>
</category>
<category id="l_nano_extra" toolboxitemid="l_extra" name="%{BKY_ACTUATOREN_CATEGORY}" categorystyle="leaphy_category">
<block type="leaphy_original_set_led">
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/[email protected].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==
"@leaphy-robotics/[email protected].1":
version "1.5.1"
resolved "https://registry.yarnpkg.com/@leaphy-robotics/leaphy-blocks/-/leaphy-blocks-1.5.1.tgz#c8d7e66348c9669e781a2da79d3f226e037ac420"
integrity sha512-5CWOFqYoV41y5CHHXi8DKIdQrqgxwW0oi+LRSJQUcP4mjEaotG70GLYVkWMiHigaQf8rTj0hODoVblDPzWzX0w==
dependencies:
blockly "^10.1.3"
typescript "4.3.2"
Expand Down