diff --git a/docs/static/fonts/icons/iconfont.css b/docs/static/fonts/icons/iconfont.css
index 67dd1f89..9f7a0a7b 100644
--- a/docs/static/fonts/icons/iconfont.css
+++ b/docs/static/fonts/icons/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont";
- src: url("iconfont.eot?1aaa45a81be328d93991341b518bf26d?#iefix") format("embedded-opentype"),
-url("iconfont.woff2?1aaa45a81be328d93991341b518bf26d") format("woff2"),
-url("iconfont.woff?1aaa45a81be328d93991341b518bf26d") format("woff");
+ src: url("iconfont.eot?d6ed5932401120dae3c35f6048fd5e76?#iefix") format("embedded-opentype"),
+url("iconfont.woff2?d6ed5932401120dae3c35f6048fd5e76") format("woff2"),
+url("iconfont.woff?d6ed5932401120dae3c35f6048fd5e76") format("woff");
}
.icon {
@@ -31,57 +31,51 @@ url("iconfont.woff?1aaa45a81be328d93991341b518bf26d") format("woff");
.icon-addpackage:before {
content: "\f105";
}
-.icon-advancedcollapsed:before {
+.icon-brick:before {
content: "\f106";
}
-.icon-advancedexpanded:before {
+.icon-controls:before {
content: "\f107";
}
-.icon-brick:before {
+.icon-functions:before {
content: "\f108";
}
-.icon-controls:before {
+.icon-list:before {
content: "\f109";
}
-.icon-functions:before {
+.icon-logic:before {
content: "\f10a";
}
-.icon-list:before {
+.icon-loops:before {
content: "\f10b";
}
-.icon-logic:before {
+.icon-math:before {
content: "\f10c";
}
-.icon-loops:before {
+.icon-motors:before {
content: "\f10d";
}
-.icon-math:before {
+.icon-music:before {
content: "\f10e";
}
-.icon-motors:before {
+.icon-sensors:before {
content: "\f10f";
}
-.icon-music:before {
+.icon-text:before {
content: "\f110";
}
-.icon-sensors:before {
+.icon-variables:before {
content: "\f111";
}
-.icon-text:before {
+.icon-cancel:before {
content: "\f112";
}
-.icon-variables:before {
+.icon-check:before {
content: "\f113";
}
-.icon-cancel:before {
+.icon-download:before {
content: "\f114";
}
-.icon-check:before {
+.icon-save:before {
content: "\f115";
}
-.icon-download:before {
- content: "\f116";
-}
-.icon-save:before {
- content: "\f117";
-}
diff --git a/docs/static/fonts/icons/iconfont.eot b/docs/static/fonts/icons/iconfont.eot
index 007b931f..1de91321 100644
Binary files a/docs/static/fonts/icons/iconfont.eot and b/docs/static/fonts/icons/iconfont.eot differ
diff --git a/docs/static/fonts/icons/iconfont.svg b/docs/static/fonts/icons/iconfont.svg
index b3a250b6..b34c4ff4 100644
--- a/docs/static/fonts/icons/iconfont.svg
+++ b/docs/static/fonts/icons/iconfont.svg
@@ -22,59 +22,53 @@
-
-
diff --git a/docs/static/fonts/icons/iconfont.ttf b/docs/static/fonts/icons/iconfont.ttf
index 115c9d92..268395b8 100644
Binary files a/docs/static/fonts/icons/iconfont.ttf and b/docs/static/fonts/icons/iconfont.ttf differ
diff --git a/docs/static/fonts/icons/iconfont.woff b/docs/static/fonts/icons/iconfont.woff
index e8d97e86..a61fb1dc 100644
Binary files a/docs/static/fonts/icons/iconfont.woff and b/docs/static/fonts/icons/iconfont.woff differ
diff --git a/docs/static/fonts/icons/iconfont.woff2 b/docs/static/fonts/icons/iconfont.woff2
index 8d9eab3d..91b8d812 100644
Binary files a/docs/static/fonts/icons/iconfont.woff2 and b/docs/static/fonts/icons/iconfont.woff2 differ
diff --git a/libs/core/_locales/core-jsdoc-strings.json b/libs/core/_locales/core-jsdoc-strings.json
index 309c14dd..faf6ef75 100644
--- a/libs/core/_locales/core-jsdoc-strings.json
+++ b/libs/core/_locales/core-jsdoc-strings.json
@@ -21,8 +21,6 @@
"brick.Button.pauseUntil": "Waits until the event is raised",
"brick.Button.pauseUntil|param|ev": "the event to wait for",
"brick.Button.wasPressed": "See if the button was pressed again since the last time you checked.",
- "brick._imagePicker": "An image",
- "brick._imagePicker|param|image": "the image",
"brick.buttonDown": "Down button on the EV3 Brick.",
"brick.buttonEnter": "Enter button on the EV3 Brick.",
"brick.buttonLeft": "Left button on the EV3 Brick.",
diff --git a/libs/core/_locales/core-strings.json b/libs/core/_locales/core-strings.json
index a68e8a47..6e94110a 100644
--- a/libs/core/_locales/core-strings.json
+++ b/libs/core/_locales/core-strings.json
@@ -28,7 +28,6 @@
"brick.Button.onEvent|block": "on %button|%event",
"brick.Button.pauseUntil|block": "pause until %button|%event",
"brick.Button.wasPressed|block": "%button|was pressed",
- "brick._imagePicker|block": "%image",
"brick.buttonDown|block": "down",
"brick.buttonEnter|block": "enter",
"brick.buttonLeft|block": "left",
diff --git a/libs/core/images.ts b/libs/core/images.ts
index 5e4d482b..999cb197 100644
--- a/libs/core/images.ts
+++ b/libs/core/images.ts
@@ -1,260 +1,260 @@
namespace images {
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsBigSmile = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsHeartLarge = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsHeartSmall = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsMouth1open = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsMouth1shut = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsMouth2open = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsMouth2shut = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsSad = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsSick = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsSmile = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsSwearing = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsTalking = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsWink = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const expressionsZzz = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesAngry = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesAwake = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesBlackEye = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesBottomLeft = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesBottomRight = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesCrazy1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesCrazy2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesDisappointed = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesDizzy = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesDown = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesEvil = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesHurt = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesKnockedOut = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesLove = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesMiddleLeft = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesMiddleRight = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesNeutral = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesNuclear = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesPinchLeft = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesPinchMiddle = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesPinchRight = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesSleeping = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesTear = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesTiredLeft = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesTiredMiddle = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesTiredRight = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesToxic = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesUp = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const eyesWinking = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationAccept = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationBackward = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationDecline = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationForward = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationLeft = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationNoGo = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationQuestionMark = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationRight = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationStop1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationStop2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationThumbsDown = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationThumbsUp = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const informationWarning = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoColorSensor = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoEv3icon = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoEv3 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoGyroSensor = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoIrBeacon = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoIrSensor = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoLego = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoLargeMotor = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoMindstorms = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoMediumMotor = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoSoundSensor = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoTempSensor = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoTouchSensor = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const legoUsSensor = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsBomb = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsBoom = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsFire = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsFlowers = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsForest = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsLightOff = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsLightOn = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsLightning = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsNight = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsPirate = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsSnow = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const objectsTarget = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressBar0 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressBar1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressBar2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressBar3 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressBar4 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressDial0 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressDial1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressDial2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressDial3 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressDial4 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressDots0 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressDots1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressDots2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressDots3 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressHourglass0 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressHourglass1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressHourglass2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressTimer0 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressTimer1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressTimer2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressTimer3 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressTimer4 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressWaterLevel0 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressWaterLevel1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressWaterLevel2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const progressWaterLevel3 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemAccept1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemAccept2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemAlert = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemBox = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemBusy0 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemBusy1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemDecline1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemDecline2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemDotEmpty = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemDotFull = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemEv3small = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemPlay = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemSlider0 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemSlider1 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemSlider2 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemSlider3 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemSlider4 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemSlider5 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemSlider6 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemSlider7 = screen.unpackPNG(hex``);
- //% fixedInstance jres blockIdentity=brick._imagePicker
+ //% fixedInstance jres blockIdentity=brick.__imagePicker
export const systemSlider8 = screen.unpackPNG(hex``);
}
diff --git a/libs/core/screen.ts b/libs/core/screen.ts
index 9027f5f7..f70dc6e1 100644
--- a/libs/core/screen.ts
+++ b/libs/core/screen.ts
@@ -158,7 +158,7 @@ namespace brick {
//% image.fieldOptions.columns=6
//% image.fieldOptions.hasSearchBar=true
//% group="Screen" weight=0 blockHidden=1
- export function _imagePicker(image: Image): Image {
+ export function __imagePicker(image: Image): Image {
return image;
}
diff --git a/libs/ev3/ns.ts b/libs/ev3/ns.ts
index 8db92e47..32690ba1 100644
--- a/libs/ev3/ns.ts
+++ b/libs/ev3/ns.ts
@@ -1,19 +1,19 @@
-//% color="#68C3E2" weight=100 icon="\uf108"
+//% color="#68C3E2" weight=100 icon="\uf106"
//% groups='["Buttons", "Screen"]'
//% labelLineWidth=0
namespace brick {
}
-//% color="#C8509B" weight=95 icon="\uf111"
+//% color="#C8509B" weight=95 icon="\uf10f"
//% labelLineWidth=0
//% groups='["Ultrasonic Sensor", "Touch Sensor", "Color Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Gyro Sensor"]'
//% groupIcons='["\uf101","\uf103","\uf102","","","\uf104"]'
namespace sensors {
}
-//% color="#A5CA18" weight=90 icon="\uf10f"
+//% color="#A5CA18" weight=90 icon="\uf10d"
//% groups='["Motion", "Sensors", "Chassis"]'
//% labelLineWidth=0
namespace motors {
diff --git a/package.json b/package.json
index 1d418da4..4e6cecef 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pxt-ev3",
- "version": "0.0.45",
+ "version": "0.0.46",
"description": "LEGO Mindstorms EV3 for Microsoft MakeCode",
"private": true,
"keywords": [
diff --git a/pxtarget.json b/pxtarget.json
index ac5ef3f1..64a763e7 100644
--- a/pxtarget.json
+++ b/pxtarget.json
@@ -139,9 +139,7 @@
},
"monacoColors": {
"editor.background": "#ecf6ff"
- },
- "simAnimationEnter": "horizontal flip in",
- "simAnimationExit": "horizontal flip out"
+ }
},
"ignoreDocsErrors": true
}
diff --git a/sim/dalboard.ts b/sim/dalboard.ts
index 9ad960b8..4e613d9e 100644
--- a/sim/dalboard.ts
+++ b/sim/dalboard.ts
@@ -23,20 +23,6 @@ namespace pxsim {
}
export class EV3Board extends CoreBoard {
- // state & update logic for component services
- // neopixelState: CommonNeoPixelState;
- buttonState: EV3ButtonState;
- slideSwitchState: SlideSwitchState;
- lightSensorState: AnalogSensorState;
- thermometerState: AnalogSensorState;
- thermometerUnitState: number;
- microphoneState: AnalogSensorState;
- edgeConnectorState: EdgeConnectorState;
- capacitiveSensorState: CapacitiveSensorState;
- accelerometerState: AccelerometerState;
- touchButtonState: TouchButtonState;
- irState: InfraredState;
-
view: SVGSVGElement;
outputState: EV3OutputState;
@@ -86,11 +72,6 @@ namespace pxsim {
// TODO
break;
}
- case "irpacket": {
- let ev = msg;
- this.irState.receive(new RefBuffer(ev.packet));
- break;
- }
}
}
@@ -120,6 +101,9 @@ namespace pxsim {
document.body.innerHTML = ""; // clear children
document.body.appendChild(this.view = viewHost.getView() as SVGSVGElement);
+ this.inputNodes = [];
+ this.outputNodes = [];
+
return Promise.resolve();
}
@@ -127,26 +111,33 @@ namespace pxsim {
return svg.toDataUri(new XMLSerializer().serializeToString(this.view));
}
- //defaultNeopixelPin() {
- // return this.edgeConnectorState.getPin(CPlayPinName.D8);
- //}
-
- getDefaultPitchPin() {
- return this.edgeConnectorState.getPin(CPlayPinName.D6);
- }
-
getBrickNode() {
return this.brickNode;
}
+ motorUsed(port:number, large: boolean) {
+ for(let i = 0; i < DAL.NUM_OUTPUTS; ++i) {
+ const p = 1 << i;
+ if (port & p) {
+ const motorPort = this.motorMap[p];
+ if (!this.outputNodes[motorPort])
+ this.outputNodes[motorPort] = new MotorNode(motorPort, large);
+ }
+ }
+ }
+
getMotor(port: number, large?: boolean): MotorNode[] {
- if (port == 0xFF) return this.getMotors(); // Return all motors
- const motorPort = this.motorMap[port];
- if (this.outputNodes[motorPort] == undefined) {
- this.outputNodes[motorPort] = large ?
- new LargeMotorNode(motorPort) : new MediumMotorNode(motorPort);
+ const r = [];
+ for(let i = 0; i < DAL.NUM_OUTPUTS; ++i) {
+ const p = 1 << i;
+ if (port & p) {
+ const motorPort = this.motorMap[p];
+ const outputNode = this.outputNodes[motorPort];
+ if (outputNode)
+ r.push(outputNode);
+ }
}
- return [this.outputNodes[motorPort]];
+ return r;
}
getMotors() {
@@ -154,7 +145,7 @@ namespace pxsim {
}
getSensor(port: number, type: number): SensorNode {
- if (this.inputNodes[port] == undefined) {
+ if (!this.inputNodes[port]) {
switch (type) {
case DAL.DEVICE_TYPE_GYRO: this.inputNodes[port] = new GyroSensorNode(port); break;
case DAL.DEVICE_TYPE_COLOR: this.inputNodes[port] = new ColorSensorNode(port); break;
diff --git a/sim/state/color.ts b/sim/state/color.ts
index 42ce61df..ad5f7ac5 100644
--- a/sim/state/color.ts
+++ b/sim/state/color.ts
@@ -20,7 +20,7 @@ namespace pxsim {
export class ColorSensorNode extends UartSensorNode {
id = NodeType.ColorSensor;
- private color: number;
+ private color: number = 50;
constructor(port: number) {
super(port);
@@ -31,10 +31,8 @@ namespace pxsim {
}
setColor(color: number) {
- if (this.color != color) {
- this.color = color;
- this.setChangedState();
- }
+ this.color = color;
+ this.setChangedState();
}
getValue() {
diff --git a/sim/state/control.ts b/sim/state/control.ts
index dabc588b..0735c5b3 100644
--- a/sim/state/control.ts
+++ b/sim/state/control.ts
@@ -81,7 +81,6 @@ namespace pxsim.control {
export function dmesg(s: string) {
console.log("DMESG: " + s)
}
-
}
namespace pxsim.output {
diff --git a/sim/state/input.ts b/sim/state/input.ts
index a00ceec2..1f62e95e 100644
--- a/sim/state/input.ts
+++ b/sim/state/input.ts
@@ -2,8 +2,8 @@
namespace pxsim.motors {
export function __motorUsed(port: number, large: boolean) {
- console.log("MOTOR INIT " + port);
- const motors = ev3board().getMotor(port, large);
+ //console.log("MOTOR INIT " + port);
+ ev3board().motorUsed(port, large);
runtime.queueDisplayUpdate();
}
}
@@ -11,7 +11,7 @@ namespace pxsim.motors {
namespace pxsim.sensors {
export function __sensorUsed(port: number, type: number) {
- console.log("SENSOR INIT " + port + ", type: " + type);
+ //console.log("SENSOR INIT " + port + ", type: " + type);
const sensor = ev3board().getSensor(port, type);
runtime.queueDisplayUpdate();
}
diff --git a/sim/state/motor.ts b/sim/state/motor.ts
index fffab968..308d2197 100644
--- a/sim/state/motor.ts
+++ b/sim/state/motor.ts
@@ -19,8 +19,8 @@ namespace pxsim {
// console.log("motor before read");
for (let port = 0; port < DAL.NUM_OUTPUTS; ++port) {
const output = outputs[port];
- const speed = output ? Math.round(outputs[port].getSpeed()) : 0;
- const angle = output ? Math.round(outputs[port].getAngle()) : 0;
+ const speed = output ? outputs[port].getSpeed() : 0;
+ const angle = output ? outputs[port].getAngle() : 0;
const tci = MotorDataOff.TachoCounts + port * MotorDataOff.Size;
const tsi = MotorDataOff.TachoSensor + port * MotorDataOff.Size;
data[tci] = data[tci + 1] = data[tci + 2] = data[tci + 3] = 0; // Tacho count
diff --git a/sim/state/motornode.ts b/sim/state/motornode.ts
new file mode 100644
index 00000000..5676eae6
--- /dev/null
+++ b/sim/state/motornode.ts
@@ -0,0 +1,141 @@
+namespace pxsim {
+
+ export class MotorNode extends BaseNode {
+ isOutput = true;
+ private rotationsPerMilliSecond: number;
+
+ // current state
+ private angle: number = 0;
+ private tacho: number = 0;
+ private speed: number = 0;
+ private polarity: number = 1; // -1, 1 or -1
+
+ private started: boolean;
+ private speedCmd: DAL;
+ private speedCmdValues: number[];
+ private speedCmdTacho: number;
+ private speedCmdTime: number;
+
+ constructor(port: number, large: boolean) {
+ super(port);
+ this.setLarge(large);
+ }
+
+ getSpeed() {
+ return this.speed * (this.polarity == 0 ? -1 : 1);
+ }
+
+ getAngle() {
+ return this.angle;
+ }
+
+ setSpeedCmd(cmd: DAL, values: number[]) {
+ this.speedCmd = cmd;
+ this.speedCmdValues = values;
+ this.speedCmdTacho = this.angle;
+ this.speedCmdTime = pxsim.U.now();
+ }
+
+ clearSpeedCmd() {
+ delete this.speedCmd;
+ }
+
+ setLarge(large: boolean) {
+ this.id = large ? NodeType.LargeMotor : NodeType.MediumMotor;
+ // large 170 rpm (https://education.lego.com/en-us/products/ev3-large-servo-motor/45502)
+ this.rotationsPerMilliSecond = (large ? 170 : 250) / 60000;
+ }
+
+ setPolarity(polarity: number) {
+ // Either 1 or 255 (reverse)
+ /*
+ -1 : Motor will run backward
+ 0 : Motor will run opposite direction
+ 1 : Motor will run forward
+ */
+ this.polarity = polarity;
+ }
+
+ reset() {
+ // not sure what reset does...
+ }
+
+ clearCount() {
+ this.tacho = 0;
+ this.angle = 0;
+ }
+
+ stop() {
+ this.started = false;
+ }
+
+ start() {
+ this.started = true;
+ }
+
+ updateState(elapsed: number) {
+ console.log(`motor: ${elapsed}ms - ${this.speed}% - ${this.angle}> - ${this.tacho}|`)
+ const interval = Math.min(20, elapsed);
+ let t = 0;
+ while(t < elapsed) {
+ let dt = interval;
+ if (t + dt > elapsed) dt = elapsed - t;
+ this.updateStateStep(dt);
+ t += dt;
+ }
+ }
+
+ private updateStateStep(elapsed: number) {
+ // compute new speed
+ switch (this.speedCmd) {
+ case DAL.opOutputSpeed:
+ case DAL.opOutputPower:
+ // assume power == speed
+ // TODO: PID
+ this.speed = this.speedCmdValues[0];
+ break;
+ case DAL.opOutputTimeSpeed:
+ case DAL.opOutputTimePower:
+ case DAL.opOutputStepPower:
+ case DAL.opOutputStepSpeed:
+ // ramp up, run, ramp down, using time
+ const speed = this.speedCmdValues[0];
+ const step1 = this.speedCmdValues[1];
+ const step2 = this.speedCmdValues[2];
+ const step3 = this.speedCmdValues[3];
+ const brake = this.speedCmdValues[4];
+ const dstep = (this.speedCmd == DAL.opOutputTimePower || this.speedCmd == DAL.opOutputTimeSpeed)
+ ? pxsim.U.now() - this.speedCmdTime
+ : this.tacho - this.speedCmdTacho;
+ if (dstep < step1) // rampup
+ this.speed = speed * dstep / step1;
+ else if (dstep < step1 + step2) // run
+ this.speed = speed;
+ else if (dstep < step1 + step2 + step3)
+ this.speed = speed * (step1 + step2 + step3 - dstep) / (step1 + step2 + step3);
+ else {
+ if (brake) this.speed = 0;
+ this.clearSpeedCmd();
+ }
+ this.speed = Math.round(this.speed); // integer only
+ break;
+ }
+
+ // compute delta angle
+ const rotations = this.getSpeed() / 100 * this.rotationsPerMilliSecond * elapsed;
+ const deltaAngle = Math.round(rotations * 360);
+ if (deltaAngle) {
+ this.angle += deltaAngle;
+ this.tacho += Math.abs(deltaAngle);
+ this.setChangedState();
+ }
+
+ // if the motor was stopped or there are no speed commands,
+ // let it coast to speed 0
+ if (this.speed && !(this.started || this.speedCmd)) {
+ // decay speed 5% per tick
+ this.speed = Math.round(Math.max(0, Math.abs(this.speed) - 10) * Math.sign(this.speed));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sim/state/motors.ts b/sim/state/motors.ts
deleted file mode 100644
index fcf71bcd..00000000
--- a/sim/state/motors.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-namespace pxsim {
-
- export abstract class MotorNode extends BaseNode {
- isOutput = true;
-
- protected angle: number = 0;
-
- private rotationsPerMilliSecond: number;
- private speed: number;
- private large: boolean;
- private rotation: number;
- private polarity: boolean;
-
- constructor(port: number, rpm: number) {
- super(port);
- this.rotationsPerMilliSecond = rpm / 60000;
- }
-
- setSpeed(speed: number) {
- if (this.speed != speed) {
- this.speed = speed;
- this.changed = true;
- this.setChangedState();
- }
- }
-
- setLarge(large: boolean) {
- this.large = large;
- }
-
- getSpeed() {
- return this.speed;
- }
-
- stepSpeed(speed: number, angle: number, brake: boolean) {
- // TODO: implement
- }
-
- setPolarity(polarity: number) {
- // Either 1 or 255 (reverse)
- this.polarity = polarity === 255;
- // TODO: implement
- }
-
- reset() {
- // TODO: implement
- }
-
- stop() {
- // TODO: implement
- }
-
- start() {
- // TODO: implement
- this.setChangedState();
- }
-
- public getAngle() {
- return this.angle;
- }
-
- updateState(elapsed: number) {
- const rotations = this.getSpeed() / 100 * this.rotationsPerMilliSecond * elapsed;
- const angle = rotations * 360;
- if (angle) {
- this.angle += angle;
- this.setChangedState();
- }
- }
- }
-
- export class MediumMotorNode extends MotorNode {
- id = NodeType.MediumMotor;
-
- constructor(port: number) {
- super(port, 250);
- }
- }
-
- export class LargeMotorNode extends MotorNode {
- id = NodeType.LargeMotor;
-
- constructor(port: number) {
- super(port, 170);
- }
- }
-}
\ No newline at end of file
diff --git a/sim/state/output.ts b/sim/state/output.ts
index a3b93f8e..53d9f420 100644
--- a/sim/state/output.ts
+++ b/sim/state/output.ts
@@ -34,24 +34,32 @@ namespace pxsim {
motors.forEach(motor => motor.reset());
return 2;
}
- case DAL.opOutputStepSpeed: {
+ case DAL.opOutputClearCount:
+ const port = buf.data[1];
+ const motors = ev3board().getMotor(port);
+ motors.forEach(motor => motor.clearCount());
+ break;
+ case DAL.opOutputStepPower:
+ case DAL.opOutputStepSpeed:
+ case DAL.opOutputTimePower:
+ case DAL.opOutputTimeSpeed: {
// step speed
const port = buf.data[1];
- const speed = buf.data[2] << 24 >> 24; // signed byte
- // note that b[3] is padding
- const step1 = buf.data[4];
- const step2 = buf.data[5]; // angle
- const step3 = buf.data[6];
- const brake = buf.data[7];
+ const speed = pxsim.BufferMethods.getNumber(buf, BufferMethods.NumberFormat.Int8LE, 2); // signed byte
+ // note that b[3] is padding
+ const step1 = pxsim.BufferMethods.getNumber(buf, BufferMethods.NumberFormat.Int32LE, 4);
+ const step2 = pxsim.BufferMethods.getNumber(buf, BufferMethods.NumberFormat.Int32LE, 8);
+ const step3 = pxsim.BufferMethods.getNumber(buf, BufferMethods.NumberFormat.Int32LE, 12);
+ const brake = pxsim.BufferMethods.getNumber(buf, BufferMethods.NumberFormat.Int8LE, 16);
//console.log(buf);
const motors = ev3board().getMotor(port);
- motors.forEach(motor => motor.stepSpeed(speed, step2, brake === 1));
+ motors.forEach(motor => motor.setSpeedCmd(cmd, [speed, step1, step2, step3, brake]));
return 2;
}
case DAL.opOutputStop: {
// stop
const port = buf.data[1];
- const brake = buf.data[2];
+ const brake = pxsim.BufferMethods.getNumber(buf, BufferMethods.NumberFormat.Int8LE, 2);
const motors = ev3board().getMotor(port);
motors.forEach(motor => motor.stop());
return 2;
@@ -59,9 +67,9 @@ namespace pxsim {
case DAL.opOutputSpeed: {
// setSpeed
const port = buf.data[1];
- const speed = buf.data[2] << 24 >> 24; // signed byte
+ const speed = pxsim.BufferMethods.getNumber(buf, BufferMethods.NumberFormat.Int8LE, 2);
const motors = ev3board().getMotor(port);
- motors.forEach(motor => motor.setSpeed(speed));
+ motors.forEach(motor => motor.setSpeedCmd(cmd, [speed]));
return 2;
}
case DAL.opOutputStart: {
@@ -74,7 +82,7 @@ namespace pxsim {
case DAL.opOutputPolarity: {
// reverse
const port = buf.data[1];
- const polarity = buf.data[2];
+ const polarity = pxsim.BufferMethods.getNumber(buf, BufferMethods.NumberFormat.Int8LE, 2);
const motors = ev3board().getMotor(port);
motors.forEach(motor => motor.setPolarity(polarity));
return 2;
@@ -86,6 +94,9 @@ namespace pxsim {
motors.forEach(motor => motor.setLarge(large));
return 2;
}
+ default:
+ console.warn('unknown cmd: ' + cmd);
+ break;
}
console.log("pwm write");
diff --git a/sim/state/uart.ts b/sim/state/uart.ts
index eeabdb9d..cc612b03 100644
--- a/sim/state/uart.ts
+++ b/sim/state/uart.ts
@@ -88,7 +88,7 @@ namespace pxsim {
const inputNodes = ev3board().getInputNodes();
for (let port = 0; port < DAL.NUM_INPUTS; port++) {
const node = inputNodes[port];
- if (node) {
+ if (node && node.isUart()) {
// Actual
const index = 0; //UartOff.Actual + port * 2;
util.map16Bit(data, UartOff.Raw + DAL.MAX_DEVICE_DATALENGTH * 300 * port + DAL.MAX_DEVICE_DATALENGTH * index, Math.floor(node.getValue()))
diff --git a/sim/visuals/assets/Large Motor.svg b/sim/visuals/assets/Large Motor.svg
index 68a857fe..b25fe9ae 100644
--- a/sim/visuals/assets/Large Motor.svg
+++ b/sim/visuals/assets/Large Motor.svg
@@ -1,69 +1,87 @@
-