From 0771b6465d43e91c3dac63163ff741f8119cb81f Mon Sep 17 00:00:00 2001 From: Ronald Moesbergen Date: Tue, 7 Nov 2023 20:26:30 +0100 Subject: [PATCH 1/2] feat: add leaphy_compass_degrees block --- package.json | 2 +- src/app/effects/backend.wired.effects.ts | 2 ++ src/app/state/app.state.ts | 21 +++++++++++---------- src/assets/blockly/leaphy-toolbox.xml | 9 +++++++++ yarn.lock | 8 ++++---- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 870c7990..71ce5e68 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/app/effects/backend.wired.effects.ts b/src/app/effects/backend.wired.effects.ts index 7ef29ee3..d245e602 100644 --- a/src/app/effects/backend.wired.effects.ts +++ b/src/app/effects/backend.wired.effects.ts @@ -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", ] diff --git a/src/app/state/app.state.ts b/src/app/state/app.state.ts index 21aef669..b567c90b 100644 --- a/src/app/state/app.state.ts +++ b/src/app/state/app.state.ts @@ -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 = { diff --git a/src/assets/blockly/leaphy-toolbox.xml b/src/assets/blockly/leaphy-toolbox.xml index bee5b30a..8159e6cc 100644 --- a/src/assets/blockly/leaphy-toolbox.xml +++ b/src/assets/blockly/leaphy-toolbox.xml @@ -468,6 +468,9 @@ + + + @@ -702,6 +705,9 @@ + + + @@ -719,6 +725,9 @@ + + + diff --git a/yarn.lock b/yarn.lock index 0a134906..91241df0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1737,10 +1737,10 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@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== +"@leaphy-robotics/leaphy-blocks@1.5.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" From 3d5d2b68fab867edf65052644f5d6f759d091c8b Mon Sep 17 00:00:00 2001 From: Ronald Moesbergen Date: Tue, 7 Nov 2023 20:28:17 +0100 Subject: [PATCH 2/2] chore: version 1.8.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 71ce5e68..9b09d499 100644 --- a/package.json +++ b/package.json @@ -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": {