Compare commits

...

502 Commits

Author SHA1 Message Date
d0aa68aeee 0.0.63 2018-01-12 13:33:45 -08:00
51731fbbc9 bump pxt-common-packages to 0.15.5, 2018-01-12 13:33:40 -08:00
751ea1494b motor slider fixes and fix motor output in vm 2018-01-12 13:33:25 -08:00
dfe84471e8 Merge pull request #144 from Microsoft/motorslider
Add motor slider control
2018-01-12 13:04:45 -08:00
0f3de6cf07 0.0.62 2018-01-11 22:56:34 -08:00
21195e4abf Datalog (#233)
* support for custom csv separator

* simple datalog frameowrk

* api strings

* hide setfile

* storage fixes

* log seconds, not milliseconds
2018-01-11 22:53:28 -08:00
c992100a38 added option to append CSV headers 2018-01-11 21:36:43 -08:00
20a4673f98 First draft of storage APIs (#122)
* First draft of storage APIs

* bumped pxt-core

* using fixed instances to seprate temp from permanent

* send console to storage

* sim support

* missing sim stubs

* adding storage blocks

* more sim support

* remove storage from default package

* fix rendering of ms

* render raw ms

* slize at better place

* duplicate bundled dir

* refactor limit

* simplify limit logic
2018-01-11 20:05:45 -08:00
966fd81870 0.0.61 2018-01-11 14:08:14 -08:00
cb9d2aeb39 bumping pxt dependency 2018-01-11 14:08:01 -08:00
3cee55f4c2 0.0.60 2018-01-11 13:43:41 -08:00
3815d2fd3b simplifiying brick light api (#231) 2018-01-11 13:43:11 -08:00
1453b7e0a3 gyro reset fix 2018-01-11 11:17:23 -08:00
6fb5c54280 fix build break 2018-01-11 08:55:31 -08:00
9d5ca35e83 fix battery encoding 2018-01-11 08:47:09 -08:00
893dd0f9c4 rename "enter..." to "button enter" 2018-01-11 08:28:25 -08:00
c3419c0b74 support for unregulated motors (#227) 2018-01-10 23:34:27 -08:00
a4164470d8 updated api to align with labview 2018-01-10 22:29:35 -08:00
0dd5ab9bde appliying manual speed 2018-01-10 14:08:50 -08:00
e93e659e8a nit: remove unnecessary comment 2018-01-10 13:51:35 -08:00
8357372fb5 Update to make it more like a crank 2018-01-10 13:47:39 -08:00
54cb076002 Merge pull request #226 from Microsoft/legoavatar
Add lego avatar
2018-01-10 13:03:15 -08:00
dbd3eb464b Add lego avatar 2018-01-10 12:59:53 -08:00
10cd39a4ec Merge branch 'master' into motorslider 2018-01-10 12:52:51 -08:00
fddc4e647a 0.0.59 2018-01-10 12:52:48 -08:00
798a351f15 updated package lock 2018-01-10 12:52:36 -08:00
e61dffff03 fixing threshold 2018-01-10 11:45:08 -08:00
b9f5096480 pause until motor measured move is done 2018-01-10 11:29:27 -08:00
9912d68c8b fixing chassis 2018-01-10 11:14:25 -08:00
951b9be6e4 fixing motors 2018-01-10 11:14:18 -08:00
aa8635c4e7 Always use the motor slider control 2018-01-10 10:00:48 -08:00
4e4f5495da Merge branch 'master' into motorslider 2018-01-10 09:56:59 -08:00
f64bf57000 Merge master 2018-01-10 09:56:32 -08:00
f1242724b5 Fix legofont icons 2018-01-10 09:55:58 -08:00
cd0c9df86e bump to 3.0.8 2018-01-10 08:58:54 -08:00
337d42287a 0.0.58 2018-01-09 22:14:43 -08:00
ce3383f1b7 Turn ratio field editor (#225)
* Turn ratio field editor (initial draft)

* Add field turn ratio editor

* Fix arrow rotation

* Fix left and right direction, remove unnecessary SVG circles.

* Update UI a little. add marker.

* updated math for turnratio angle

* slightly cuter

* cleanup

* consistent naming

* more cleanup

* fixing motor node issue

* updated package version
2018-01-09 22:05:26 -08:00
e51721303a Merge pull request #224 from Microsoft/fixportlabels
Fix port labels in the simulator.
2018-01-09 14:43:26 -08:00
50f6c77fdb Fix port labels in the simulator. Fixes #219 2018-01-09 14:43:01 -08:00
5ed0135124 cleaning up images (#223)
* cleaning up images

* extra comma
2018-01-09 12:51:44 -08:00
892a2d585f Thresholds (#222)
* add threshold blocks

* updated strings

* added gap

* reorg color/gyro blocks

* fixing sound names

* adding stop block

* fixing exanmples
2018-01-09 12:46:48 -08:00
9890f2340a Add no-drag class and set on synced motor labels. Fixes #213 (#221) 2018-01-09 12:04:37 -08:00
109b809909 Sort field port values. Fixes #212 (#220) 2018-01-09 12:01:42 -08:00
9cbf5efd7e 0.0.57 2018-01-08 22:01:11 -08:00
a27a7fcd55 removing measured overloads until blocks support (#215) 2018-01-08 15:27:37 -08:00
85263fb84d Merge branch 'master' of https://github.com/Microsoft/pxt-ev3 2018-01-08 15:13:20 -08:00
b5ad898c9e Screentweak (#214)
* adding pid

* hiding functions

* precision of value
2018-01-08 15:00:00 -08:00
456df3c442 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-01-08 14:43:19 -08:00
1552eb05b4 matter most info 2018-01-08 14:43:15 -08:00
d60e2c4a7d adding pid 2018-01-08 14:36:34 -08:00
f4b78c3ee7 PID example 2018-01-08 14:06:39 -08:00
dd5e1957d5 fix coding page 2018-01-08 14:06:29 -08:00
d61a63f70a avoid overlaps in port view 2018-01-08 09:08:59 -08:00
4207bd06c0 removing microbit font 2018-01-08 08:53:03 -08:00
58763e398b 0.0.56 2018-01-07 23:39:04 -08:00
f77bf165eb updates strings 2018-01-07 20:51:48 -08:00
4880d9ea5b Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-01-07 20:45:56 -08:00
ab4fb019f9 more changes to "print" 2018-01-07 20:45:48 -08:00
2c2df31ba3 Merge pull request #205 from Microsoft/motorshuffle
shuffling motor blocks
2018-01-07 20:34:20 -08:00
0f2bda2496 shuffling motor blocks 2018-01-07 20:33:02 -08:00
44386be3c7 Merge pull request #185 from Microsoft/printlineinverted
invert arguments in print line
2018-01-07 12:14:16 -08:00
89ca66b8a9 Merge pull request #201 from Microsoft/speedfield
Add a speed field editor
2018-01-07 12:11:40 -08:00
64389a7689 more annotations 2018-01-07 10:06:02 -08:00
f77778ef85 Merge branch 'master' into speedfield 2018-01-07 09:59:11 -08:00
7d01823caf remove stopAllMotors on escape key 2018-01-07 09:58:08 -08:00
b3f9a4c92f Make sure we stop motors on exit (#199) 2018-01-07 07:54:40 -08:00
7fe8580de8 Add brick buttons field editor (#202)
* Add brick buttons field editor

* add hover title text
2018-01-07 07:52:07 -08:00
c70d6fe01a Remove unnecessary extra 'light' text in block pauseUntilLight (#203) 2018-01-07 00:12:29 -08:00
ed7099cc97 more square shaped corners 2018-01-06 21:00:39 -08:00
a79704fecc Decompilation and minor PR feedback 2018-01-06 17:16:08 -08:00
6a1b560101 Fix default 2018-01-06 14:40:09 -08:00
5e21f9ab6d Add a speed field editor 2018-01-06 14:25:50 -08:00
74648bd1df Merge pull request #198 from Microsoft/moresquarecorners
More square shaped corners on blocks
2018-01-06 12:55:51 -08:00
e24d4d56b1 More square shaped corners on blocks (toggle rect and arrow corner) 2018-01-06 00:12:32 -08:00
0345277bef 0.0.55 2018-01-06 00:00:40 -08:00
9ae6482f28 fixing isReady query on motors (#197) 2018-01-06 00:00:04 -08:00
77fb64043d stop all motors when pressing escape 2018-01-05 22:56:11 -08:00
f875681661 added roaming 2018-01-05 22:04:18 -08:00
fbb1fa688d fixing gallery 2018-01-05 21:50:50 -08:00
485f02ed27 cruise control activities 2018-01-05 21:49:04 -08:00
81f406c6cc ignition activities 2018-01-05 21:40:11 -08:00
ac0a7b326f 0.0.54 2018-01-05 21:30:05 -08:00
c814728354 pdated ultrasonic default 2018-01-05 21:29:52 -08:00
abeb378b17 reverse beeper 2018-01-05 21:20:00 -08:00
6928f9e50e traffic lights activity 2018-01-05 19:28:24 -08:00
931987468a light the way activities 2018-01-05 19:14:55 -08:00
94c4e508fe reversing the robot 2018-01-05 18:36:20 -08:00
ea46f1cbc7 3 activies from curriculum (#194)
* 3 activies from curriculum

* fixing style
2018-01-05 18:24:23 -08:00
9f9ce29476 Merge branch 'master' of https://github.com/Microsoft/pxt-ev3 2018-01-05 17:35:47 -08:00
50f6b04ed4 Re-implement Math.sign so it works on IE 11 (not supported). Square shaped corners for Flyout 2018-01-05 17:35:25 -08:00
64d6c2b090 Motors cleanup (#192)
* refactoring

* moving chassis into separate project

* added set motors
2018-01-05 16:02:52 -08:00
76ff39605a Remove synced motor label when motors are no longer in sync (#189) 2018-01-05 10:54:42 -08:00
2d3ea5631a Merge pull request #190 from Microsoft/consoleicon
Add console icon and set color.
2018-01-05 10:38:52 -08:00
e938f354fd Add console icon and set color. Fixes #152 2018-01-05 10:38:26 -08:00
886464b470 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-01-05 08:47:26 -08:00
b9ff9d21f1 bump common packages 2018-01-05 08:47:22 -08:00
aa06fd344a store synched motor info always (#187) 2018-01-05 08:40:49 -08:00
dc6ce0efc7 0.0.53 2018-01-05 08:39:30 -08:00
4039a85bc9 Make sure the ESC button always stops the program 2018-01-05 16:17:33 +00:00
7bd6280292 Disable HID deploy from command line (seems broken; was crashing until my previous checkin) 2018-01-05 16:17:20 +00:00
2ebe96e563 Fix command line deploy 2018-01-05 15:33:09 +00:00
a9be582f90 gyro calibration done right (#186) 2018-01-04 23:21:19 -08:00
ac428a3936 invert arguments in print line 2018-01-04 22:13:17 -08:00
de91dc6ab7 Handle the case where multiple motors or multiple sensors are connected to the same port. (#181) 2018-01-04 21:57:01 -08:00
1e460eef9e basic reading of battery level (#182) 2018-01-04 21:50:13 -08:00
0db6987ee5 Add loader and animation (#180) 2018-01-04 16:17:14 -08:00
148657908c Merge pull request #179 from Microsoft/syncedmotorui
Synced motors label (in simulator)
2018-01-04 14:38:29 -08:00
f3f87331c8 nit 2018-01-04 14:09:10 -08:00
5aef77ccc6 Generalizing motorView for both medium and large motor views. Initial work towards synced motor views. Adding sync label for controller motor. 2018-01-04 14:03:50 -08:00
59ca9cf463 0.0.52 2018-01-04 13:04:23 -08:00
7da811246c Behaviors Driven Robotics (#178)
* adding avoid crash behavior

* more implementation

* add another simple behavior

* fixed synched motors

* bump common packages
2018-01-04 12:55:30 -08:00
69f8453947 Merge pull request #177 from Microsoft/sounds_bug_fix
Fix stopAllSounds simulator bug
2018-01-04 12:52:17 -08:00
39ba9b81af Initial work 2018-01-04 12:20:31 -08:00
51a14596cd 0.0.51 2018-01-04 11:41:49 -08:00
8518c446cd Merge pull request #176 from Microsoft/iefonticons
Fix font icons on IE, and add package icon on Windows
2018-01-04 11:40:42 -08:00
2f69df0d9d Fix font icons on IE, and add package icon on Windows 2018-01-04 11:39:20 -08:00
1789d0ce21 Lowercase menubar titles. 2018-01-04 10:42:37 -08:00
d0809510c4 Merge pull request #174 from Microsoft/addbetatag
Add beta tag.
2018-01-04 10:14:43 -08:00
6b9c0eaf65 Add beta tag. #150 2018-01-04 10:14:11 -08:00
52bdf94233 Merge pull request #173 from Microsoft/blockiconfont
Add block icon font
2018-01-04 09:57:11 -08:00
fd50ed8f7c Add block icon font 2018-01-04 09:52:12 -08:00
ba0eb93b0f use common packages tests implementation (#171) 2018-01-04 09:23:28 -08:00
9a4ed45797 0.0.50 2018-01-04 09:19:33 -08:00
820fdf3a3c Merge pull request #172 from Microsoft/fixwinicons
Fix check and cancel icons on windows
2018-01-04 09:18:30 -08:00
348d5ffc26 Fix check and cancel icons on windows 2018-01-04 09:17:30 -08:00
95e47a0b25 Merge pull request #169 from Microsoft/screenimgeditor
Initial screen field editor.
2018-01-04 08:37:56 -08:00
c3312ed5d1 Merge pull request #170 from Microsoft/clearcounts
moving motor blocks around
2018-01-04 08:37:39 -08:00
b7cdc7d0fe moving blocks around 2018-01-04 08:25:02 -08:00
dde5a35cd9 Initial screen field editor. Adding Lego designer assets to legoresources 2018-01-03 17:20:35 -08:00
be398d84ee Merge pull request #135 from Microsoft/field_ports
Add an output port field editor
2018-01-03 17:07:34 -08:00
4445acce7a Split editor extensions into multiple module loaded files. Re-using editor/deploy.ts for cmds. Fixing field ports 2018-01-03 16:18:39 -08:00
d6d8b0655b Merge branch 'master' into field_ports 2018-01-03 15:12:35 -08:00
216aa1ddaf Fix save icon 2018-01-03 15:07:45 -08:00
783a561941 0.0.49 2018-01-03 15:02:35 -08:00
c916664ae7 Fix download and save icons. 2018-01-03 15:02:24 -08:00
4b836ede1b Merge pull request #167 from Microsoft/blockfixes
Block layout fixes.
2018-01-03 14:22:18 -08:00
52fdaeec99 remove colon from print line block 2018-01-03 14:22:00 -08:00
2aaa45e10d Merge pull request #168 from Microsoft/remainingiconfixes
Remaining icon fixes.
2018-01-03 14:21:04 -08:00
7993363e89 Remaining icon fixes. Using blockIcons to show custom icons for built in categories 2018-01-03 14:20:33 -08:00
4d671f6cb0 Block layout fixes. Fixes to screen blocks. Adding print line API. 2018-01-03 14:00:08 -08:00
cc020d5a81 Merge pull request #124 from Microsoft/icon_font
Icon font
2018-01-03 12:35:52 -08:00
5c39862a44 Fix the rest of the icons (sensors, math, variables and extensions) 2018-01-03 12:35:33 -08:00
e0e5c95989 Merge branch 'master' into icon_font 2018-01-03 11:56:28 -08:00
800b4ad224 Merge pull request #165 from Microsoft/fixnullrefthis
Fix null ref for this when _update is called.
2018-01-03 11:42:38 -08:00
40c3b4b0cf Tweaking sensor icon 2018-01-03 11:36:43 -08:00
64bdc35e6f Merge paths for sensor icon 2018-01-03 11:29:49 -08:00
2b5f702bb6 Fix null ref for this when _update is called. 2018-01-03 11:20:37 -08:00
1c81ecd23f send ports data to console 2018-01-03 08:24:54 -08:00
4d223374b5 Differential drive (#164)
* clear sync speed cmd

* differential drive model

* use cm/s

* fixed aggressive clearing of motor sync command

* better computation of turn artio

* improved robot dimensions

* moving block up

* hanbdle infinite case

* correct handling of inifinte time/step

* better stop handling
2018-01-03 00:27:05 -08:00
dd9cf9014f Merge pull request #163 from Microsoft/fixnullderefbuttons
Fix null dereferencing issue for buttons
2018-01-02 23:19:55 -08:00
eb11d7926c Fix null dereferencing issue for buttons 2018-01-02 23:18:54 -08:00
609740dc48 Merge pull request #162 from Microsoft/moresensorfixes
Better fix for null dereferencing issue.
2018-01-02 22:51:45 -08:00
955a2c9757 Better fix for null dereferencing issue. Fix initial Color sensor mode (default). 2018-01-02 22:51:12 -08:00
02838e6c30 Merge pull request #161 from Microsoft/colorgridfixes
Update Color sensor control (colorGrid) to match spec
2018-01-02 22:30:04 -08:00
b0c54e84e6 Update Color sensor control (colorGrid) to match spec 2018-01-02 22:29:12 -08:00
b6644b7a23 Merge pull request #160 from Microsoft/sensorfixes
Sensor fixes. Fix race condition
2018-01-02 22:23:14 -08:00
3c4c38eb59 Fix null dereferencing issue. Fix sensor mode changed not clearing cached control. 2018-01-02 22:22:14 -08:00
29aba7b10b Fix advanced icons 2018-01-02 17:30:19 -08:00
7427142243 Merge branch 'icon_font' of https://github.com/Microsoft/pxt-ev3 into icon_font 2018-01-02 17:17:13 -08:00
436500babb Merge 2018-01-02 17:11:24 -08:00
82be4e344b More work 2018-01-02 17:07:36 -08:00
81bfca4ed6 0.0.48 2018-01-02 16:20:30 -08:00
c35dbdd38f Motor sync support in simulator (#159)
* parse sync motor command

* better sim support

* sync support

* fixing tank
2018-01-02 16:20:00 -08:00
1bc93013e6 0.0.47 2018-01-02 14:51:00 -08:00
58148eb1c3 Square shaped corners for Blockly blocks and dropdowns. (#158) 2018-01-02 13:32:07 -08:00
a7c62b45b2 Use legoIcons font for flyout headings 2018-01-02 13:01:28 -08:00
bd765d49ee Add lego resources.AI 2018-01-02 12:59:48 -08:00
383ca5467d Remove advexpanded/advcollapsed 2018-01-02 12:49:25 -08:00
e240e3b394 Check, cancel 2018-01-02 10:47:04 -08:00
7affbf8cb6 Save, download 2018-01-02 10:47:04 -08:00
4dff282633 Initial work 2018-01-02 10:47:04 -08:00
5d470fdcef Merge pull request #143 from Microsoft/persistselected
Persist selected state of controls across simulator restarts
2017-12-29 14:02:50 -08:00
16b9a5027d Add rotate icons 2017-12-29 11:39:06 -08:00
cbe68b3199 Add motor slider control 2017-12-28 13:23:30 -08:00
f30eac41e9 Persist selected state of controls across simulator restarts 2017-12-28 11:17:18 -08:00
d7f46c0fb5 Hide screen picker properly from typescript 2017-12-28 11:15:53 -08:00
58384017f2 0.0.46 2017-12-28 09:08:27 -08:00
01f7fe633c Motorworks2 (#141)
* fixing polarity

* allocate motor on motorUsed only

* perform sub-step integration step for better precision
2017-12-28 09:07:57 -08:00
a9a9a89811 Better fonts and better alignment of motor reporter control 2017-12-27 20:43:39 -08:00
7e2251d8ac Fix negative motor reporting 2017-12-27 20:35:36 -08:00
1903a6e347 Merge pull request #140 from Microsoft/motorreporters
Add motor reporter control
2017-12-27 20:32:53 -08:00
2fb75a2d83 Added todo 2017-12-27 17:07:50 -08:00
0da175a8cd Add motor reporter control 2017-12-27 17:06:23 -08:00
f01370e4fd Simulator support for motor commands (#137)
* support for "step" functions

* locale files

* enum issue

* fixing decoding of array

* implement clear count

* log unknown commands
2017-12-27 17:05:15 -08:00
751df2fe8c Merge pull request #139 from Microsoft/colorandsliderresizefixes
Fix resizing in controls to work for all sizes including full screen
2017-12-27 16:31:20 -08:00
8be4bb11d8 Fix resizing in controls to work for all sizes including full screen 2017-12-27 16:30:42 -08:00
342e714ae2 Merge pull request #138 from Microsoft/updatemotorassets
Update motor SVG assets and connections
2017-12-27 14:48:50 -08:00
fb31b81f7e Update motor SVG assets and connections 2017-12-27 14:48:15 -08:00
8204995749 Fix wire view to match spec size of wires. 2017-12-26 23:28:29 -08:00
85c14bb05a Fix rotation and distance slider update state 2017-12-26 23:23:26 -08:00
c398a5a133 Update padding and fix wiring order 2017-12-26 23:19:04 -08:00
a1b059171b Add a output port field editor 2017-12-24 17:46:58 -08:00
afaedaa0b2 Merge pull request #134 from Microsoft/fixflickering
Fix resizing flickering issue in the simulator
2017-12-24 16:19:36 -08:00
0aa41e9a64 Fix resizing flickering issue, remove flip animation on start, remove the need for a default height and width in the layout engine 2017-12-24 11:59:01 -08:00
88df2e14cb Merge pull request #125 from Microsoft/sim_refactor_resize
Refactor sim for better resizing and support for multiple controls to be open
2017-12-22 14:01:35 -08:00
180f32f25c Simulator refactoring to support better resizing of modules and controls 2017-12-22 14:00:23 -08:00
995527675a Check, cancel 2017-12-21 11:30:32 -08:00
84eb849bc7 Save, download 2017-12-21 11:10:47 -08:00
5e0e35b4bd Initial work 2017-12-21 11:00:54 -08:00
300a2c1476 Merge pull request #123 from Microsoft/gradient_circle
Gradient circle
2017-12-20 16:34:59 -08:00
703bd01931 Increase stroke width 2017-12-20 16:25:26 -08:00
75a65eeab2 Add lego icons 2017-12-20 16:16:13 -08:00
38a9f153f7 pxtarget 2017-12-20 15:15:12 -08:00
3c5dae8c7b Small changes 2017-12-20 15:11:44 -08:00
85345969d3 Initial work 2017-12-20 14:58:41 -08:00
ac1e5d2846 Remove constant resize 2017-12-19 21:20:06 -08:00
11b4bbc07e Fix controls 2017-12-19 17:20:01 -08:00
7f5b8aed99 more tweaking of angle encoding 2017-12-19 17:15:53 -08:00
c989e2fdab Merge pull request #121 from Microsoft/motorphysics
Motor work
2017-12-19 17:07:15 -08:00
d3dcb5de85 Use setChangedState for touch and color sensors 2017-12-19 17:01:45 -08:00
9cca35d49f encoding 32bit angle into data buffer 2017-12-19 16:54:44 -08:00
7123bfecd3 removing cancel animation stuff 2017-12-19 16:21:14 -08:00
c8ac770983 read motor state into lms_motor 2017-12-19 16:18:17 -08:00
aa031036ee updating motor state in game loop 2017-12-19 16:03:26 -08:00
a7d002d949 0.0.45 2017-12-19 15:10:32 -08:00
93fd8c8c78 removing more icons 2017-12-19 15:10:13 -08:00
1765ca2d35 Merge pull request #116 from Microsoft/revert_screenopt
Use game loop instead of animation queue
2017-12-19 14:58:37 -08:00
1ab7ae6cfa minor PR feedback 2017-12-19 14:57:28 -08:00
3acf4e9ac5 More hardware tests (#119) 2017-12-19 14:55:48 -08:00
ef5fa9ae82 Minor fix to killing the animation when the sim is killed 2017-12-19 14:55:43 -08:00
e1f7a5b8cf Merge pull request #118 from Microsoft/ambient_light_threshold
Set high/low to 20/5 for ambient light mode
2017-12-19 14:42:54 -08:00
2c73bfc813 Set high/low to 20/5 2017-12-19 14:40:30 -08:00
d78d9c8686 basic ports view (#115)
* basic ports view

* slight adjustement of rendering
2017-12-19 14:26:57 -08:00
2157af3e63 Using game loop instead of queueAnimationUpdate 2017-12-19 14:20:35 -08:00
eac3e183c3 better test support 2017-12-19 13:10:40 -08:00
785ddff706 Reverting screen optimization to use SetInterval and didChange 2017-12-19 12:53:12 -08:00
e07d6e3a31 0.0.44 2017-12-19 11:53:50 -08:00
763ad3f763 0.0.43 2017-12-19 11:38:02 -08:00
919a03951c Removing icons (#114)
* removing icons

* added "pause for light"
2017-12-19 11:37:33 -08:00
9e427898ae added test framework (#113)
* added test framework

* added toString on motors

* enabling logs
2017-12-19 07:07:50 -08:00
60bf3a17d3 a mini-console support with scroll up / down (#112)
* a mini-console support with scroll up / down

* fix compile error
2017-12-18 22:36:32 -08:00
0529759a80 Fix ultrasonic value to use cm instead of 0.1 cm units (#110)
* Fix simulator

* use 250 instead of 255
2017-12-18 20:30:56 -08:00
b07f157181 0.0.42 2017-12-18 18:24:46 -08:00
2f5f7d4133 Merge pull request #111 from Microsoft/scale_screen
Add tiny padding around the screen for the canvas.
2017-12-18 17:08:02 -08:00
e6e1dce59f Add tiny padding around the screen for the canvas. 2017-12-18 17:07:23 -08:00
43a9d03231 fixing pauseUntilReady signature 2017-12-18 14:45:44 -08:00
c0f6cd3651 test passing on hw 2017-12-18 14:31:17 -08:00
f1445c6e89 Motor pause until ready (#108)
* adding command to pause until ready

* adding console API

* adding ready support for motors

* fix time output scale

* fixing angle
2017-12-18 14:13:38 -08:00
04275ee35c 0.0.41 2017-12-18 13:22:13 -08:00
f8d0594eca Merge pull request #107 from Microsoft/initial_sim
Initial sim implementation
2017-12-18 13:21:48 -08:00
5be3b31e00 Merge branch 'master' into initial_sim 2017-12-18 13:21:35 -08:00
84c1079e50 Fix Safari bug. 2017-12-18 13:19:49 -08:00
6320379d02 Initial sim implementation 2017-12-18 13:04:17 -08:00
b166f6034e storing test 2017-12-18 09:43:44 -08:00
d07f672b28 fixing single motor set speed 2017-12-18 09:17:19 -08:00
363e076f36 fixing motor compilation 2017-12-18 08:54:53 -08:00
8bf6f265f7 Merge pull request #105 from Microsoft/motorfixes
Motor fixes
2017-12-18 00:54:53 -08:00
217958aec3 fix polarity 2017-12-17 23:19:38 -08:00
367b1b0d1a properly setting multiple-motor options 2017-12-17 23:00:07 -08:00
6836852122 refactoring motors wiht base class (#104) 2017-12-17 22:47:13 -08:00
944098b9f9 Minor refactor fix (#102)
* Minor fix to a refactor of motor output this.brake to this._brake

* No (_this) in global context

* Minor fix
2017-12-17 21:12:18 -08:00
539cf3d73e 0.0.40 2017-12-15 14:30:51 -08:00
4b3e7cfb7d bump pxt-core to 3.0.2, bump pxt-common-packages to 0.14.13, 2017-12-15 14:30:43 -08:00
b144744509 Add tsconfig.json for easier library editing (#96) 2017-12-15 14:29:31 -08:00
e591bed6ad Add 'clear screen' block to brick category (#100) 2017-12-15 14:29:10 -08:00
6a4e64eac0 Merge pull request #79 from Microsoft/motorsync
Motor sync block
2017-12-15 14:28:03 -08:00
f7dd14ff7b Merge pull request #88 from Microsoft/even_more_sounds
Add 'stopAllSounds' block
2017-12-15 11:36:31 -08:00
bfd34cedd6 Update built files 2017-12-15 11:04:16 -08:00
8e1c075911 Merge pull request #98 from Microsoft/portFixes
Fix order of color and ultrasonic sensor ports.
2017-12-15 10:45:34 -08:00
a02f364a4c Update function names for consistency 2017-12-15 10:42:44 -08:00
48fee2c215 Merge pull request #99 from Microsoft/ui_changes
Some UI theming. square buttons
2017-12-15 08:55:45 -08:00
5780d1982c Some UI theming. square buttons 2017-12-15 08:55:21 -08:00
6fb08f0f7b Fix order of color and ultrasonic sensor ports. 2017-12-15 07:48:42 -08:00
13f8659b98 Merge pull request #97 from Microsoft/startup_delay
Startup delay for sensors to get values
2017-12-15 07:05:21 -08:00
edc9d17a8c Merge pull request #95 from Microsoft/serialnumber
Implement getSerialNumber (based on BT MAC)
2017-12-15 07:04:21 -08:00
c7a3f5bbd0 Delay user code by 100ms to get sensor reading (fixes #90) 2017-12-15 11:55:20 +00:00
41d5052583 Run sensor "change handler" also with the initial value 2017-12-15 11:54:53 +00:00
07ddec343a Formatting 2017-12-15 11:30:15 +00:00
5a9a5e997a Error reporting fixes 2017-12-15 11:29:18 +00:00
55b6549999 Implement getSerialNumber (based on BT MAC) 2017-12-15 11:25:23 +00:00
fcdc350e40 more motor work 2017-12-14 17:01:23 -08:00
9dedbeae1b updated parameters 2017-12-14 13:26:04 -08:00
124d8a0fd8 tank support 2017-12-14 13:25:27 -08:00
81fcbb6916 tweaks of blocks 2017-12-14 13:07:10 -08:00
d436bd1227 Fix simulator stop() method 2017-12-14 09:41:01 -08:00
cb648019bb Progress 2017-12-14 09:17:47 -08:00
11a88a9d94 updated signatures 2017-12-13 23:00:37 -08:00
92178f3371 bring back speed 2017-12-13 22:54:08 -08:00
3c86ae286f more work on motors 2017-12-13 22:40:40 -08:00
1b6d84a9b8 Merge branch 'master' into motorsync 2017-12-13 21:16:33 -08:00
2d81be3b24 Add 'stopAllSounds' block 2017-12-13 16:31:42 -08:00
14f57f54bf Merge pull request #87 from Microsoft/motor_fix_2
Motor data fix
2017-12-13 15:56:17 -08:00
e7c697c24d Merge pull request #85 from Microsoft/on_color_fix
Fix "on color detected" block
2017-12-13 15:55:47 -08:00
7ac63f038c Merge pull request #84 from Microsoft/fix_image_attrs
Adding block identity
2017-12-13 15:55:36 -08:00
557926d631 Merge pull request #78 from Microsoft/waitUntiltopauseUntil
renaming all "wait until" to "pause until"
2017-12-13 15:52:46 -08:00
da62d51615 Merge branch 'master' into motor_fix_2 2017-12-13 15:48:43 -08:00
3918857fcc Merge branch 'master' into on_color_fix 2017-12-13 15:48:24 -08:00
f1dcebdd88 Merge branch 'master' into fix_image_attrs 2017-12-13 15:48:09 -08:00
1d35c78737 Merge branch 'master' into motorsync 2017-12-13 15:47:52 -08:00
d17326ad7a Merge branch 'master' into waitUntiltopauseUntil 2017-12-13 15:47:27 -08:00
4948a88833 Merge pull request #83 from Microsoft/new_ts_cleanup
New ts cleanup
2017-12-13 15:46:58 -08:00
b73b924ec4 ignoreing docs errors 2017-12-13 15:35:53 -08:00
641d292c33 Clean commit for motor fix 2017-12-13 14:55:14 -08:00
223275fd65 Moving a line of code 2017-12-13 13:35:28 -08:00
6e42e816d3 Adding block identity 2017-12-13 10:42:49 -08:00
5678cf5df9 Fixing test file 2017-12-13 10:29:12 -08:00
67ec4accb9 Monitor memory usage and panic on over 8MB used 2017-12-13 15:28:52 +00:00
fa867c3a34 Cleanup 2017-12-12 15:24:36 -08:00
7865876e64 Merge branch 'master' into waitUntiltopauseUntil 2017-12-12 14:19:35 -08:00
113b42656c sync command working 2017-12-12 14:08:45 -08:00
7557380722 adding sync command 2017-12-12 13:20:25 -08:00
3e2a1ec9e1 missing strings files 2017-12-12 11:23:29 -08:00
09db613620 updated docs 2017-12-12 10:49:45 -08:00
bacb4673c9 renaming all "wait until" to "pause until" 2017-12-12 10:46:56 -08:00
e649a167cd Merge pull request #74 from Microsoft/powertospeed
some speed renamings
2017-12-11 23:20:17 -08:00
997e8efb20 Merge branch 'master' of https://github.com/Microsoft/pxt-ev3 2017-12-11 17:08:12 -08:00
1f380ce959 0.0.39 2017-12-11 17:00:06 -08:00
8cbf601131 0.0.38 2017-12-11 17:00:03 -08:00
bdbb2a8c2f Fix on start color 2017-12-11 16:58:29 -08:00
5e90cb4434 Merge pull request #75 from Microsoft/new_ts
Update to latest TS and update blocks colors to match Lego's edu colors
2017-12-11 16:55:25 -08:00
1bf1eb16f0 Update to latest TS and update blocks colors to match Lego's edu colors 2017-12-11 16:55:00 -08:00
fbc6fc30a7 some speed renamings 2017-12-11 16:07:46 -08:00
fee2329ca7 Merge branch 'master' of https://github.com/Microsoft/pxt-ev3 2017-12-08 11:23:07 -08:00
5656031e2d Merge pull request #73 from Microsoft/more_sounds
Limit sound concurrency to 1
2017-12-08 11:21:21 -08:00
e87e1767b5 Null check 2017-12-08 11:16:47 -08:00
2d7a108e79 Fix merge conflict 2017-12-07 16:28:30 -08:00
193f66fd2d Limit sound concurrency to 1 2017-12-07 16:27:28 -08:00
5768fcaf35 Merge branch 'master' of https://github.com/Microsoft/pxt-ev3 2017-12-07 13:58:38 -08:00
2c22ea925f Merge pull request #69 from Microsoft/sounds
Get rid of "play sound" blocks; add non-blocking "play sound effect"
2017-12-07 11:53:04 -08:00
4e4aa266d5 Limit sound concurrency 2017-12-07 11:27:29 -08:00
05bdbd7b40 icon resources 2017-12-07 08:33:13 -08:00
085ab0844b rename "power" to "set speed" for consistency 2017-12-06 22:41:51 -08:00
4ad229cb37 0.0.37 2017-12-06 22:35:03 -08:00
170ee33848 bump pxt-core to 2.3.37, 2017-12-06 22:34:52 -08:00
162e437527 using icons on drop downs 2017-12-06 22:34:11 -08:00
ab13cb9047 adding a few more icons 2017-12-06 21:40:00 -08:00
80454f55c7 0.0.36 2017-12-06 16:31:06 -08:00
30e576345b more icon updates 2017-12-06 16:29:21 -08:00
dfc4c83718 resizing svg to sqaures
updates some icons
2017-12-06 16:22:31 -08:00
e25d273765 LEGO resources 2017-12-06 15:57:40 -08:00
903e98ca22 Merge pull request #70 from Microsoft/nodefaultinfrared
removing infrared from default ev3 configuration
2017-12-05 11:15:17 -08:00
8a64085288 enable language/high contrast 2017-12-05 10:53:26 -08:00
22ab1cba8d removing infrared from default ev3 configuration 2017-12-05 10:49:48 -08:00
064d6f9411 Check if sound not defined 2017-12-04 12:24:41 -08:00
330aff8082 Restore 'play sound effect' name 2017-12-01 09:59:59 -08:00
0886a5d4e1 Merge branch 'master' of https://github.com/Microsoft/pxt-ev3 2017-11-30 15:54:11 -08:00
aa636aef96 Separate blocks for 'play sound' and 'play sound until done' 2017-11-30 15:49:50 -08:00
1865ced312 Merge pull request #67 from Microsoft/note_default
Default piano note should be 1046
2017-11-30 15:41:55 -08:00
b940befe85 Default piano note should be 1046 2017-11-30 12:44:22 -08:00
c6bae5e17b missed files 2017-11-30 11:28:20 -08:00
83e4898eab Merge pull request #66 from Microsoft/gyroproject
moving gyro into separate project
2017-11-30 10:47:13 -08:00
7bdb9683c9 fixing naming 2017-11-30 10:37:59 -08:00
3c675892aa moving gyro into separate project 2017-11-30 10:34:34 -08:00
3d29c5e323 0.0.35 2017-11-30 10:16:04 -08:00
15d59269d4 bump pxt-core to 2.3.31, 2017-11-30 10:15:54 -08:00
73b5e7dc3f Merge pull request #65 from Microsoft/ultrasonicsensor
Ultrasonic/IR sensor refactoring work
2017-11-30 10:14:30 -08:00
a92edcffee adding waitUntil to buttons 2017-11-30 10:05:00 -08:00
305a650125 using threshold detector 2017-11-30 09:59:28 -08:00
34a5aeb7d2 moving IR as well 2017-11-30 09:53:43 -08:00
32f524ddd8 fixing build 2017-11-30 09:48:43 -08:00
b690c1634b updated distance detection 2017-11-30 09:41:34 -08:00
8089841892 wait until 2017-11-30 09:39:24 -08:00
3d8c697586 moving into separate project 2017-11-30 09:38:04 -08:00
e365e3d1be Merge pull request #64 from Microsoft/color-sensor
Color sensor refactoring
2017-11-30 08:55:50 -08:00
4ed41adb6a avoid conflicts of event values 2017-11-30 08:31:31 -08:00
39b7f99741 update mode selection 2017-11-30 08:20:00 -08:00
ad17191ae2 collapse reflected/ambient blocks 2017-11-29 22:47:17 -08:00
4a8633f506 updated descriptions 2017-11-29 22:11:59 -08:00
3690f409b0 docs skeleton 2017-11-29 22:09:12 -08:00
97663d2b83 updated naming 2017-11-29 21:57:05 -08:00
4d2b7ced71 moving color sensor to separate project 2017-11-29 21:41:00 -08:00
5676103052 Merge pull request #63 from Microsoft/speedispower
use speed when setting power
2017-11-29 21:22:32 -08:00
cb8c14fbb1 Allow waitForEvent on main thread; fixes #60
also use target_panic() instead of assert
2017-11-29 19:54:17 -03:00
815d438d86 use speed when setting power 2017-11-29 00:04:54 -08:00
da8de1e31e Merge pull request #56 from Microsoft/note 2017-11-28 17:00:57 -08:00
b028916025 Increment pxt-core and pxt-common-packages dependencies 2017-11-28 16:48:16 -08:00
b9be74bad8 Merge pull request #59 from Microsoft/touch
adding touch button examples
2017-11-28 16:35:48 -08:00
7e502b1749 adding bare docs 2017-11-28 16:24:22 -08:00
f22edac84d moving touch stuff into separate projects 2017-11-28 16:11:15 -08:00
ef2807a84e Fill in real min and max 2017-11-28 16:04:25 -08:00
580b40876c fixing bumped 2017-11-28 16:02:04 -08:00
b57ae5d588 implement wasPressed 2017-11-28 15:33:43 -08:00
71479d0caa adding touch button examples 2017-11-28 15:23:54 -08:00
7e39cdde9d Add a todo 2017-11-27 17:21:32 -08:00
85ca6b3698 Support for new data structure 2017-11-27 14:12:04 -08:00
2c89848fda More 2017-11-21 17:11:11 -08:00
ed1c187514 Initial work 2017-11-21 11:35:53 -08:00
52816e6de7 Merge pull request #51 from Microsoft/debugging
Add debug function
2017-11-20 10:54:44 -08:00
60ac3a9d00 0.0.34 2017-11-18 07:37:59 -08:00
d2c7a5ace0 support for wait/when 2017-11-18 07:37:46 -08:00
79fcd1c01e 0.0.33 2017-11-18 07:34:50 -08:00
2d48725c63 bump pxt-core to 2.3.28, bump pxt-common-packages to 0.14.3, 2017-11-18 07:34:40 -08:00
802c3db0ba 0.0.32 2017-11-17 14:12:32 -08:00
4a7e8c5fa8 adding block for sounds 2017-11-16 23:28:44 -08:00
0ebffd8549 0.0.31 2017-11-16 22:55:51 -08:00
988a2b638b add icon 2017-11-16 22:52:29 -08:00
fb743dea74 Merge pull request #50 from Microsoft/icons
Icons in blocks
2017-11-16 22:48:35 -08:00
e400637ba1 Merge branch 'master' into icons 2017-11-16 22:47:40 -08:00
b2768b1099 added showimage 2017-11-16 22:46:51 -08:00
3a5885b28e 0.0.30 2017-11-16 22:25:36 -08:00
b602b52f7d bump pxt-core to 2.3.27, 2017-11-16 22:25:26 -08:00
90afb60cc4 bump pxt-core to 2.3.26, bump pxt-common-packages to 0.14.2, 2017-11-16 22:04:29 -08:00
c936c16c33 more icons 2017-11-16 22:03:43 -08:00
ead69e3c6e Add debug function 2017-11-16 16:28:10 -08:00
d100026d5c more icons 2017-11-16 13:05:50 -08:00
41c2899feb more icons 2017-11-16 13:03:15 -08:00
9437873427 more images 2017-11-16 12:58:37 -08:00
dab281a9cb including a few icons in block names 2017-11-16 12:41:47 -08:00
f27fb4d93c 0.0.29 2017-11-09 10:29:24 -08:00
11fb82eba9 Merge pull request #49 from Microsoft/updatepxt
Update pxt
2017-11-09 19:28:55 +01:00
170e6b700b updating to latest pxt 2017-11-09 10:24:12 -08:00
387ad763f8 bump pxt-core to 2.3.19, bump pxt-common-packages to 0.12.17, 2017-11-09 10:14:47 -08:00
0e61f162bb Fix style to match latest changes in master. 2017-10-31 11:27:18 -07:00
400f01a6be fixing duplicate block id 2017-10-31 09:42:53 -07:00
afcbe69c44 0.0.28 2017-10-31 09:04:27 -07:00
9165fe09fc bump pxt-core to 2.3.6, 2017-10-31 09:04:20 -07:00
08f36fbb94 Merge pull request #30 from Microsoft/jres
Import images and sounds from ev3 EDU
2017-10-31 16:48:24 +01:00
afca2aa4d1 Merge pull request #45 from Microsoft/motorsrename
API tinkering
2017-10-31 16:43:27 +01:00
3c6c766412 removing lego resources 2017-10-30 21:54:23 -07:00
329a1e15ea simplified IR API 2017-10-30 21:39:50 -07:00
16a025f3a0 simplified motor API 2017-10-30 21:29:18 -07:00
26b975b5f2 images 2017-10-30 14:51:14 -07:00
79b9bce904 Merge branch 'master' into jres 2017-10-30 13:29:45 -07:00
d3d9fa6ca0 Merge branch 'master' into jres 2017-10-30 13:29:16 -07:00
8f5c930f76 Update UI to latest. 2017-10-30 13:21:03 -07:00
a082807455 Fix locking in waitForEvent() and sample playing 2017-10-30 19:18:01 +00:00
3469f51b7b Don't need to use freshcoat branch of pxt (#31) 2017-10-30 19:06:49 +00:00
e8e31e6aa7 Fix brick.print() 2017-10-30 19:03:45 +00:00
2df90152fe Remove debug output 2017-10-30 18:56:03 +00:00
e25590539e Add sample-playing code 2017-10-30 18:55:23 +00:00
a7795302fc Make it compile with master 2017-10-30 18:54:53 +00:00
480d89ba8e Added swift stuff 2017-10-30 11:46:06 -07:00
9487d324fd added link to gitlab 2017-10-30 11:45:02 -07:00
bfc95e075e Merge branch 'master' into jres 2017-10-30 18:48:18 +01:00
7d4ba9b2b2 0.0.27 2017-10-30 10:47:03 -07:00
71b83040e6 bump pxt-core to 2.3.5, bump pxt-common-packages to 0.12.4, 2017-10-30 10:46:56 -07:00
1976534da0 Merge pull request #28 from Microsoft/sensorscat
Aligning categories with LabView/RobotC
2017-10-30 18:46:27 +01:00
ebbbe6e86c Add sounds (only simulator for now) 2017-10-30 17:25:58 +00:00
c4a9b4a381 updated brick color 2017-10-30 09:58:00 -07:00
c7d36a5e82 moving motors up 2017-10-30 09:55:36 -07:00
c8c45be057 fixing brick groups 2017-10-30 09:51:18 -07:00
a8a7267851 Add LEGO EDU images 2017-10-30 15:34:47 +00:00
9cdb4081fd Add PNG decompressor in SIM 2017-10-30 14:42:08 +00:00
dcb398d3d5 Rename Icon to Image 2017-10-30 13:28:01 +00:00
f6e350cf9f Add separate type for Icons (same repr as buffer) 2017-10-30 13:04:12 +00:00
c085094394 Add screen::unpackPNG() 2017-10-30 12:45:37 +00:00
7c2ea7c406 fixing more groups 2017-10-28 09:20:34 -07:00
84b98a2788 brick namespace 2017-10-28 09:13:02 -07:00
4e99cd3ef1 0.0.26 2017-10-27 19:23:01 +01:00
57647318c4 Sensor fixes 2017-10-27 19:18:56 +01:00
2720698864 Fix infinite loop 2017-10-27 19:18:47 +01:00
dfe2fe3cff brick refactoring 2017-10-27 11:05:04 -07:00
18fefa2a44 output -> motors 2017-10-27 11:01:11 -07:00
c0bab4877a Merge branch 'master' of github.com:Microsoft/pxt-ev3 2017-10-27 15:17:24 +01:00
d2a1d10ada Add converter from RGF to PNG 2017-10-27 15:17:21 +01:00
bcb68d937d Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2017-10-27 02:52:47 -07:00
05a8395028 stop all motors 2017-10-27 02:52:42 -07:00
3a1601a419 Add rsf2wav.js 2017-10-27 10:42:33 +01:00
712c2178d2 simplify motor API 2017-10-27 01:47:25 -07:00
12cdad72c8 added puppet 2017-10-27 00:13:51 -07:00
95076f8f24 differentiate large/medium motors 2017-10-27 00:09:00 -07:00
6391620373 added 2 more activities 2017-10-26 23:58:34 -07:00
86212e2153 added sound of color 2017-10-26 23:46:55 -07:00
98e430f3c1 added example of converted lesson 2017-10-26 22:19:16 -07:00
5c7e856e7b removed incorrect buy link 2017-10-26 21:57:48 -07:00
a47988913e 0.0.25 2017-10-26 21:27:51 -07:00
ea72dba6c7 Merge pull request #17 from Microsoft/irevents
Ultrasonic + IR events + Remote events
2017-10-27 06:25:02 +02:00
215e846a54 refactored remote button 2017-10-26 21:10:37 -07:00
21b34cb459 simplified events 2017-10-26 20:57:18 -07:00
282134f5dc refactoring IR 2017-10-26 20:51:13 -07:00
6b44352839 event for ultrasonic module 2017-10-26 20:38:17 -07:00
9a883d5672 Merge branch 'master' into irevents 2017-10-26 20:21:06 -07:00
59ce4338d3 renaming IR events 2017-10-26 20:20:24 -07:00
90560050b8 Merge pull request #16 from Microsoft/fonts
Mounting events on various sensors
2017-10-27 05:19:36 +02:00
2c72173bfe Use the _query() infrastructure for polling 2017-10-25 13:34:05 +02:00
1a5992408b added event for color changes 2017-10-24 23:10:27 -07:00
0e1a3b7e6b adding setpixel 2017-10-24 22:05:24 -07:00
ea6bfa03bd touched -> pressed 2017-10-24 21:55:37 -07:00
20d584db2b 0.0.24 2017-10-24 21:18:16 -07:00
0e4e0d8899 0.0.23 2017-10-24 21:09:56 -07:00
a18a690417 Merge pull request #12 from Microsoft/motors
Converting motors to fixed instances
2017-10-25 06:09:27 +02:00
c9d57c5e8d enabling banner 2017-10-24 21:08:02 -07:00
7e9d42a571 reset motors on start 2017-10-24 20:28:31 -07:00
1b51320edb pausing while running motor 2017-10-24 20:20:07 -07:00
4f44238237 use fixed instances for motors 2017-10-24 20:16:33 -07:00
c8ffa0ded7 fixed test 2017-10-24 18:49:15 -07:00
6b07d5f716 0.0.22 2017-10-24 18:48:30 -07:00
8784e23b60 fixed build link 2017-10-24 17:01:36 -07:00
4b8409fbc0 0.0.21 2017-10-24 16:56:52 -07:00
3237978cba Merge pull request #4 from Microsoft/blockupdate
Blocks update
2017-10-24 16:56:32 -07:00
33c8902050 aligning groups with hardware name components 2017-10-24 16:52:13 -07:00
fa6c81cf80 buttons -> brick buttons 2017-10-24 16:25:03 -07:00
46175fc7db separating touch sensor stuff 2017-10-24 15:58:47 -07:00
e6ef86101f more renaming 2017-10-24 15:37:48 -07:00
c4d3d7634e fixed naming of sonar 2017-10-24 15:35:42 -07:00
b0380fbef8 more annotations 2017-10-24 15:33:28 -07:00
c85c68ab68 fixing color / gyro 2017-10-24 15:22:07 -07:00
334d5aca9a on/off field editors on motors 2017-10-24 15:03:21 -07:00
1330a0fb82 fixed gyro def 2017-10-24 14:54:36 -07:00
005447ce44 4 times more sensors\! 2017-10-24 19:58:52 +01:00
60d5271de2 Merge branch 'master' into blockupdate 2017-10-24 10:02:27 -07:00
e3ab6ace55 0.0.20 2017-10-24 10:01:49 -07:00
5f4488dea7 Merge pull request #3 from Microsoft/pxtupdate
Updated to latest of pxt / common
2017-10-24 10:00:41 -07:00
07dc3bdae1 fixing docs compilation 2017-10-24 09:55:38 -07:00
5d5d78ced0 compiled strings 2017-10-24 09:47:30 -07:00
fe46461c4c adding a few more blocks 2017-10-24 05:30:05 -07:00
ccda971fd1 Bump PXT and common packages 2017-10-24 12:50:00 +01:00
8fa6cf41ca updated build files 2017-10-23 13:43:59 -07:00
aa3c6d5fc0 bump pxt-core to 2.3.1, bump pxt-common-packages to 0.10.16, 2017-10-23 13:41:38 -07:00
6a719e7718 Use field toggle for switching the motor on / off 2017-10-04 17:04:26 -04:00
b18b8333d0 Remove button group 2017-10-03 02:31:06 -04:00
84d80131d4 Various UI fixes. Block refactoring and adding touch and color blocks. 2017-10-03 02:28:44 -04:00
369 changed files with 29035 additions and 5060 deletions

1
.gitignore vendored
View File

@ -31,3 +31,4 @@ videos/**
lib/ lib/
.vscode/ .vscode/
bin bin
scripts/out.*

View File

@ -1,9 +1,12 @@
# LEGO Mindstorms EV3 target for PXT # LEGO Mindstorms EV3 target for PXT
[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Private/pxt_project_pink/master/pxt-ev3_Push)](https://ci2.dot.net/job/Private/job/pxt_project_pink/job/master/job/pxt-ev3_Push/) [![Build Status](https://ci2.dot.net/buildStatus/icon?job=Private/pxt_project_rainbow/master/pxt-ev3_Push)](https://ci2.dot.net/job/Private/job/pxt_project_rainbow/job/master/job/pxt-ev3_Push/)
This repo contains the editor target hosted at https://d541eec2-1e96-4b7b-a223-da9d01d0337a.pxt.io/ This repo contains the editor target hosted at https://d541eec2-1e96-4b7b-a223-da9d01d0337a.pxt.io/
LEGO Auth: https://src.education.lego.com/groups/ev3-makecode (use Google Authenticator)
LEGO Chat: https://chat.internal.education.lego.com/make-code/channels/town-square
## Local Dev setup ## Local Dev setup
These instructions assume familiarity with dev tools and languages. These instructions assume familiarity with dev tools and languages.
@ -14,7 +17,7 @@ These instructions assume familiarity with dev tools and languages.
In a common folder, In a common folder,
* clone https://github.com/Microsoft/pxt to ``pxt`` folder (currently, build against `freshcoat` branch) * clone https://github.com/Microsoft/pxt to ``pxt`` folder
* clone https://github.com/Microsoft/pxt-common-packages to ``pxt-common-packages`` folder * clone https://github.com/Microsoft/pxt-common-packages to ``pxt-common-packages`` folder
* clone https://github.com/Microsoft/pxt-ev3 to ``pxt-ev3`` folder * clone https://github.com/Microsoft/pxt-ev3 to ``pxt-ev3`` folder
* go to ``pxt`` and run * go to ``pxt`` and run

View File

@ -1,16 +1,11 @@
/// <reference path="../node_modules/pxt-core/typings/globals/node/index.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" /> /// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
import * as fs from 'fs'; import * as fs from 'fs';
require("./editor") const deploy = require("./editor/deploy")
declare namespace pxt.editor {
function deployCoreAsync(resp: pxtc.CompileResult, disconnect?: boolean): Promise<void>;
}
export function deployCoreAsync(resp: pxtc.CompileResult) { export function deployCoreAsync(resp: pxtc.CompileResult) {
return pxt.editor.deployCoreAsync(resp, process.env["PXT_SERIAL"] ? false : true) return deploy.deployCoreAsync(resp, process.env["PXT_SERIAL"] ? false : true)
.then(() => { .then(() => {
fs.writeFileSync("built/full-" + pxtc.BINARY_UF2, resp.outfiles[pxtc.BINARY_UF2], { fs.writeFileSync("built/full-" + pxtc.BINARY_UF2, resp.outfiles[pxtc.BINARY_UF2], {
encoding: "base64" encoding: "base64"

View File

@ -1,4 +1,3 @@
/// <reference path="../node_modules/pxt-core/typings/globals/node/index.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" /> /// <reference path="../node_modules/pxt-core/built/pxtlib.d.ts" />
import * as path from "path"; import * as path from "path";

View File

@ -8,6 +8,7 @@
"module": "commonjs", "module": "commonjs",
"rootDir": ".", "rootDir": ".",
"newLine": "LF", "newLine": "LF",
"sourceMap": false "sourceMap": false,
"types": ["node"]
} }
} }

View File

@ -3,9 +3,3 @@
## Reference #reference ## Reference #reference
* [Reference](/reference) * [Reference](/reference)
* [input](/reference/input)
* [light](/reference/light)
* [music](/reference/music)
* [pins](/reference/pins)
* [control](/reference/control)
* [serial](/reference/serial)

171
docs/coding.md Normal file
View File

@ -0,0 +1,171 @@
# Coding Activites
12 computer science activities, with cross-curricular opportunities in design and technology, science, and math.
* [Download Curriculum Materials](https://education.lego.com/en-us/downloads/mindstorms-ev3)
## Three Point Turn
```codecard
[
{
"name": "Three Point Turn 1",
"description": "Activity 1",
"url":"/coding/three-point-turn-1",
"cardType": "example"
}, {
"name": "Three Point Turn 2",
"description": "Activity 2",
"url":"/coding/three-point-turn-2",
"cardType": "example"
}, {
"name": "Three Point Turn 3",
"description": "Activity 3",
"url":"/coding/three-point-turn-3",
"cardType": "example"
}]
```
## Reversing the robot
```codecard
[{
"name": "Reversing the robot 1",
"description": "Activity 1",
"url":"/coding/reversing-the-robot-1",
"cardType": "example"
}, {
"name": "Reversing the robot 2",
"description": "Activity 2",
"url":"/coding/reversing-the-robot-2",
"cardType": "example"
}, {
"name": "Reversing the robot 3",
"description": "Activity 3",
"url":"/coding/reversing-the-robot-3",
"cardType": "example"
}]
```
## Light the way
```codecard
[{
"name": "Light the way 1",
"description": "Activity 1",
"url":"/coding/light-the-way-1",
"cardType": "example"
}, {
"name": "Light the way 2",
"description": "Activity 2",
"url":"/coding/light-the-way-2",
"cardType": "example"
}, {
"name": "Light the way 3",
"description": "Activity 3",
"url":"/coding/light-the-way-3",
"cardType": "example"
}
]
```
## Traffic Lights
```codecard
[{
"name": "Traffic Lights 1",
"description": "Activity 1",
"url":"/coding/traffic-lights-1",
"cardType": "example"
}, {
"name": "Traffic Lights 2",
"description": "Activity 2",
"url":"/coding/traffic-lights-2",
"cardType": "example"
}, {
"name": "Traffic Lights 3",
"description": "Activity 3",
"url":"/coding/traffic-lights-3",
"cardType": "example"
}
]
```
## Reverse Bepper
```codecard
[{
"name": "Reverse Beeper 1",
"description": "Activity 1",
"url":"/coding/reverse-beeper-1",
"cardType": "example"
}, {
"name": "Reverse Beeper 2",
"description": "Activity 2",
"url":"/coding/reverse-beeper-2",
"cardType": "example"
}, {
"name": "Reverse Beeper 3",
"description": "Activity 3",
"url":"/coding/reverse-beeper-3",
"cardType": "example"
}]
```
## Ignition
```codecard
[{
"name": "Ignition 1",
"description": "Activity 1",
"url":"/coding/ingition-1",
"cardType": "example"
}, {
"name": "Ignition 2",
"description": "Activity 2",
"url":"/coding/ignition-2",
"cardType": "example"
}, {
"name": "Ignition 3",
"description": "Activity 3",
"url":"/coding/ignition-3",
"cardType": "example"
}]
```
## Cruise Control
```codecard
[{
"name": "Cruise Control 1",
"description": "Activity 1",
"url":"/coding/cruise-control-1",
"cardType": "example"
}, {
"name": "Cruise Control 2",
"description": "Activity 2",
"url":"/coding/cruise-control-2",
"cardType": "example"
}, {
"name": "Cruise Control 3",
"description": "Activity 3",
"url":"/coding/cruise-control-3",
"cardType": "example"
}]
```
## Roaming
```codecard
[{
"name": "Roaming 1",
"description": "Activity 1",
"url":"/coding/roaming-1",
"cardType": "example"
}, {
"name": "Roaming 2",
"description": "Activity 2",
"url":"/coding/roaming-2",
"cardType": "example"
}]
```

View File

@ -0,0 +1,10 @@
# Cruise Control Activity 1
```blocks
let speed = 0;
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
if (speed < 100)
speed = speed + 10;
motors.largeBC.setSpeed(speed);
})
```

View File

@ -0,0 +1,15 @@
# Cruise Control Activity 2
```blocks
let speed = 0;
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
if (speed < 100)
speed = speed + 10;
motors.largeBC.setSpeed(speed);
})
sensors.touch2.onEvent(TouchSensorEvent.Pressed, function () {
if (speed > -100)
speed = speed - 10;
motors.largeBC.setSpeed(speed);
})
```

View File

@ -0,0 +1,28 @@
# Cruise Control Activity 3
```blocks
let speed = 0
function decelerate() {
if (speed > -100) {
speed = speed - 10
}
}
function accelerate() {
if (speed < 100) {
speed = speed + 10
}
}
function update() {
brick.clearScreen()
brick.showString("speed: " + speed, 1)
motors.largeBC.setSpeed(speed)
}
sensors.touch2.onEvent(TouchSensorEvent.Pressed, function () {
accelerate()
update()
})
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
decelerate()
update()
})
```

11
docs/coding/ignition-1.md Normal file
View File

@ -0,0 +1,11 @@
# Ignition Activity 1
```blocks
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
brick.showImage(images.eyesDizzy)
})
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectDetected, function () {
brick.showImage(images.eyesTiredMiddle)
})
brick.showImage(images.eyesSleeping)
```

12
docs/coding/ignition-2.md Normal file
View File

@ -0,0 +1,12 @@
# Ignition Activity 2
```blocks
while (true) {
if (sensors.touch1.wasPressed() &&
sensors.ultrasonic4.distance() < 10) {
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
}
loops.pause(1);
}
```

13
docs/coding/ignition-3.md Normal file
View File

@ -0,0 +1,13 @@
# Ignition Activity 3
```blocks
while (true) {
if (sensors.ultrasonic4.distance() < 10 &&
sensors.touch1.wasPressed() &&
brick.buttonEnter.wasPressed()) {
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
}
loops.pause(1);
}
```

View File

@ -0,0 +1,9 @@
# Light the way Activity 1
```blocks
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
brick.showImage(images.objectsLightOn)
loops.pause(5000)
brick.clearScreen()
})
```

View File

@ -0,0 +1,10 @@
# Light the way Activity 2
```blocks
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Bright, function () {
brick.clearScreen()
})
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
brick.showImage(images.objectsLightOn)
})
```

View File

@ -0,0 +1,13 @@
# Light the way Activity 3
```blocks
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Bright, function () {
brick.clearScreen()
})
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
brick.showImage(images.objectsLightOn)
})
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
brick.showImage(images.objectsLightOn);
})
```

View File

@ -0,0 +1,11 @@
# Reverse Beeper Activity 1
```blocks
loops.forever(function () {
music.playTone(440, sensors.ultrasonic4.distance());
loops.pause(50)
})
motors.largeBC.setSpeed(-20);
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.largeBC.stop();
```

View File

@ -0,0 +1,13 @@
# Reverse Beeper Activity 2
```blocks
loops.forever(function () {
if (motors.largeB.speed() != 0 && sensors.ultrasonic4.distance() < 20) {
music.playTone(440, sensors.ultrasonic4.distance());
loops.pause(50)
}
})
motors.largeBC.setSpeed(-20);
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.largeBC.stop();
```

View File

@ -0,0 +1,20 @@
# Reverse Beeper Activity 2
```blocks
let beep = false
beep = true
control.runInBackground(function () {
motors.largeBC.setSpeed(-20)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear)
motors.largeBC.stop()
beep = false
})
control.runInBackground(function () {
while (beep) {
if (sensors.ultrasonic4.distance() < 20) {
music.playTone(440, sensors.ultrasonic4.distance())
loops.pause(50)
}
}
})
```

View File

@ -0,0 +1,14 @@
# Reversing the robot Activity 1
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
motors.largeBC.setSpeed(50)
sensors.touchSensor1.pauseUntil(TouchSensorEvent.Pressed)
motors.largeBC.setSpeed(0)
loops.pause(1000)
brick.setLight(LightsPattern.OrangeFlash)
motors.largeBC.setSpeed(-50)
loops.pause(2000)
motors.largeBC.setSpeed(0)
})
```

View File

@ -0,0 +1,15 @@
# Reversing the robot Activity 2
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
sensors.touchSensor1.pauseUntil(TouchSensorEvent.Pressed)
motors.largeBC.setSpeed(50)
sensors.touchSensor2.pauseUntil(TouchSensorEvent.Pressed)
motors.largeBC.setSpeed(0)
loops.pause(1000)
brick.setLight(LightsPattern.OrangeFlash)
motors.largeBC.setSpeed(-50)
loops.pause(2000)
motors.largeBC.setSpeed(0)
})
```

View File

@ -0,0 +1,19 @@
# Reversing the robot Activity 3
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
brick.showImage(images.eyesSleeping)
sensors.touchSensor1.pauseUntil(TouchSensorEvent.Pressed)
brick.showImage(images.eyesNeutral)
motors.largeBC.setSpeed(50)
sensors.touchSensor2.pauseUntil(TouchSensorEvent.Pressed)
brick.showImage(images.eyesTiredMiddle)
motors.largeBC.setSpeed(0)
loops.pause(1000)
brick.setLight(LightsPattern.OrangeFlash)
brick.showImage(images.eyesDizzy)
motors.largeBC.setSpeed(-50)
loops.pause(2000)
motors.largeBC.setSpeed(0)
})
```

36
docs/coding/roaming-1.md Normal file
View File

@ -0,0 +1,36 @@
# Roaming Activity 1
```blocks
let drive: number[] = []
brick.buttonLeft.onEvent(ButtonEvent.Click, function () {
drive.push(1)
})
brick.buttonRight.onEvent(ButtonEvent.Click, function () {
drive.push(3)
})
brick.buttonUp.onEvent(ButtonEvent.Click, function () {
drive.push(4)
})
brick.buttonDown.onEvent(ButtonEvent.Click, function () {
drive.push(5)
})
pauseUntil(() => drive.length >= 5)
loops.pause(1000)
music.playSoundEffectUntilDone(sounds.communicationGo)
for (let d of drive) {
if (d == 1) {
motors.largeC.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeC.pauseUntilReady()
} else if (d == 3) {
motors.largeB.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeB.pauseUntilReady()
} else if (d == 4) {
motors.largeBC.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeBC.pauseUntilReady()
} else {
motors.largeBC.setSpeedFor(-50, 360, MoveUnit.Degrees)
motors.largeBC.pauseUntilReady()
}
}
music.playSoundEffectUntilDone(sounds.communicationGameOver)
```

40
docs/coding/roaming-2.md Normal file
View File

@ -0,0 +1,40 @@
# Roaming Activity 2
```blocks
let drive: number[] = []
brick.buttonLeft.onEvent(ButtonEvent.Click, function () {
drive.push(1)
music.playSoundEffectUntilDone(sounds.systemClick)
})
brick.buttonRight.onEvent(ButtonEvent.Click, function () {
drive.push(3)
music.playSoundEffectUntilDone(sounds.systemClick)
})
brick.buttonUp.onEvent(ButtonEvent.Click, function () {
drive.push(4)
music.playSoundEffectUntilDone(sounds.systemClick)
})
brick.buttonDown.onEvent(ButtonEvent.Click, function () {
drive.push(5)
music.playSoundEffectUntilDone(sounds.systemClick)
})
brick.buttonEnter.pauseUntil(ButtonEvent.Click);
loops.pause(1000)
music.playSoundEffectUntilDone(sounds.communicationGo)
for (let d of drive) {
if (d == 1) {
motors.largeC.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeC.pauseUntilReady()
} else if (d == 3) {
motors.largeB.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeB.pauseUntilReady()
} else if (d == 4) {
motors.largeBC.setSpeedFor(50, 360, MoveUnit.Degrees)
motors.largeBC.pauseUntilReady()
} else {
motors.largeBC.setSpeedFor(-50, 360, MoveUnit.Degrees)
motors.largeBC.pauseUntilReady()
}
}
music.playSoundEffectUntilDone(sounds.communicationGameOver)
```

View File

@ -0,0 +1,12 @@
# Three Point Turn Activity 1
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
motors.largeBC.tank(75, 30)
loops.pause(1500)
motors.largeBC.tank(-30, -75)
loops.pause(1000)
motors.largeBC.tank(50, 50)
loops.pause(3000)
})
```

View File

@ -0,0 +1,14 @@
# Three Point Turn Activity 2
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
motors.largeBC.tank(75, 30)
loops.pause(1500)
motors.largeBC.tank(-30, -75)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.largeBC.tank(0, 0)
loops.pause(1000)
motors.largeBC.tank(50, 50)
loops.pause(3000)
})
```

View File

@ -0,0 +1,15 @@
# Three Point Turn Activity 3
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
motors.largeBC.tank(75, 30)
loops.pause(1500)
motors.largeBC.tank(-30, -75)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.largeBC.tank(0, 0)
music.playSoundEffect(sounds.animalsDogBark1)
loops.pause(1000)
motors.largeBC.tank(50, 50)
loops.pause(3000)
})
```

View File

@ -0,0 +1,9 @@
# Traffic Lights Activity 1
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
motors.largeBC.tank(20, 20)
sensors.color3.pauseForColor(ColorSensorColor.Red)
motors.largeBC.tank(0, 0)
})
```

View File

@ -0,0 +1,10 @@
# Traffic Lights Activity 2
```blocks
sensors.color3.onColorDetected(ColorSensorColor.Red, function () {
motors.largeBC.tank(0, 0)
})
sensors.color3.onColorDetected(ColorSensorColor.Green, function () {
motors.largeBC.tank(20, 20)
})
```

View File

@ -0,0 +1,11 @@
# Traffic Lights Activity 3
```blocks
loops.forever(function () {
if (sensors.color3.light(LightIntensityMode.Reflected) < 15) {
motors.largeBC.tank(30, 12)
} else {
motors.largeBC.tank(12, 30)
}
})
```

View File

@ -4,5 +4,12 @@ Here are some fun programs for your @boardname@!
## Fun stuff ## Fun stuff
```codecard
Coming soon. [
{
"name": "Happy unhappy",
"description": "Keep your brick entertained and happy",
"url":"/examples/happy-unhappy",
"cardType": "example"
}]
```

View File

@ -0,0 +1,12 @@
# Happy unhappy
Use a touch sensor to make the brick happy.
```blocks
sensors.touchSensor1.onEvent(TouchSensorEvent.Pressed, function () {
brick.showImage(images.expressionsBigSmile)
})
sensors.touchSensor1.onEvent(TouchSensorEvent.Released, function () {
brick.showImage(images.expressionsSick)
})
```

View File

@ -0,0 +1,50 @@
# Gradien follower PID + calibration
```blocks
let lasterror = 0
let D = 0
let I = 0
let P = 0
let error = 0
let setpoint = 0
let max = 0
let min = 0
let v = 0
v = sensors.color3.light(LightIntensityMode.Reflected)
min = v
max = v
setpoint = v
while (!(brick.buttonEnter.wasPressed())) {
brick.clearScreen()
brick.showString("Move robot on terrain", 1)
brick.showString("Press ENTER when done", 2)
v = sensors.color3.light(LightIntensityMode.Reflected)
min = Math.min(min, v)
max = Math.max(max, v)
setpoint = (max + min) / 2
brick.showValue("v", v, 3)
brick.showValue("min", min, 4)
brick.showValue("max", v, 5)
brick.showValue("setpoint", setpoint, 6)
loops.pause(100)
}
loops.forever(function () {
brick.clearScreen()
v = sensors.color3.light(LightIntensityMode.Reflected)
brick.showValue("light", v, 1)
error = v - setpoint
brick.showValue("error", error, 2)
P = error * 5
brick.showValue("P", P, 3)
I = I + error * 0.01
brick.showValue("I", I, 4)
D = (error - lasterror) * 0.2
brick.showValue("D", D, 5)
motors.largeBC.steer(P + (I + D), 100)
lasterror = error
if (brick.buttonEnter.wasPressed()) {
motors.largeBC.setSpeed(0)
brick.buttonDown.pauseUntil(ButtonEvent.Click)
}
})
```

47
docs/maker.md Normal file
View File

@ -0,0 +1,47 @@
# Maker Activites
These six activities require the LEGO® MINDSTORMS® Education EV3 Core Set (45544). Supporting materials for teachers and middle school students are provided, offering everything teachers and students need to explore their inner makers as they follow the design process to solve open-ended, themed challenges...
* [Download Curriculum Materials](https://education.lego.com/en-us/downloads/mindstorms-ev3)
## Activites
```codecard
[
{
"name": "Sound Machine",
"description": "Create instruments with your EV3 Brick!",
"url":"/maker/sound-machine",
"cardType": "example",
"imageUrl": "/static/maker/sound-machine.png"
},
{
"name": "Sound Of Color",
"description": "Play different sounds based on the color",
"url":"/maker/sound-of-color",
"cardType": "example",
"imageUrl": "/static/maker/sound-of-color.png"
},
{
"name": "Security Gadget",
"description": "Raise the alarm when your brick is lifted!",
"url":"/maker/security-gadget",
"cardType": "example",
"imageUrl": "/static/maker/security-gadget.png"
},
{
"name": "Intruder Detector",
"description": "Raise the alarm when an intruder sneaks in",
"url":"/maker/intruder-detector",
"cardType": "example",
"imageUrl": "/static/maker/intruder-detector.png"
},
{
"name": "Puppet",
"description": "Build an automated puppet",
"url":"/maker/puppet",
"cardType": "example",
"imageUrl": "/static/maker/puppet.png"
}
]
```

View File

@ -0,0 +1,11 @@
# Intruder Detector
This program will activate an alarm when an object moves in front of the Ultrasonic Sensor.
TODO support for event when value changes
```blocks
input.ultrasonic4.onObjectNear(function () {
music.playSoundUntilDone(music.sounds(Sounds.PowerUp))
})
```

17
docs/maker/puppet.md Normal file
View File

@ -0,0 +1,17 @@
# Puppet
Use this program with the Programmable Brick and Large Motor.
```blocks
loops.forever(function () {
output.largeMotorA.setPower(30)
output.largeMotorA.on(true)
loops.pause(100)
output.largeMotorA.on(false)
music.playSoundUntilDone(music.sounds(Sounds.PowerUp))
output.largeMotorA.setPower(-30)
output.largeMotorA.on(true)
loops.pause(100)
output.largeMotorA.on(false)
})
```

View File

@ -0,0 +1,9 @@
# Security Gadget
This program will activate an alarm when an object is lifted from the Touch Sensor.
```blocks
input.touchSensor1.onEvent(TouchSensorEvent.Released, function () {
music.playSoundUntilDone(music.sounds(Sounds.PowerUp))
})
```

View File

@ -0,0 +1,12 @@
# Sound Machine
This example program combined with the small model will make a beat and rhythm on any surface when the program is run.
```blocks
loops.forever(function () {
output.motorA.on(50)
loops.pause(200)
output.motorA.on(100)
loops.pause(200)
})
```

View File

@ -0,0 +1,15 @@
# Sound Of Color
This program will play different sounds when the wheel is rotated. The sound is determined by which color is placed in front of the color Sensor.
```blocks
input.color3.onColorDetected(ColorSensorColor.Blue, function () {
music.playTone(Note.G4, music.beat(BeatFraction.Half))
})
input.color3.onColorDetected(ColorSensorColor.Red, function () {
music.playTone(Note.C5, music.beat(BeatFraction.Half))
})
input.color3.onColorDetected(ColorSensorColor.Green, function () {
music.playTone(Note.D5, music.beat(BeatFraction.Half))
})
```

View File

@ -1,19 +1,8 @@
# Reference # Reference
```namespaces
input.onGesture(Gesture.Shake, () => {})
light.showRing('red red red red red red red red red red')
music.playTone(0, 0)
pins.pulseDuration()
control.runInBackground(() => {})
serial.writeLine("");
```
## See Also ## See Also
[blocks](/blocks), [JavaScript](/javascript), [input](/reference/input), [light](/reference/light), [music](/reference/music), [touch sensor](/reference/sensors/touch-sensor),
[control](/reference/control), [pins](/reference/pins), [serial](/reference/serial) [color sensor](/reference/sensors/color-sensor)
```package
circuit-playground
```

BIN
docs/static/MC-LEGO-loader-eyes.gif vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

109
docs/static/avatar.svg vendored Normal file
View File

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1"
id="svg2" inkscape:version="0.91 r13725" sodipodi:docname="avatar.svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 32 32"
style="enable-background:new 0 0 32 32;" xml:space="preserve">
<style type="text/css">
.st0{fill:#303030;}
</style>
<sodipodi:namedview bordercolor="#666666" borderopacity="1" gridtolerance="10" guidetolerance="10" id="namedview15" inkscape:current-layer="svg2" inkscape:cx="16" inkscape:cy="16" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-height="661" inkscape:window-maximized="0" inkscape:window-width="997" inkscape:window-x="0" inkscape:window-y="0" inkscape:zoom="5.2149125" objecttolerance="10" pagecolor="#ffffff" showgrid="false">
</sodipodi:namedview>
<g id="avatar_mf" transform="translate(-5304.979 8145.745)">
<path id="Path_180" class="st0" d="M5317.1-8125.6c0.2,0,0.3-0.1,0.5-0.1l2.9-0.6c1.3-0.3,2.5-0.5,3.8-0.8c0.5-0.1,1-0.2,1.5-0.3
c0.1,0,0.1,0,0.1-0.1c0-0.5,0-1-0.1-1.5c-0.1-0.6-0.2-1.1-0.3-1.7c-0.1-0.4-0.1-0.8-0.2-1.2c-0.1-0.7-0.2-1.4-0.3-2
c-0.1-0.6-0.2-1.1-0.3-1.7c0-0.2-0.2-0.4-0.4-0.4c0,0,0,0-0.1,0c-0.2,0-0.5,0.1-0.7,0.1c-0.5,0.1-1,0.1-1.5,0.2
c-0.5,0.1-1,0.1-1.6,0.2c-0.5,0.1-1,0.1-1.4,0.2c-0.2,0-0.3,0-0.5,0.1c-0.2,0-0.4,0.2-0.5,0.4c0,0.2-0.1,0.4-0.1,0.5
c0,0.4-0.1,0.8-0.1,1.2c-0.1,0.5-0.1,1-0.2,1.5c0,0.4-0.1,0.9-0.1,1.3l-0.1,1.3l-0.1,1.3c-0.1,0.5-0.1,1-0.2,1.5
C5317.1-8126,5317.1-8125.8,5317.1-8125.6z"/>
<path id="Path_181" class="st0" d="M5316.1-8140c0,0.6,0.1,1.2,0.1,1.8c0,0.4,0.2,0.8,0.6,1c0.3,0.2,0.7,0.3,1.1,0.3
c0.7,0.1,1.4,0.1,2.1,0c0.6,0,1.2-0.1,1.8-0.2c0.4,0,0.9-0.2,1.2-0.5c0.3-0.3,0.5-0.7,0.5-1.1c0-1.2,0-2.3-0.1-3.5
c0-0.3-0.1-0.6-0.3-0.8c-0.3-0.4-0.8-0.6-1.4-0.6c0,0,0,0-0.1,0c-0.2,0.1-0.4,0.1-0.6,0.1c-0.9,0-1.8,0.1-2.7,0.1
c-0.1,0-0.3,0-0.4,0c-0.4-0.1-0.8,0-1.2,0.2c-0.4,0.2-0.6,0.6-0.7,1c0,0.1,0,0.2,0,0.3C5316-8141.2,5316.1-8140.6,5316.1-8140
L5316.1-8140z"/>
<path id="Path_182" class="st0" d="M5312-8129.2c0,0.6,0,1.2,0,1.8c0,0.1,0,0.1,0.1,0.1c0.3,0,0.6,0.1,0.9,0.1c0.3,0,0.7,0,1,0
c0.1,0,0.2,0,0.3,0c0.1,0,0.1,0,0.1-0.1c0.1-0.4,0.2-0.8,0.2-1.2c0.1-0.5,0.2-1,0.3-1.4c0-0.1,0.1-0.1,0.1-0.1
c0.4-0.2,0.8-0.5,1.2-0.8c0.4-0.4,0.7-0.9,0.8-1.5c0.1-0.6,0-1.2-0.4-1.7c-0.2-0.3-0.6-0.4-0.9-0.3c-0.3,0.1-0.6,0.3-0.9,0.5
c-0.7,0.6-1.5,1.2-2.2,1.8c-0.3,0.2-0.5,0.5-0.6,0.8c0,0.2-0.1,0.4-0.1,0.6C5311.9-8130.2,5311.9-8129.7,5312-8129.2
C5311.9-8129.2,5312-8129.2,5312-8129.2z"/>
<path id="Path_183" class="st0" d="M5315.5-8124.7c0,0.2-0.1,0.5-0.1,0.7c-0.1,0.5-0.4,0.9-0.8,1.1c0,0,0,0,0,0
c-0.1,0-0.2,0.2-0.2,0.3c-0.4,1.4-0.9,2.7-1.3,4.1c0,0,0,0.1,0,0.1c0.8,1.1,1.6,2.2,2.4,3.3c0,0,0,0,0.1,0.1
c0.1-0.2,0.1-0.3,0.2-0.5c0.1-0.3,0.2-0.5,0.3-0.8c0,0,0-0.1,0-0.1c-0.2-0.3-0.5-0.7-0.7-1c0,0,0-0.1,0-0.2
c0.3-0.9,0.6-1.7,0.9-2.6c0,0,0-0.1,0.1-0.1c0.5-0.2,0.9-0.6,1.1-1.1c0.1-0.3,0.1-0.7,0.1-1.1c0-0.4-0.1-0.8-0.3-1.2
c-0.2-0.4-0.5-0.8-1-1C5315.9-8124.7,5315.7-8124.7,5315.5-8124.7z"/>
<path id="Path_184" class="st0" d="M5314.7-8134.2c0.1-0.1,0.2-0.1,0.3-0.2c0.3-0.2,0.7-0.3,1-0.3c0.4,0,0.7,0.2,0.8,0.6
c0.6,1.1,0.5,2.4-0.4,3.3c-0.4,0.4-0.8,0.7-1.3,1c0,0-0.1,0.1-0.1,0.1c-0.2,0.8-0.3,1.6-0.5,2.5c0,0,0,0.1,0,0.1
c0,0.2,0,0.2-0.2,0.2c-0.1,0-0.1,0-0.2,0c0,0.1,0,0.2,0,0.3c0,0,0,0,0.1,0.1l1.9,0.7c0.2,0.1,0.4,0.2,0.7,0.2c0-0.1,0-0.2,0-0.2
c0-0.3,0-0.6,0-0.8l0.2-1.5l0.2-1.5c0.1-0.5,0.1-1,0.2-1.5c0.1-0.5,0.1-1.1,0.2-1.6c0.1-0.5,0.1-1,0.2-1.5c0-0.2,0-0.4,0-0.6
c0-0.2-0.1-0.4-0.3-0.4c0,0,0,0,0,0c-0.1,0-0.1,0-0.2,0c-0.6-0.1-1.2-0.2-1.9-0.3c-0.1,0-0.2,0-0.3,0c-0.1,0-0.2,0.1-0.3,0.3
C5314.8-8135,5314.7-8134.6,5314.7-8134.2z"/>
<path id="Path_185" class="st0" d="M5324.5-8117.2c-0.2-0.7-0.5-1.3-0.7-2l-0.7,0.3c0,0-0.1,0-0.1,0c-0.1,0.1-0.2,0-0.2-0.1
c-0.1-0.3-0.2-0.5-0.3-0.8c-0.2-0.7-0.5-1.4-0.7-2.1c0,0,0-0.1,0-0.1c0,0,0,0.1-0.1,0.1c-0.1,0.2-0.3,0.3-0.5,0.5c0,0-0.1,0-0.1,0
c-0.3,0.1-0.6,0.1-0.8,0.2c0,0-0.1,0-0.1,0c0,0.2-0.1,0.3-0.1,0.5c0.6,1.5,1.1,3.1,1.7,4.6c0,0,0,0,0,0.1
C5322.7-8116.3,5323.6-8116.7,5324.5-8117.2z"/>
<path id="Path_186" class="st0" d="M5325.4-8123.1c-0.7,0.2-1.3,0.3-2,0.5c-0.5,0.1-0.9,0.2-1.4,0.3c-0.1,0-0.2,0.1-0.1,0.2
c0,0,0,0,0,0.1c0.2,0.5,0.3,0.9,0.5,1.4c0.2,0.5,0.4,1.1,0.6,1.6c0,0,0,0,0,0c0.1-0.1,0.2-0.1,0.3-0.2c0.2-0.1,0.3-0.2,0.5-0.2
c0.2-0.1,0.4-0.1,0.6-0.2c0.7-0.2,1.5-0.4,2.2-0.6c0,0,0,0,0.1,0C5326.3-8121.1,5325.9-8122.1,5325.4-8123.1z"/>
<path id="Path_187" class="st0" d="M5320.7-8124.4c-0.4,0.1-0.8,0.2-1.2,0.3c-0.6,0.1-1.3,0.3-1.9,0.4c0,0-0.1,0-0.1,0
c-0.1,0-0.2-0.1-0.3-0.1c0,0,0,0.1,0,0.1c0.3,0.7,0.4,1.5,0.3,2.2c-0.1,0.4-0.3,0.8-0.5,1.1c0,0,0,0-0.1,0.1
c0.2-0.1,0.4-0.1,0.6-0.1l2.5-0.6c0.5-0.1,0.9-0.6,1-1.1c0.1-0.5,0-1-0.1-1.5C5320.8-8124,5320.8-8124.2,5320.7-8124.4z"/>
<path id="Path_188" class="st0" d="M5325.5-8127c-2.7,0.5-5.3,1.1-7.9,1.6c0,0.5,0,0.9,0.1,1.4c0.1,0,0.2,0,0.3-0.1
c1.2-0.3,2.3-0.5,3.5-0.8c1.2-0.3,2.4-0.5,3.6-0.8c0.1,0,0.3-0.1,0.4-0.1c0,0,0.1,0,0.1-0.1
C5325.6-8126.2,5325.5-8126.6,5325.5-8127z"/>
<path id="Path_189" class="st0" d="M5328.6-8118.4c-0.2-0.4-0.3-0.7-0.5-1.1c-0.1-0.2-0.2-0.5-0.3-0.7c0-0.1,0-0.1-0.1,0
c-1.2,0.3-2.4,0.6-3.6,1c0,0,0,0-0.1,0c0.2,0.7,0.5,1.3,0.7,2C5326-8117.6,5327.3-8118,5328.6-8118.4z"/>
<path id="Path_190" class="st0" d="M5319.9-8120.9l-0.6,0.1c-1,0.2-2,0.5-3,0.7c-0.1,0-0.1,0.1-0.1,0.1c-0.3,0.7-0.5,1.5-0.8,2.2
c0,0,0,0,0,0.1c0.2,0,0.4-0.1,0.5-0.1c1-0.3,2-0.5,3.1-0.8c0.1,0,0.2-0.1,0.3-0.2C5319.5-8119.5,5319.7-8120.2,5319.9-8120.9z"/>
<path id="Path_191" class="st0" d="M5325.1-8125.4c-1.1,0.2-2.2,0.5-3.3,0.7c0.3,0.7,0.4,1.4,0.3,2.2c0.2,0,0.4-0.1,0.5-0.1
c0.9-0.2,1.8-0.4,2.7-0.6c0.1,0,0.1,0,0.1-0.1c0.1-0.4,0-0.9-0.1-1.3C5325.3-8124.9,5325.2-8125.1,5325.1-8125.4
C5325.1-8125.3,5325.1-8125.4,5325.1-8125.4z"/>
<path id="Path_192" class="st0" d="M5325.6-8132c0.2,0,0.4,0,0.5,0c0.2,0,0.4,0,0.6,0c0.3,0,0.6-0.2,0.8-0.4c0.3-0.4,0.7-0.8,1-1.2
c-0.1-0.1-0.1-0.1-0.1-0.2c0,0,0,0-0.1,0c-0.7-0.1-1.3-0.5-1.4-1.2c-0.1-0.2-0.1-0.4-0.1-0.6c-0.2,0.1-0.3,0.3-0.5,0.4
c-0.1,0.1-0.2,0.1-0.3,0.2c0,0-0.1,0.1-0.2,0c-0.2,0-0.5-0.1-0.7-0.1c0,0,0,0-0.1,0C5325.3-8134.1,5325.4-8133.1,5325.6-8132z"/>
<path id="Path_193" class="st0" d="M5328.4-8134.2c0.2-0.3,0.5-0.5,0.8-0.7c0.4-0.4,0.6-0.8,0.7-1.4c0-0.1,0-0.2-0.1-0.3
c-0.3-0.5-0.7-1.1-1-1.6c0-0.1-0.1-0.1-0.1,0c-0.4,0.2-0.8,0.5-1.1,0.8c-0.2,0.2-0.4,0.4-0.6,0.6c-0.1,0.1-0.1,0.3,0,0.4
c0.5,0.7,1,1.5,1.4,2.2C5328.4-8134.2,5328.4-8134.2,5328.4-8134.2z"/>
<path id="Path_194" class="st0" d="M5314.3-8126.1c-0.1-0.1-0.1-0.1-0.2-0.2c-0.1,0-0.1-0.1-0.1-0.2c0-0.1,0-0.3,0-0.4h-0.1
c-0.6,0-1.2-0.1-1.7-0.2c0,0-0.1,0-0.1,0c-0.4,0.2-0.7,0.4-1,0.8c-0.4,0.6-0.4,1.4,0.1,1.9c0.2,0.2,0.4,0.4,0.6,0.6
c0.1,0.1,0.2,0.2,0.3,0.2c-0.2-0.6,0-1.3,0.5-1.8C5313-8125.9,5313.6-8126.2,5314.3-8126.1z"/>
<path id="Path_195" class="st0" d="M5315.7-8114.9c0.5-0.1,0.9-0.3,1.4-0.4c0.8-0.2,1.6-0.4,2.4-0.7c0.1,0,0.1,0,0.1-0.1
c0.1-0.4,0.2-0.7,0.4-1.1c0,0,0,0,0-0.1c-0.1,0-0.2,0-0.3,0.1c-1.2,0.3-2.3,0.6-3.5,1c-0.1,0-0.1,0.1-0.1,0.1
c-0.1,0.4-0.3,0.7-0.4,1.1C5315.7-8115,5315.7-8115,5315.7-8114.9z"/>
<path id="Path_196" class="st0" d="M5315.4-8117.4c0.2,0.3,0.4,0.6,0.6,0.9c0,0,0.1,0,0.1,0c1-0.3,1.9-0.5,2.9-0.8
c0.3-0.1,0.6-0.2,0.9-0.2c-0.1-0.1-0.1-0.2-0.2-0.2c-0.2-0.2-0.3-0.4-0.5-0.6c0,0-0.1-0.1-0.1,0c-0.9,0.3-1.9,0.5-2.8,0.8
C5316-8117.5,5315.7-8117.5,5315.4-8117.4z"/>
<path id="Path_197" class="st0" d="M5321.3-8143.6c0-0.3,0-0.7,0-1c0,0-0.1,0-0.1,0c-0.7,0-1.5,0-2.2,0.1c-0.4,0-0.7,0-1.1,0.1
c-0.1,0-0.1,0-0.1,0.1c0,0.3,0,0.6,0,0.8c0,0,0,0.1,0.1,0.1c0.4,0,0.8,0,1.1,0c0.5,0,1.1,0,1.6-0.1
C5320.9-8143.5,5321.1-8143.6,5321.3-8143.6z"/>
<path id="Path_198" class="st0" d="M5329.2-8134.3c0.1,0,0.2,0,0.2-0.1c0.4-0.2,0.8-0.4,1.1-0.7c0.3-0.2,0.4-0.5,0.6-0.8
c0.1-0.3,0.1-0.6-0.1-0.9c-0.4-0.5-0.7-1-1.1-1.6c0,0,0,0-0.1-0.1c-0.2,0.2-0.4,0.4-0.6,0.6c0,0,0,0,0,0c0,0,0,0.1,0,0.1
c0.2,0.4,0.5,0.7,0.7,1c0.1,0.2,0.2,0.4,0.1,0.6c0,0.5-0.1,0.9-0.4,1.3c-0.1,0.1-0.2,0.2-0.3,0.3
C5329.4-8134.5,5329.3-8134.4,5329.2-8134.3C5329.2-8134.3,5329.2-8134.3,5329.2-8134.3z"/>
<path id="Path_199" class="st0" d="M5317.5-8136.7c0,0.2,0,0.3,0,0.5c0,0,0,0.1,0.1,0.1c0.2,0,0.3,0.1,0.5,0.1c0.7,0.1,1.4,0.1,2,0
c0.4,0,0.8-0.1,1.2-0.1c0.2,0,0.5-0.1,0.7-0.1c0.1,0,0.1,0,0.1-0.1c0-0.2,0-0.3,0-0.5C5320.5-8136.6,5319-8136.5,5317.5-8136.7z"/>
<path id="Path_200" class="st0" d="M5312.5-8123.2c0.1-0.4,0.1-0.8,0.2-1.2c0.1-0.6,0.6-1,1.2-1c0.3,0,0.5,0.1,0.7,0.3
c0.2,0.2,0.2,0.4,0.2,0.7c-0.1,0.3-0.2,0.6-0.2,0.9c0,0.1-0.1,0.2-0.1,0.4c0,0,0,0,0,0c0.1-0.1,0.2-0.2,0.3-0.3
c0.3-0.4,0.4-0.9,0.4-1.4c0-0.6-0.4-1-0.9-1.1c-0.1,0-0.1,0-0.2,0c-0.5,0-1,0.3-1.4,0.7c-0.3,0.3-0.4,0.6-0.5,1
c-0.1,0.3,0,0.7,0.2,1C5312.5-8123.2,5312.5-8123.2,5312.5-8123.2z"/>
<path id="Path_201" class="st0" d="M5314.3-8123.2c0.1-0.5,0.3-0.9,0.4-1.4c0.1-0.2,0-0.4-0.2-0.5c-0.4-0.2-0.9-0.1-1.2,0.2
c0,0,0,0,0,0.1c0,0.2,0,0.4,0.1,0.6c0,0.1,0.1,0.2,0.2,0.3C5313.7-8123.6,5314-8123.4,5314.3-8123.2
C5314.2-8123.2,5314.3-8123.2,5314.3-8123.2z"/>
<path id="Path_202" class="st0" d="M5317.4-8124.1c0-0.4,0-0.9-0.1-1.3c-0.1,0-0.1,0-0.2,0c-0.1,0-0.2,0-0.3,0
c-0.7-0.3-1.4-0.5-2.1-0.8c0,0,0,0,0,0c0.1,0.1,0.1,0.1,0.2,0.2c0.3,0.2,0.5,0.6,0.6,0.9c0,0,0,0,0,0c0.1,0,0.3,0,0.4,0.1
c0.3,0.1,0.6,0.3,0.9,0.5c0,0,0.1,0.1,0.1,0.1C5317.1-8124.2,5317.2-8124.1,5317.4-8124.1z"/>
<path id="Path_203" class="st0" d="M5321.6-8124.6c-0.2,0-0.4,0.1-0.6,0.1c0.1,0.2,0.1,0.4,0.2,0.6c0.1,0.4,0.2,0.8,0.1,1.2
c0,0.5-0.1,0.9-0.4,1.3c0,0,0,0,0,0c0.3,0,0.6-0.2,0.7-0.5c0.2-0.3,0.3-0.6,0.3-0.9C5321.9-8123.4,5321.8-8124,5321.6-8124.6z"/>
<path id="Path_204" class="st0" d="M5315.7-8135.8c0.2,0,0.3,0.1,0.5,0.1c0.5,0.1,1,0.2,1.5,0.2c0.2,0,0.5,0,0.7,0
c0.7-0.1,1.4-0.2,2.1-0.2c0.6-0.1,1.2-0.2,1.8-0.2c0.5-0.1,1.1-0.1,1.6-0.2l-1.5-0.2c0,0,0,0,0,0c0,0.2-0.1,0.3-0.2,0.3
c0,0,0,0,0,0c-0.3,0.1-0.5,0.1-0.8,0.2c-0.8,0.1-1.6,0.1-2.3,0.1c-0.4,0-0.9,0-1.3-0.1c-0.1,0-0.2-0.1-0.3-0.2c0,0-0.1,0-0.1,0
c-0.3,0-0.6,0.1-0.9,0.1L5315.7-8135.8L5315.7-8135.8z"/>
<path id="Path_205" class="st0" d="M5327.3-8117.7c-0.3,0.1-0.5,0.2-0.8,0.2c-0.6,0.2-1.1,0.3-1.7,0.5c0,0-0.1,0-0.1,0.1
c-0.5,0.2-1,0.5-1.5,0.7c0,0,0,0,0,0c0.3-0.1,0.5-0.1,0.8-0.2c0.5-0.2,1.1-0.3,1.6-0.5c0.1,0,0.2-0.1,0.2-0.1
C5326.2-8117.2,5326.8-8117.5,5327.3-8117.7C5327.3-8117.7,5327.3-8117.7,5327.3-8117.7C5327.3-8117.7,5327.3-8117.7,5327.3-8117.7
z"/>
<path id="Path_206" class="st0" d="M5327-8135.8c0,0.1,0,0.2,0,0.4c0.1,0.5,0.3,0.9,0.7,1.1c0.1,0.1,0.3,0.1,0.4,0.2l0,0
C5327.8-8134.7,5327.4-8135.2,5327-8135.8L5327-8135.8z"/>
<path id="Path_207" class="st0" d="M5329-8134.4c-0.1,0.1-0.2,0.2-0.3,0.4c0,0,0,0,0,0.1c0,0.1,0,0.1,0.1,0.1c0.1,0,0.2,0,0.3-0.1
c0.1,0,0.2-0.1,0.3-0.1c-0.1,0-0.1-0.1-0.2-0.1C5329-8134.2,5329-8134.3,5329-8134.4z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

93
docs/static/fonts/icons/iconfont.css vendored Normal file
View File

@ -0,0 +1,93 @@
@font-face {
font-family: "iconfont";
src: url("iconfont.eot?8b7e57577c2d1f1ae9e810b9e010bc84?#iefix") format("embedded-opentype"),
url("iconfont.woff2?8b7e57577c2d1f1ae9e810b9e010bc84") format("woff2"),
url("iconfont.woff?8b7e57577c2d1f1ae9e810b9e010bc84") format("woff");
}
.icon {
line-height: 1;
}
.icon:before {
font-family: iconfont !important;
font-style: normal;
font-weight: normal !important;
vertical-align: top;
}
.icon-ultrasonic:before {
content: "\f101";
}
.icon-color:before {
content: "\f102";
}
.icon-touch:before {
content: "\f103";
}
.icon-gyro:before {
content: "\f104";
}
.icon-addpackage:before {
content: "\f105";
}
.icon-brick:before {
content: "\f106";
}
.icon-controls:before {
content: "\f107";
}
.icon-functions:before {
content: "\f108";
}
.icon-list:before {
content: "\f109";
}
.icon-logic:before {
content: "\f10a";
}
.icon-loops:before {
content: "\f10b";
}
.icon-math:before {
content: "\f10c";
}
.icon-motors:before {
content: "\f10d";
}
.icon-music:before {
content: "\f10e";
}
.icon-sensors:before {
content: "\f10f";
}
.icon-text:before {
content: "\f110";
}
.icon-variables:before {
content: "\f111";
}
.icon-console:before {
content: "\f112";
}
.icon-advancedcollapsed:before {
content: "\f113";
}
.icon-advancedexpanded:before {
content: "\f114";
}
.icon-cancel:before {
content: "\f115";
}
.icon-check:before {
content: "\f116";
}
.icon-download:before {
content: "\f117";
}
.icon-save:before {
content: "\f118";
}
.icon-blocks:before {
content: "\f119";
}

BIN
docs/static/fonts/icons/iconfont.eot vendored Normal file

Binary file not shown.

87
docs/static/fonts/icons/iconfont.svg vendored Normal file
View File

@ -0,0 +1,87 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<font id="iconfont" horiz-adv-x="40">
<font-face font-family="iconfont"
units-per-em="40" ascent="40"
descent="0" />
<missing-glyph horiz-adv-x="0" />
<glyph glyph-name="ultrasonic"
unicode="&#xF101;"
horiz-adv-x="40" d=" M26.8 13H13.1C15.6 14.6 17 17.3 17 20.2C17 21.8 16.6 23.3 15.8 24.7S13.8 27 12.4 27.8H27.6C26.2 27 25.1 26.1 24.2 24.7S23 21.8 23 20.2C22.9 17.3 24.3 14.6 26.8 13L26.8 13L26.8 13z M8.6 12C4.1 12 0.4 15.7 0.4 20.2S4.1 28.4 8.6 28.4S16.8 24.7 16.8 20.2C16.7 15.7 13.1 12 8.6 12zM8.6 23.4C6.8 23.4 5.4 22 5.4 20.2S6.8 16.9 8.6 16.9S11.9 18.4 11.9 20.2S10.4 23.4 8.6 23.4z M31.4 12C26.9 12 23.2 15.7 23.2 20.2S26.9 28.4 31.4 28.4S39.6 24.7 39.6 20.2C39.5 15.7 35.9 12 31.4 12zM31.4 23.4C29.6 23.4 28.1 22 28.1 20.2S29.6 16.9 31.4 16.9S34.6 18.4 34.6 20.2S33.2 23.4 31.4 23.4z" />
<glyph glyph-name="color"
unicode="&#xF102;"
horiz-adv-x="43.35195530726257" d=" M38.7 -0.1H4.7C3.4 -0.1 2.5 0.6 2.5 1.5V6.8H0.9A0.9608938547486034 0.9608938547486034 0 0 0 0 7.7V31.5A0.9608938547486034 0.9608938547486034 0 0 0 0.9 32.4H2.5V38.4C2.5 39.3 3.6 40 4.7 40H38.7C40 40 40.9 39.3 40.9 38.4V32.4H42.5A0.9608938547486034 0.9608938547486034 0 0 0 43.4 31.5V7.8A0.9608938547486034 0.9608938547486034 0 0 0 42.5 6.9H40.9V1.6C41.1 0.7 40 -0.1 38.7 -0.1zM21.7 35.1A11.374301675977657 11.374301675977657 0 0 1 13.6 15.5A4.916201117318437 4.916201117318437 0 0 1 13.4 13.7A8.268156424581006 8.268156424581006 0 0 1 29.9 13.7A4.916201117318437 4.916201117318437 0 0 1 29.7 15.5A12.379888268156424 12.379888268156424 0 0 1 33.1 23.6A11.1731843575419 11.1731843575419 0 0 1 21.7 35.1zM41.6 18.3V10.9H42.5V18.3zM1.1 18.3V10.9H2V18.3zM41.6 28.6V21.2H42.5V28.6zM1.1 28.6V21.2H2V28.6z M21.9 7.4A6.480446927374302 6.480446927374302 0 0 0 15.4 13.9A9.497206703910615 9.497206703910615 0 0 0 15.9 16.3A9.87709497206704 9.87709497206704 0 0 0 12.3 23.9A9.608938547486035 9.608938547486035 0 0 0 31.5 23.9A9.87709497206704 9.87709497206704 0 0 0 27.9 16.3A8.022346368715086 8.022346368715086 0 0 0 28.4 13.9A6.703910614525141 6.703910614525141 0 0 0 21.9 7.4zM21.9 16.3A2.4581005586592184 2.4581005586592184 0 1 1 24.4 13.9A2.837988826815643 2.837988826815643 0 0 1 21.9 16.3zM21.9 27.7A4.46927374301676 4.46927374301676 0 1 1 26.4 23.2A4.804469273743018 4.804469273743018 0 0 1 21.9 27.7z" />
<glyph glyph-name="touch"
unicode="&#xF103;"
horiz-adv-x="40" d=" M34.3 3.3H4.9C3.8 3.3 2.8 3.9 2.8 4.8V9.3H1.5C1.1 9.3 0.7 9.7 0.7 10.1V30.5C0.7 30.9 1.1 31.3 1.5 31.3H2.8V36.6C2.8 37.4 3.7 38.1 4.9 38.1H16V36.6H22.7V38.1H34.2C35.3 38.1 36.3 37.5 36.3 36.6V31.3H37.6C37.9 31.3 38.3 30.9 38.3 30.5V10.1C38.3 9.7 37.9 9.3 37.6 9.3H36.3V4.8C36.3 3.9 35.3 3.3 34.3 3.3L34.3 3.3zM14.1 16.2C14.7 15.3 15.4 14.7 16.2 14.1V5.6H22.6V14.1C23.5 14.7 24.1 15.4 24.7 16.2H33.4V22.6H24.9C24.3 23.5 23.6 24.3 22.6 24.9V33.6H16.2V24.9C15.3 24.3 14.5 23.6 13.9 22.6H5.4V16.2H14.1L14.1 16.2zM36.6 19.2V13H37.4V19.2H36.6zM1.8 19.2V13H2.6V19.2H1.8zM36.6 28.1V21.9H37.4V28.1H36.6zM1.8 28.1V21.9H2.6V28.1H1.8zM19.4 15.4C18.8 15.4 18.5 15.4 18.1 15.6V17.1C18.1 17.5 17.9 17.7 17.5 17.7L17.5 17.7H16C15.8 18.1 15.6 18.6 15.6 19.2C15.6 19.8 15.6 20.3 16 20.7H17.3C18.1 20.7 18.1 21.6 18.1 21.6L18.1 21.6C18.1 21.8 18.1 22.4 18.1 22.9C18.5 23.1 19 23.1 19.4 23.1C20 23.1 20.5 23.1 21.1 22.9C21.1 22.5 21.1 22 21.1 21.6L21.1 21.6V21.4C21.1 21 21.3 20.8 21.7 20.8C21.7 20.8 21.7 20.8 21.9 20.8L21.9 20.8H23.4C23.8 20.4 23.8 19.9 23.8 19.3S23.6 18.2 23.4 17.8L23.4 17.8C23 17.8 22.5 17.6 22.1 17.6C21.7 17.6 21.3 17.4 21.3 17V15.5C20.7 15.3 20.4 15.3 19.8 15.3C19.4 15.4 19.4 15.4 19.4 15.4z" />
<glyph glyph-name="gyro"
unicode="&#xF104;"
horiz-adv-x="23.578015492438215" d=" M17 0H6.4A5.901881224640355 5.901881224640355 0 0 0 5.1 0.3H2.3A1.283659166359277 1.283659166359277 0 0 0 1 1.6V4.5H0.5A0.5016599040944301 0.5016599040944301 0 0 0 0 5V35.4A0.5016599040944301 0.5016599040944301 0 0 0 0.5 35.9H1V38.7A1.283659166359277 1.283659166359277 0 0 0 2.3 40H10.6V39.6H12.8V40H21.2A1.283659166359277 1.283659166359277 0 0 0 22.5 38.7V35.9H23.1A0.5016599040944301 0.5016599040944301 0 0 0 23.6 35.4V5.1A0.5016599040944301 0.5016599040944301 0 0 0 23.1 4.6H22.5V1.6A1.283659166359277 1.283659166359277 0 0 0 21.2 0.4H18.5C18.4 0.1 17.2 0 17 0zM6.2 34.5L3.7 33.8A1.0033198081888601 1.0033198081888601 0 0 1 3.4 33.7A0.2360752489856142 0.2360752489856142 0 0 1 3.3 33.5A0.20656584286241245 0.20656584286241245 0 0 1 3.4 33.3L4.1 32.8A7.657690888970861 7.657690888970861 0 0 1 3.1 30A8.51346366654371 8.51346366654371 0 0 1 4.8 23.5C5.8 24.2 6.5 24.7 6.5 24.7A7.377351530800443 7.377351530800443 0 0 0 5.4 26.9A6.300258207303577 6.300258207303577 0 0 0 6 31.8L6.5 31.5H6.5L6.6 31.5A0.3541128734784213 0.3541128734784213 0 0 1 6.8 31.4A0.17705643673921065 0.17705643673921065 0 0 1 7 31.5A0.6344522316488379 0.6344522316488379 0 0 1 7 32L6.2 34.5zM17.5 31.8H17.5A6.300258207303577 6.300258207303577 0 0 0 18 26.9A7.510143858354851 7.510143858354851 0 0 0 17 24.7L17.1 24.6L18.6 23.5A8.631501291036518 8.631501291036518 0 0 1 20.3 30A7.657690888970861 7.657690888970861 0 0 1 19.3 32.8L19.8 33.1L20 33.2A0.22132054592401326 0.22132054592401326 0 0 1 20.1 33.4A0.26558465510881596 0.26558465510881596 0 0 1 20 33.6A1.0033198081888601 1.0033198081888601 0 0 1 19.7 33.7L17.2 34.5S17.1 34.1 17 33.6S16.6 32.3 16.5 32A0.619697528587237 0.619697528587237 0 0 1 16.5 31.5A0.17705643673921065 0.17705643673921065 0 0 1 16.6 31.4A0.48690520103282936 0.48690520103282936 0 0 1 16.8 31.4L16.8 31.4L17.4 31.7zM11.7 30.6A1.9918849133161198 1.9918849133161198 0 1 1 13.7 28.6A1.9918849133161198 1.9918849133161198 0 0 1 11.7 30.6H11.7z" />
<glyph glyph-name="addpackage"
unicode="&#xF105;"
horiz-adv-x="40" d=" M20 35.7C11.3 35.7 4.3 28.7 4.3 20S11.3 4.3 20 4.3S35.7 11.3 35.7 20S28.7 35.7 20 35.7zM30.4 18.3H21.7V9.6H18.3V18.3H9.6V21.7H18.3V30.4H21.7V21.7H30.4V18.3z" />
<glyph glyph-name="brick"
unicode="&#xF106;"
horiz-adv-x="40" d=" M34.3 0.9H5.7V39.1H34.4V0.9zM10.4 32.7V18.4H29.6V32.7H10.4z" />
<glyph glyph-name="controls"
unicode="&#xF107;"
horiz-adv-x="40" d=" M6.1 33H9.6V5.2H6.1V33z M18.3 33H21.7V5.2H18.3V33z M30.4 33H33.9V5.2H30.4V33z M2.6 15.7H13V7H2.6V15.7z M14.8 31.3H25.2V22.6H14.8V31.3z M27 22.6H37.4V13.9H27V22.6z" />
<glyph glyph-name="functions"
unicode="&#xF108;"
horiz-adv-x="40" d=" M12.2 25.4H9.1C9.1 26.3 9.1 26.5 9.9 26.5C11.5 26.5 12.5 27.2 13.1 28.6C13.8 30.1 14.8 31.5 15.7 33.1C16.5 34.3 18.1 35.3 19.7 35.5C20.7 35.7 21.9 35.3 22.5 34.5C22.8 33.9 22.8 33.4 22.6 32.7C22.3 32.2 21.8 32 21.1 32.2C20.5 32.2 20.2 32.7 20.2 33.3C20.2 33.4 20.2 33.4 20.2 33.6C20.2 33.9 20.4 34.3 20.4 34.6C20 34.6 19.5 34.8 19.2 34.6C18.5 34.3 17.9 33.9 17.4 33.1C16.7 32 16.2 30.6 15.7 29.4C15.3 28.6 15 27.3 14.8 26.5H17.2C17.1 26.1 17.1 25.8 16.9 25.4H14.5C13.9 23.5 13.6 21.9 12.9 20.2C12.2 16.7 10.8 13.4 9.4 10.1C8.7 8.6 7.7 7.3 6.6 6.3C5.8 5.4 4.5 4.9 3.3 4.9C2.6 4.7 1.8 5.1 1.1 5.4C0.7 5.8 0.5 6.5 0.7 7.2C1.1 7.7 1.6 8 2.5 7.9C3 7.9 3.2 7.3 3.2 6.8C3.2 6.6 3 6.5 3 6.5C2.8 6.3 2.8 6.1 2.8 5.9C3 5.9 3.2 5.8 3.5 5.8C4.4 5.8 5.4 6.3 5.9 7.2C6.5 8 7 9.1 7.2 9.9C8.5 15.2 10.1 20.4 11.7 25.4C12.2 25.3 12.2 25.3 12.2 25.4z M32.5 4.7C32.7 4.9 32.7 5.1 32.9 5.3C34.8 6.3 36 8.4 36.4 10.5C37.1 13.9 37.1 17.4 36.2 20.9C35.7 22.8 34.5 24.2 33.1 25.4C32.9 25.6 32.7 25.8 32.7 25.9C36 24.7 39.2 20.6 39.2 15.3C39.3 10.8 36.7 6.5 32.5 4.7z M23.9 25.8C23.9 25.6 23.7 25.4 23.7 25.4C21.8 24.4 20.5 22.3 20.2 20.2C19.5 16.7 19.5 13.3 20.4 9.6C20.9 7.7 22.1 6.3 23.5 5.1C23.7 4.9 23.9 4.9 23.9 4.6C20 6.5 17.4 10.5 17.6 15C17.4 20.7 20.9 24.9 23.9 25.8z M32 12.2C32 12.2 32.2 12.2 32.4 12C32.4 12 32.4 12 32.4 11.9C31.9 11 31.3 10.1 30.3 9.6C29.9 9.3 29.2 9.1 28.5 9.6C28.4 9.8 28.2 9.9 28.2 10.3C27.9 11.3 27.7 12.4 27.5 13.4C27.5 13.6 27.5 13.6 27.3 13.8C27.2 13.4 27 13.1 26.6 12.7C26.1 12 25.6 11 24.7 10.3C24.4 9.9 24 9.6 23.5 9.4C23 9.3 22.5 9.4 21.9 9.9V10.1C21.9 10.5 21.9 10.8 22.3 11C22.5 11.2 22.8 11.2 23.2 11L23.3 10.8C23.9 10.5 24 10.3 24.4 11C25.1 12 25.9 13.4 26.8 14.5C26.8 14.6 26.8 14.8 26.8 15C26.6 15.7 26.5 16.6 26.3 17.3C25.9 18.5 25.4 19 24 19H23.9C23.7 19.2 23.9 19.3 24 19.3C24.7 19.5 25.8 19.7 26.5 19.7C26.6 19.7 26.8 19.7 27 19.5C27.5 18.8 27.9 18.1 28 17.1C28 16.9 28.2 16.6 28.2 16.4C28.4 16.7 28.7 17.3 29.1 17.6C29.6 18.1 30.1 18.8 30.8 19.3C31.2 19.5 31.5 19.7 31.9 19.7C32.4 19.7 32.7 19.3 32.7 18.8V18.6C32.5 18.1 32.2 17.9 31.7 18.1L31.7 18.1C31.5 18.1 31.5 18.1 31.3 18.1C30.8 18.5 30.1 18.3 29.6 17.8L29.6 17.8C29.2 17.3 28.7 16.6 28.4 15.9C28.4 15.7 28.4 15.7 28.4 15.5C28.7 14.3 28.9 12.9 29.2 11.5C29.2 11.3 29.2 11.3 29.4 11.2C29.6 10.6 29.9 10.5 30.3 11C31.3 11.3 31.5 11.9 32 12.2z" />
<glyph glyph-name="list"
unicode="&#xF109;"
horiz-adv-x="40" d=" M11.1 30.4H36.9V27.3H11.1V30.4z M11.1 22.4H36.9V19.3H11.1V22.4z M11.1 14.4H36.9V11.3H11.1V14.4z M5.6 27.3H3.8V33.6H2.4V34.6C3.3 34.6 4 35.1 4.2 36.2H5.6V27.3z M7.7 17.6V16H1.4V16.7C1.4 18.8 2.8 19.7 4 20.3C5.7 21.2 5.7 21.6 5.7 22.1C5.7 22.6 5.4 23.1 4.5 23.1C3.7 23.1 3.1 22.4 3.1 21.6H1.4C1.4 23.1 2.4 24.7 4.5 24.7C6.6 24.7 7.5 23.3 7.5 22.1C7.5 20.3 6.3 19.8 4.9 19C4 18.4 3.3 17.9 3.3 17.4H7.7z M4.5 4.5C2.4 4.5 1.4 5.9 1.2 7.5H3C3 6.6 3.5 6.1 4.5 6.1C5.6 6.1 6.1 6.6 6.1 7.3C6.1 8 5.6 8.5 4.7 8.5H4.2V9.9H4.5C5.6 9.9 5.9 10.4 5.9 11C5.9 11.7 5.4 12 4.7 12C3.8 12 3.3 11.3 3.3 10.6H1.6C1.6 12.2 2.6 13.6 4.5 13.6C6.4 13.6 7.5 12.3 7.5 11.1C7.5 10.4 7.1 9.7 6.3 9.4C7.3 9 7.7 8.2 7.7 7.3C7.8 6.1 6.8 4.5 4.5 4.5z" />
<glyph glyph-name="logic"
unicode="&#xF10A;"
horiz-adv-x="40" d=" M2.8 14.1H7.4C10 14.2 12.2 16 13.1 18.6C15 23.1 18.3 31.3 23.7 31.3S29.8 31.3 29.8 31.3V35.8L36.9 28.3L29.8 21.5V26.4H24.9C22.3 25.7 20.2 24 19.4 21.5C17.3 17 15.2 9.4 8.2 9.2C5.1 9.2 3 9.2 3 9.2V14.1z M2.8 31.1V26.2H8.2C8.2 26.2 11.4 26.2 13.1 22.1C13.8 23.8 14.7 25.4 15.7 26.9C15.7 26.9 12.2 30.9 8.4 30.9S2.8 31.1 2.8 31.1z M19.5 18.4C19.5 18.4 21.8 13.9 24.4 13.9H30V18.4L37.3 11.3L30 4.2V9H23.7C23.7 9 20.2 9 16.9 13.4C18 14.9 18.8 16.7 19.5 18.4z" />
<glyph glyph-name="loops"
unicode="&#xF10B;"
horiz-adv-x="40" d=" M6.3 12.7C4.5 15.2 2.6 17.4 0.9 20H4.5C4.5 24.2 6.3 28.4 9.2 31.3C11.3 33.4 13.7 34.8 16.7 35.3C21.9 36.6 27.3 35 31.1 31.2C30.3 30.3 29.4 29.4 28.7 28.7C24.2 32.6 19.3 33.3 14.1 30.5C10.3 28.4 8.2 24.4 8.2 20.2H11.8C9.7 17.6 7.8 15 6.3 12.7z M32.2 20H28.5C30.4 22.5 32.2 24.7 33.9 27.3C35.8 24.9 37.6 22.6 39.3 20H35.6C35.6 15.7 33.7 11.5 30.6 8.6C28.5 6.6 26.1 5.3 23.3 4.7C18.1 3.5 12.7 5.1 8.9 8.9L11.3 11.3C15.6 7.5 20.7 6.6 25.9 9.6C29.9 11.7 32.2 15.7 32.2 20z" />
<glyph glyph-name="math"
unicode="&#xF10C;"
horiz-adv-x="40" d=" M15.2 5.3C14.9 4.9 14.2 4.2 13.8 3.9L9.3 8.4C7.6 6.7 6.2 5.3 4.8 3.9C4.4 4.2 3.8 4.9 3.4 5.3L7.9 9.8C6.2 11.5 4.8 12.9 3.4 14.3C3.8 14.7 4.4 15.4 4.8 15.7L9.3 11.2L13.8 15.7C14.2 15.4 14.9 14.7 15.2 14.3L10.7 9.8C12.1 8.2 13.7 6.7 15.2 5.3z M1.5 28V30H7.9V36.4C8.6 36.4 9.1 36.4 9.8 36.4V30H16.3V28H9.8V21.6H7.8V28H1.5z M38.4 10.7H22V14.1H38.4V10.7z M38.4 7.2V3.7H22V7.2H38.4z M38.4 31V27.5H22V31H38.4z" />
<glyph glyph-name="motors"
unicode="&#xF10D;"
horiz-adv-x="40" d=" M28.9 25.8C27.5 24.4 25.9 22.9 24.5 21.5H35.7V32.6L32.2 29.1C29.6 32.3 25.9 34.3 21.8 34.9C18.3 35.4 14.6 34.5 11.7 32.6C4.2 28.1 1.9 18.3 6.5 10.9S20.7 1.1 28.2 5.6C30.8 7.2 32.7 9.5 34.1 12.1C32.7 12.6 31.3 13.3 29.9 13.8C28.5 11 25.9 9 23 8.1C20.7 7.4 18.3 7.6 16 8.4C10.3 10.7 7.3 17.1 9.4 22.9C10.6 26.3 13.6 29 17.1 29.8C21.6 31.2 26.3 29.5 28.9 25.8z M16.7 19C16.7 17.1 18.3 15.7 20 15.7S23.3 17.3 23.3 19C23.3 21 21.8 22.3 20 22.3C18.1 22.5 16.7 21 16.7 19C16.7 19 16.7 19 16.7 19z" />
<glyph glyph-name="music"
unicode="&#xF10E;"
horiz-adv-x="40" d=" M24.2 17.7C27.1 17.2 29.9 15.7 31.7 13.2C32.5 13.2 33.4 13.2 33.4 13.2S36 20.9 30.3 26.3S13.4 31.7 9.2 26.3C6.3 22.6 5.2 17.6 6.8 13.2C7.3 13.2 7.7 13.2 8.2 13.2C8.2 13.2 11.1 17.6 15.8 17.7C15.7 10.1 15.7 3.5 15.7 3.5C12.3 4.2 9.6 6.3 8 9.4C4.5 10.1 1.7 13.2 1.7 17C1.7 28.3 10.3 34.8 20 34.8S38.8 27.3 38.1 17C37.7 9.9 31.8 9.4 31.8 9.4C30.4 6.3 27.7 4 24.3 3.5C24.2 11.3 24.2 17.7 24.2 17.7z" />
<glyph glyph-name="sensors"
unicode="&#xF10F;"
horiz-adv-x="40" d=" M20 36.9C10.6 36.9 3 29.2 3 19.8C3 10.4 10.6 2.8 20 2.8S37 10.4 37 19.8C36.9 29.4 29.4 36.9 20 36.9zM20 8.2C13.4 8.2 8.2 13.6 8.2 20S13.6 31.8 20 31.8S31.8 26.4 31.8 20S26.6 8.2 20 8.2z M13.2 20C13.2 16.3 16.3 13.2 20 13.2C23.7 13.2 26.8 16.3 26.8 20C26.8 23.7 23.7 26.8 20 26.8C16.3 26.8 13.2 23.7 13.2 20z" />
<glyph glyph-name="text"
unicode="&#xF110;"
horiz-adv-x="40" d=" M23.1 30.6V2.8H16.5V30.6H7.7V36.7H32.3V30.6H23.1z" />
<glyph glyph-name="variables"
unicode="&#xF111;"
horiz-adv-x="40" d=" M36.8 12V7.8H3.4V12H36.8z M36.8 22.1V17.9H3.4V22.1H36.8z M36.7 32.2V28H3.3V32.2H36.7z" />
<glyph glyph-name="console"
unicode="&#xF112;"
horiz-adv-x="40" d=" M15.6 21.3L2.3 15L2.3 19.8L11.1 23.6L2.3 27.4L2.3 32.2L15.6 25.9L15.6 21.3z M36 9.1L16.6 9.1L16.6 12.2L36 12.2L36 9.1z" />
<glyph glyph-name="advancedcollapsed"
unicode="&#xF113;"
horiz-adv-x="40" d=" M39.7 28.2L36.2 31.5L20 15.3L3.8 31.5L0.3 28.2L18.3 10.3L18.3 10.3L20 8.5L20.5 9L20.5 9z" />
<glyph glyph-name="advancedexpanded"
unicode="&#xF114;"
horiz-adv-x="40" d=" M39.3 12L21.7 29.6L21.7 29.6L20 31.3L19.5 30.8L19.5 30.8L0.7 12L4 8.7L20 24.7L36 8.7z" />
<glyph glyph-name="cancel"
unicode="&#xF115;"
horiz-adv-x="40" d=" M33 29.6L29.4 33.2L20.2 24L11 33.2L7.3 29.6L16.5 20.3L7.3 11.1L11 7.3L20.2 16.5L29.4 7.3L33 11.1L23.8 20.3z" />
<glyph glyph-name="check"
unicode="&#xF116;"
horiz-adv-x="40" d=" M33.7 32.9L15.3 14.4L7.5 22.3L3.8 18.4L11.7 10.8L11.7 10.8L15.3 7.1L37.4 29.2z" />
<glyph glyph-name="download"
unicode="&#xF117;"
horiz-adv-x="40" d=" M5.2 15.7H36.5V1.7H5.2V15.7z M28.5 24.2L26.1 26.6L22.6 23.1L22.6 36.5L19.1 36.5L19.1 23.5L16 26.6L13.6 24.2L20.9 16.7L21 16.9L21.2 16.7z" />
<glyph glyph-name="save"
unicode="&#xF118;"
horiz-adv-x="40" d=" M25 34.5C25 33.6 25 32.8 25 31.9C25 31 24.7 30.9 24 30.9C23.5 30.9 22.8 30.9 22.4 30.9C22.1 30.9 21.4 31 21.4 31.7V31.9V36.9C21.4 37.3 21.6 37.8 22.3 38C22.3 38 22.3 38 22.4 38C23 38 23.7 38 24.2 38C24.7 38 25.2 37.6 25.2 37.1C25.2 37.1 25.2 37.1 25.2 36.9C25 36.3 25 35.2 25 34.5z M37.6 31.2C35.8 32.9 34.3 34.5 32.5 36.3C31 37.8 31 37.8 28.5 37.8C27.5 37.8 27.3 37.6 27.3 36.6V28.4C27.3 27.4 27.1 27.2 26.1 27.2H14.3C13.2 27.2 13 27.4 13 28.4V36.4C13 37.6 12.9 37.8 11.7 37.8H3.8C2.6 37.8 2.4 37.6 2.4 36.4V19.9C2.4 14.3 2.4 8.9 2.4 3.2C2.4 2 2.6 1.8 3.7 1.8H36.9C37.9 1.8 38.1 2.2 38.1 3.2V29.6C38.3 30.5 37.9 30.9 37.6 31.2zM33.7 6.7H7.1V23H33.7V6.7z" />
<glyph glyph-name="blocks"
unicode="&#xF119;"
horiz-adv-x="40" d=" M10.9 23H39V16.9H10.9V23z M39.2 27.1L39.2 33L0.9 33L0.9 31.1L0.9 27.1L0.9 12.9L0.9 7L39.2 7L39.2 12.9L6.9 12.9L6.9 27.1z" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

BIN
docs/static/fonts/icons/iconfont.ttf vendored Normal file

Binary file not shown.

BIN
docs/static/fonts/icons/iconfont.woff vendored Normal file

Binary file not shown.

BIN
docs/static/fonts/icons/iconfont.woff2 vendored Normal file

Binary file not shown.

BIN
docs/static/hero.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

74
docs/static/lego-logo.svg vendored Normal file
View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="141.73"
height="141.731"
viewBox="0 0 141.73 141.73101"
enable-background="new 0 0 265.365 141.732"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="lego-logo.svg"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1199"
inkscape:window-height="604"
id="namedview22"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.6520876"
inkscape:cx="101.03204"
inkscape:cy="98.819336"
inkscape:window-x="372"
inkscape:window-y="149"
inkscape:window-maximized="0"
inkscape:current-layer="g6" /><g
id="product_logo" /><g
id="guides" /><g
id="LEGO_LOGO_SMALL_RGB"><g
id="g6"><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z"
id="path8"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z m 130.536,58.127 c -0.23,4.356 -1.617,9.786 -2.839,13.414 -4.917,14.609 -10.618,23.666 -23.821,23.666 -3.887,0 -10.783,-1.031 -13.324,-7.947 l -0.602,-1.641 -1.082,1.371 C 85.7,93.168 79.564,96.186 72.998,96.217 67.96,96.24 63.912,94.553 61.293,91.334 l -0.718,-0.883 -0.765,0.844 c -2.797,3.088 -7.668,4.859 -13.364,4.859 -4.473,0 -8.335,-1.521 -10.876,-4.277 l -0.692,-0.752 -0.72,0.727 c -2.825,2.852 -7.276,4.289 -12.873,4.158 -6.79,-0.162 -10.924,-3.951 -11.058,-10.141 -0.205,-9.543 9.031,-29.622 12.854,-35.727 2.482,-4.078 5.895,-6.055 10.438,-6.055 3.092,0 5.207,0.646 6.463,1.977 1.144,1.211 1.37,2.232 1.472,4.688 l 0.131,3.175 1.676,-2.7 c 4.054,-6.532 10.773,-7.434 17.43,-7.434 4.628,0 8.667,1.702 10.289,4.336 l 0.599,0.971 0.866,-0.737 c 3.431,-2.916 8.271,-4.521 13.629,-4.521 5.849,0 10.099,1.454 12.634,4.322 0.576,0.651 0.957,1.106 1.486,2.219 l 0.651,1.366 0.977,-1.155 c 3.712,-4.39 8.779,-6.615 15.067,-6.615 4.98,0 8.761,1.324 11.235,3.935 3.104,3.271 3.547,7.875 3.373,11.161 z"
id="path10"
inkscape:connector-curvature="0"
style="fill:#f6ec36" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z M 135.435,64.44 c -0.633,5.089 -4.072,14.518 -5.899,18.286 -4.903,10.102 -11.453,17.863 -24.074,17.863 -6.742,0 -12.288,-2.15 -15.531,-6.283 -4.749,4.162 -10.627,6.342 -16.956,6.342 -4.876,0 -9.185,-1.408 -12.471,-4.012 -3.626,2.555 -8.52,3.98 -13.943,3.98 -4.53,0 -8.606,-1.244 -11.796,-3.543 -3.529,2.342 -8.154,3.506 -13.583,3.377 C 12.149,100.237 5.912,94.507 5.733,86.188 5.497,75.137 14.803,54.911 19.189,47.907 c 3.282,-5.392 8.292,-8.293 14.431,-8.293 6.663,0 9.078,1.903 10.267,4.326 5.141,-4.366 11.956,-4.617 16.808,-4.617 5.356,0 8.717,1.422 11.575,3.697 3.948,-2.368 8.477,-3.599 13.871,-3.599 6.897,0 12.021,1.604 15.595,5.137 4.168,-3.469 9.388,-5.05 15.23,-5.05 7.725,0 12.808,2.786 15.793,6.94 4.203,5.859 3.451,11.757 2.676,17.992 z"
id="path12"
inkscape:connector-curvature="0"
style="fill:#d01012" /><path
d="m 0,0 0,141.731 141.73,0 L 141.73,0 0,0 Z m 139.781,1.952 0,137.832 -137.83,0 0,-137.832 137.83,0 z"
id="path14"
inkscape:connector-curvature="0" /><path
d="m 134.752,42.53 0,-0.965 0.655,0 c 0.479,0 0.728,0.168 0.728,0.479 0,0.247 -0.16,0.486 -0.647,0.486 l -0.736,0 z m 2.351,2.002 -0.408,-0.708 c -0.354,-0.619 -0.452,-0.717 -0.755,-0.823 l 0,-0.019 c 0.596,-0.07 0.95,-0.453 0.95,-0.983 0,-0.56 -0.354,-0.984 -1.109,-0.984 l -1.754,0 0,3.519 0.727,0 0,-1.441 0.133,0 c 0.311,0 0.435,0.035 0.576,0.176 0.142,0.144 0.354,0.443 0.479,0.69 l 0.284,0.575 0.877,-0.002 0,0 z m -1.731,-4.497 c 1.51,0 2.737,1.218 2.737,2.726 0,1.508 -1.229,2.731 -2.737,2.731 -1.506,0 -2.72,-1.225 -2.72,-2.731 0,-1.506 1.214,-2.726 2.72,-2.726 z m 0,-0.67 c -1.877,0 -3.392,1.516 -3.392,3.396 0,1.879 1.515,3.394 3.392,3.394 1.883,0 3.397,-1.515 3.397,-3.394 0.002,-1.882 -1.514,-3.396 -3.397,-3.396 z"
id="path16"
inkscape:connector-curvature="0" /><path
d="m 116.889,43.002 c -7.325,0 -12.386,2.904 -15.812,6.961 -0.579,-1.214 -1.019,-1.746 -1.638,-2.447 -2.805,-3.17 -7.313,-4.649 -13.364,-4.649 -5.912,0 -10.841,1.846 -14.263,4.754 -1.777,-2.89 -6.013,-4.803 -11.121,-4.803 -6.674,0 -13.946,0.944 -18.261,7.896 -0.104,-2.503 -0.33,-3.828 -1.737,-5.317 -1.71,-1.81 -4.477,-2.282 -7.173,-2.282 -4.912,0 -8.605,2.146 -11.266,6.515 -3.859,6.163 -13.212,26.441 -13.001,36.263 0.137,6.344 4.393,10.916 12.01,11.096 5.952,0.143 10.62,-1.449 13.59,-4.447 2.665,2.896 6.731,4.594 11.596,4.594 5.417,0 10.868,-1.627 14.088,-5.182 2.712,3.332 6.979,5.271 12.468,5.244 7.175,-0.035 13.477,-3.438 17.593,-8.652 2.259,6.148 7.985,8.59 14.241,8.59 13.709,0 19.729,-9.428 24.748,-24.332 1.13,-3.357 2.639,-8.963 2.889,-13.672 0.413,-7.839 -2.903,-16.13 -15.587,-16.13 z M 25.672,80.477 c 7.093,-1.232 8.876,1.332 8.653,3.707 -0.669,7.109 -7.191,8.699 -12.854,8.566 -4.107,-0.1 -7.8,-1.98 -7.903,-6.748 -0.18,-8.342 8.328,-27.641 12.333,-34.038 1.85,-3.037 4.104,-4.539 7.698,-4.539 3.406,0 4.25,1.749 4.2,3.844 -0.134,5.589 -9.164,22.574 -12.127,29.208 z M 48.77,73.925 c -0.469,1.27 -1.357,3.93 -2.076,6.75 2.328,-0.582 4.074,-0.986 7.065,-0.914 3.408,0.084 5.586,1.496 5.586,4.314 0,6.832 -7.551,8.838 -12.789,8.838 -5.751,0 -10.803,-3.275 -10.803,-9.564 0,-7.373 3.997,-18.553 7.748,-26.001 4.606,-9.146 9.312,-10.362 17.419,-10.362 3.562,0 7.667,1.524 7.667,4.888 0,4.662 -3.95,6.44 -7.866,6.665 -1.672,0.096 -4.246,0.188 -5.786,0.079 0,0 -1.303,1.985 -2.688,5.523 7.252,-1.021 10.327,0.625 9.103,4.82 -1.657,5.667 -6.567,6.04 -12.58,4.964 z M 84.438,56.293 c -1.961,0 -3.244,1.242 -4.198,2.583 -2.102,2.952 -6.656,14.781 -7.365,19.64 -0.486,3.328 0.951,4.006 2.522,4.006 2.52,0 5.345,-2.666 6.309,-7.064 0,0 -4.797,-0.117 -3.475,-4.371 1.285,-4.128 3.723,-5.022 7.764,-5.188 7.961,-0.325 7.175,5.553 6.538,8.688 -2.069,10.18 -9.314,18.355 -19.562,18.355 -7.016,0 -11.371,-3.881 -11.371,-11.035 0,-5.098 2.529,-13.101 4.534,-17.784 4.267,-9.968 8.742,-16.944 20.143,-16.944 6.84,0 12.235,2.458 11.444,8.866 -0.58,4.703 -2.934,7.465 -7.21,7.799 -1.196,0.093 -6.089,-0.031 -4.466,-4.66 0.565,-1.619 0.799,-2.891 -1.607,-2.891 z m 43.057,8.413 c -1.205,6.002 -3.916,13.101 -6.859,18.392 -4.801,8.633 -10.633,9.842 -15.723,9.781 -5.093,-0.061 -10.83,-1.941 -10.874,-9.795 -0.031,-5.639 2.401,-13.598 4.466,-18.815 3.599,-9.458 7.277,-17.17 18.904,-17.031 13.559,0.161 11.141,12.219 10.086,17.468 z M 115.993,56.49 c -1.164,-0.016 -2.18,0.212 -3.093,1.62 -2.051,2.657 -8.047,19.042 -7.941,22.31 0.038,1.174 0.687,2.201 2.133,2.201 1.659,0.002 2.581,-1.145 3.396,-2.529 1.887,-3.193 7.193,-17.676 7.339,-21.297 0.043,-1.055 -0.133,-2.284 -1.834,-2.305 z"
id="path18"
inkscape:connector-curvature="0" /></g></g></svg>

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
docs/static/lego_education_logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

1
docs/static/loader_back.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="301.499" height="179.742" viewBox="0 0 282.655 168.508"><g transform="translate(-41.005 -446.364)"><rect ry="30" rx="30" y="458.77" x="53.41" height="143.698" width="105.312" stroke="#000" stroke-width="17.724" stroke-linecap="round" stroke-linejoin="round"/><rect width="105.668" height="144.183" x="53.232" y="458.527" rx="30.101" ry="30.101" fill="#fff"/></g><g transform="translate(111.528 -446.364)"><rect width="105.312" height="143.698" x="53.41" y="458.77" rx="30" ry="30" stroke="#000" stroke-width="17.724" stroke-linecap="round" stroke-linejoin="round"/><rect ry="30.101" rx="30.101" y="458.527" x="53.232" height="144.183" width="105.668" fill="#fff"/></g></svg>

After

Width:  |  Height:  |  Size: 721 B

1
docs/static/loader_front.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="301.499" height="179.742" viewBox="0 0 282.655 168.508"><g stroke="#000" stroke-linecap="round" stroke-linejoin="round"><g transform="translate(124.66 -243.829)"><circle r="25.968" cy="356.872" cx="-38.891" fill="none"/><circle cx="-38.891" cy="356.872" r="21.013" stroke-width=".809"/><path d="M-30.581 341.741a13.835 13.835 0 0 1 5.76 4.504l-11.099 8.26z" fill="#fff" stroke-width=".533"/></g><g transform="translate(277.193 -243.829)"><circle cx="-38.891" cy="356.872" r="25.968" fill="none"/><circle r="21.013" cy="356.872" cx="-38.891" stroke-width=".809"/><path d="M-30.581 341.741a13.835 13.835 0 0 1 5.76 4.504l-11.099 8.26z" fill="#fff" stroke-width=".533"/></g></g></svg>

After

Width:  |  Height:  |  Size: 728 B

1
docs/static/loader_full.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="301.499" height="179.742" viewBox="0 0 282.655 168.508"><g transform="translate(-41.005 -446.364)"><rect ry="30" rx="30" y="458.77" x="53.41" height="143.698" width="105.312" stroke="#000" stroke-width="17.724" stroke-linecap="round" stroke-linejoin="round"/><rect width="105.668" height="144.183" x="53.232" y="458.527" rx="30.101" ry="30.101" fill="#fff"/></g><g transform="translate(124.66 -243.829)" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><circle r="25.968" cy="356.872" cx="-38.891" fill="none"/><circle cx="-38.891" cy="356.872" r="21.013" stroke-width=".809"/><path d="M-30.581 341.741a13.835 13.835 0 0 1 5.76 4.504l-11.099 8.26z" fill="#fff" stroke-width=".533"/></g><g transform="translate(111.528 -446.364)"><rect width="105.312" height="143.698" x="53.41" y="458.77" rx="30" ry="30" stroke="#000" stroke-width="17.724" stroke-linecap="round" stroke-linejoin="round"/><rect ry="30.101" rx="30.101" y="458.527" x="53.232" height="144.183" width="105.668" fill="#fff"/></g><g transform="translate(277.193 -243.829)" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><circle cx="-38.891" cy="356.872" r="25.968" fill="none"/><circle r="21.013" cy="356.872" cx="-38.891" stroke-width=".809"/><path d="M-30.581 341.741a13.835 13.835 0 0 1 5.76 4.504l-11.099 8.26z" fill="#fff" stroke-width=".533"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
docs/static/maker/intruder-detector.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
docs/static/maker/puppet.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

BIN
docs/static/maker/security-gadget.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
docs/static/maker/sound-machine.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

BIN
docs/static/maker/sound-of-color.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

134
editor/deploy.ts Normal file
View File

@ -0,0 +1,134 @@
/// <reference path="../node_modules/pxt-core/built/pxteditor.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
import UF2 = pxtc.UF2;
export let ev3: pxt.editor.Ev3Wrapper
export function debug() {
return initAsync()
.then(w => w.downloadFileAsync("/tmp/dmesg.txt", v => console.log(pxt.Util.uint8ArrayToString(v))))
}
function hf2Async() {
return pxt.HF2.mkPacketIOAsync()
.then(h => {
let w = new pxt.editor.Ev3Wrapper(h)
ev3 = w
return w.reconnectAsync(true)
.then(() => w)
})
}
let noHID = false
let initPromise: Promise<pxt.editor.Ev3Wrapper>
export function initAsync() {
if (initPromise)
return initPromise
let canHID = false
if (pxt.U.isNodeJS) {
// doesn't seem to work ATM
canHID = false
} else {
const forceHexDownload = /forceHexDownload/i.test(window.location.href);
if (pxt.Cloud.isLocalHost() && pxt.Cloud.localToken && !forceHexDownload)
canHID = true
}
if (noHID)
canHID = false
if (canHID) {
initPromise = hf2Async()
.catch(err => {
initPromise = null
noHID = true
return Promise.reject(err)
})
} else {
noHID = true
initPromise = Promise.reject(new Error("no HID"))
}
return initPromise
}
// this comes from aux/pxt.lms
const rbfTemplate = `
4c45474f580000006d000100000000001c000000000000000e000000821b038405018130813e8053
74617274696e672e2e2e0084006080XX00448581644886488405018130813e80427965210084000a
`
export function deployCoreAsync(resp: pxtc.CompileResult, isCli = false) {
let w: pxt.editor.Ev3Wrapper
let filename = resp.downloadFileBaseName || "pxt"
filename = filename.replace(/^lego-/, "")
let fspath = "../prjs/BrkProg_SAVE/"
let elfPath = fspath + filename + ".elf"
let rbfPath = fspath + filename + ".rbf"
let rbfHex = rbfTemplate
.replace(/\s+/g, "")
.replace("XX", pxt.U.toHex(pxt.U.stringToUint8Array(elfPath)))
let rbfBIN = pxt.U.fromHex(rbfHex)
pxt.HF2.write16(rbfBIN, 4, rbfBIN.length)
let origElfUF2 = UF2.parseFile(pxt.U.stringToUint8Array(atob(resp.outfiles[pxt.outputName()])))
let mkFile = (ext: string, data: Uint8Array = null) => {
let f = UF2.newBlockFile()
f.filename = "Projects/" + filename + ext
if (data)
UF2.writeBytes(f, 0, data)
return f
}
let elfUF2 = mkFile(".elf")
for (let b of origElfUF2) {
UF2.writeBytes(elfUF2, b.targetAddr, b.data)
}
let r = UF2.concatFiles([elfUF2, mkFile(".rbf", rbfBIN)])
let data = UF2.serializeFile(r)
resp.outfiles[pxtc.BINARY_UF2] = btoa(data)
let saveUF2Async = () => {
if (isCli || !pxt.commands.saveOnlyAsync) {
return Promise.resolve()
} else {
return pxt.commands.saveOnlyAsync(resp)
}
}
if (noHID) return saveUF2Async()
return initAsync()
.then(w_ => {
w = w_
if (w.isStreaming)
pxt.U.userError("please stop the program first")
return w.stopAsync()
})
.then(() => w.rmAsync(elfPath))
.then(() => w.flashAsync(elfPath, UF2.readBytes(origElfUF2, 0, origElfUF2.length * 256)))
.then(() => w.flashAsync(rbfPath, rbfBIN))
.then(() => w.runAsync(rbfPath))
.then(() => {
if (isCli)
return w.disconnectAsync()
else
return Promise.resolve()
//return Promise.delay(1000).then(() => w.dmesgAsync())
}).catch(e => {
// if we failed to initalize, retry
if (noHID)
return saveUF2Async()
else
return Promise.reject(e)
})
}

View File

@ -1,144 +1,146 @@
/// <reference path="../node_modules/pxt-core/built/pxteditor.d.ts" /> /// <reference path="../node_modules/pxt-core/built/pxteditor.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
import { deployCoreAsync, initAsync } from "./deploy";
import { FieldPorts } from "./field_ports";
import { FieldImages } from "./field_images";
import { FieldSpeed } from "./field_speed";
import { FieldBrickButtons } from "./field_brickbuttons";
import { FieldTurnRatio } from "./field_turnratio";
pxt.editor.initExtensionsAsync = function(opts: pxt.editor.ExtensionOptions): Promise<pxt.editor.ExtensionResult> {
pxt.debug('loading pxt-ev3 target extensions...')
updateBlocklyShape();
const res: pxt.editor.ExtensionResult = {
fieldEditors: [{
selector: "ports",
editor: FieldPorts
}, {
selector: "images",
editor: FieldImages
}, {
selector: "speed",
editor: FieldSpeed
}, {
selector: "brickbuttons",
editor: FieldBrickButtons
}, {
selector: "turnratio",
editor: FieldTurnRatio
}],
deployCoreAsync
};
initAsync().catch(e => {
// probably no HID - we'll try this again upon deployment
})
return Promise.resolve<pxt.editor.ExtensionResult>(res);
}
/**
* Update the shape of Blockly blocks with square corners
*/
function updateBlocklyShape() {
/**
* Rounded corner radius.
* @const
*/
(Blockly.BlockSvg as any).CORNER_RADIUS = 0 * (Blockly.BlockSvg as any).GRID_UNIT;
/**
* Inner space between edge of statement input and notch.
* @const
*/
(Blockly.BlockSvg as any).STATEMENT_INPUT_INNER_SPACE = 3 * (Blockly.BlockSvg as any).GRID_UNIT;
/**
* SVG path for drawing next/previous notch from left to right.
* @const
*/
(Blockly.BlockSvg as any).NOTCH_PATH_LEFT = (
'l 8,8 ' +
'h 16 ' +
'l 8,-8 '
);
/**
* SVG path for drawing next/previous notch from right to left.
* @const
*/
(Blockly.BlockSvg as any).NOTCH_PATH_RIGHT = (
'l -8,8 ' +
'h -16 ' +
'l -8,-8 '
);
/**
* SVG start point for drawing the top-left corner.
* @const
*/
(Blockly.BlockSvg as any).TOP_LEFT_CORNER_START =
'm 0,' + 0;
/**
* SVG path for drawing the rounded top-left corner.
* @const
*/
(Blockly.BlockSvg as any).TOP_LEFT_CORNER =
'l ' + (Blockly.BlockSvg as any).CORNER_RADIUS + ',0 ';
/**
* SVG path for drawing the rounded top-right corner.
* @const
*/
(Blockly.BlockSvg as any).TOP_RIGHT_CORNER =
'l ' + 0 + ',' + (Blockly.BlockSvg as any).CORNER_RADIUS;
/**
* SVG path for drawing the rounded bottom-right corner.
* @const
*/
(Blockly.BlockSvg as any).BOTTOM_RIGHT_CORNER =
'l 0,' + (Blockly.BlockSvg as any).CORNER_RADIUS;
/**
* SVG path for drawing the rounded bottom-left corner.
* @const
*/
(Blockly.BlockSvg as any).BOTTOM_LEFT_CORNER =
'l -' + (Blockly.BlockSvg as any).CORNER_RADIUS + ',0';
/**
* SVG path for drawing the top-left corner of a statement input.
* @const
*/
(Blockly.BlockSvg as any).INNER_TOP_LEFT_CORNER =
'l ' + (Blockly.BlockSvg as any).CORNER_RADIUS + ',-' + 0;
/**
* SVG path for drawing the bottom-left corner of a statement input.
* Includes the rounded inside corner.
* @const
*/
(Blockly.BlockSvg as any).INNER_BOTTOM_LEFT_CORNER =
'l ' + 0 + ',' + (Blockly.BlockSvg as any).CORNER_RADIUS * 2 +
'l ' + (Blockly.BlockSvg as any).CORNER_RADIUS + ',' + 0;
/**
* Corner radius of the flyout background.
* @type {number}
* @const
*/
(Blockly as any).Flyout.prototype.CORNER_RADIUS = 0;
/**
* Margin around the edges of the blocks in the flyout.
* @type {number}
* @const
*/
(Blockly as any).Flyout.prototype.MARGIN = 8;
}
// When require()d from node, bind the global pxt namespace // When require()d from node, bind the global pxt namespace
namespace pxt { // namespace pxt {
export const dummyExport = 1; // export const dummyExport = 1;
} // }
eval("if (typeof process === 'object' && process + '' === '[object process]') pxt = global.pxt") // eval("if (typeof process === 'object' && process + '' === '[object process]') pxt = global.pxt")
namespace pxt.editor {
import UF2 = pxtc.UF2;
// this comes from aux/pxt.lms
const rbfTemplate = `
4c45474f580000006d000100000000001c000000000000000e000000821b038405018130813e8053
74617274696e672e2e2e0084006080XX00448581644886488405018130813e80427965210084000a
`
function hf2Async() {
return pxt.HF2.mkPacketIOAsync()
.then(h => {
let w = new Ev3Wrapper(h)
return w.reconnectAsync(true)
.then(() => w)
})
}
let noHID = false
let initPromise: Promise<Ev3Wrapper>
function initAsync() {
if (initPromise)
return initPromise
let canHID = false
if (U.isNodeJS) {
canHID = true
} else {
const forceHexDownload = /forceHexDownload/i.test(window.location.href);
if (Cloud.isLocalHost() && Cloud.localToken && !forceHexDownload)
canHID = true
}
if (noHID)
canHID = false
if (canHID) {
initPromise = hf2Async()
.catch(err => {
initPromise = null
noHID = true
return Promise.reject(err)
})
} else {
noHID = true
initPromise = Promise.reject(new Error("no HID"))
}
return initPromise
}
export function deployCoreAsync(resp: pxtc.CompileResult, isCli = false) {
let w: Ev3Wrapper
let filename = resp.downloadFileBaseName || "pxt"
filename = filename.replace(/^lego-/, "")
let fspath = "../prjs/BrkProg_SAVE/"
let elfPath = fspath + filename + ".elf"
let rbfPath = fspath + filename + ".rbf"
let rbfHex = rbfTemplate
.replace(/\s+/g, "")
.replace("XX", U.toHex(U.stringToUint8Array(elfPath)))
let rbfBIN = U.fromHex(rbfHex)
HF2.write16(rbfBIN, 4, rbfBIN.length)
let origElfUF2 = UF2.parseFile(U.stringToUint8Array(atob(resp.outfiles[pxt.outputName()])))
let mkFile = (ext: string, data: Uint8Array = null) => {
let f = UF2.newBlockFile()
f.filename = "Projects/" + filename + ext
if (data)
UF2.writeBytes(f, 0, data)
return f
}
let elfUF2 = mkFile(".elf")
for (let b of origElfUF2) {
UF2.writeBytes(elfUF2, b.targetAddr, b.data)
}
let r = UF2.concatFiles([elfUF2, mkFile(".rbf", rbfBIN)])
let data = UF2.serializeFile(r)
resp.outfiles[pxtc.BINARY_UF2] = btoa(data)
let saveUF2Async = () => {
if (isCli || !pxt.commands.saveOnlyAsync) {
return Promise.resolve()
} else {
return pxt.commands.saveOnlyAsync(resp)
}
}
if (noHID) return saveUF2Async()
return initAsync()
.then(w_ => {
w = w_
if (w.isStreaming)
U.userError("please stop the program first")
return w.stopAsync()
})
.then(() => w.rmAsync(elfPath))
.then(() => w.flashAsync(elfPath, UF2.readBytes(origElfUF2, 0, origElfUF2.length * 256)))
.then(() => w.flashAsync(rbfPath, rbfBIN))
.then(() => w.runAsync(rbfPath))
.then(() => {
if (isCli)
return w.disconnectAsync()
else
return Promise.resolve()
//return Promise.delay(1000).then(() => w.dmesgAsync())
}).catch(e => {
// if we failed to initalize, retry
if (noHID)
return saveUF2Async()
else
return Promise.reject(e)
})
}
initExtensionsAsync = function (opts: pxt.editor.ExtensionOptions): Promise<pxt.editor.ExtensionResult> {
pxt.debug('loading pxt-ev3 target extensions...')
const res: pxt.editor.ExtensionResult = {
deployCoreAsync,
};
initAsync().catch(e => {
// probably no HID - we'll try this again upon deployment
})
return Promise.resolve<pxt.editor.ExtensionResult>(res);
}
}

View File

@ -0,0 +1,159 @@
/// <reference path="../node_modules/pxt-core/localtypings/blockly.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
export interface FieldPortsOptions extends Blockly.FieldCustomDropdownOptions {
columns?: string;
width?: string;
}
export class FieldBrickButtons extends Blockly.FieldDropdown implements Blockly.FieldCustom {
public isFieldCustom_ = true;
// Width in pixels
private width_: number;
// Columns in grid
private columns_: number;
private savedPrimary_: string;
constructor(text: string, options: FieldPortsOptions, validator?: Function) {
super(options.data);
this.columns_ = parseInt(options.columns) || 4;
this.width_ = parseInt(options.width) || 150;
}
/**
* Create a dropdown menu under the text.
* @private
*/
public showEditor_() {
// If there is an existing drop-down we own, this is a request to hide the drop-down.
if (Blockly.DropDownDiv.hideIfOwner(this)) {
return;
}
// If there is an existing drop-down someone else owns, hide it immediately and clear it.
Blockly.DropDownDiv.hideWithoutAnimation();
Blockly.DropDownDiv.clearContent();
// Populate the drop-down with the icons for this field.
let dropdownDiv = Blockly.DropDownDiv.getContentDiv();
let contentDiv = document.createElement('div');
// Accessibility properties
contentDiv.setAttribute('role', 'menu');
contentDiv.setAttribute('aria-haspopup', 'true');
const buttonsSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg") as SVGGElement;
pxsim.svg.hydrate(buttonsSVG, {
viewBox: "0 0 256.68237 256.68237",
width: this.width_,
height: this.width_
});
contentDiv.appendChild(buttonsSVG);
const gWrapper = pxsim.svg.child(buttonsSVG, 'g', { 'transform': 'translate(-4.695057,58.29823)' });
const gInnerWrapper = pxsim.svg.child(gWrapper, 'g', { 'transform': 'translate(3.9780427e-6,-32.677281)' });
const back = pxsim.svg.child(gInnerWrapper, 'path', {
style: 'fill:#6a6a6a;stroke-width:3.91719985',
d: 'M 106.30882,198.38022 C 84.431262,177.26258 50.453467,142.52878 50.453467,142.52878 v -7.12931 H 37.087971 a 32.381533,32.381533 0 1 1 0,-64.763062 H 50.457376 V 63.503186 L 105.71731,7.0563355 h 55.25604 c 25.02699,25.5048885 55.25994,55.2599395 55.25994,55.2599395 v 8.320133 h 12.77398 a 32.381533,32.381533 0 0 1 0,64.763062 h -12.77398 v 7.13323 c -29.43384,30.27603 -54.66454,55.85144 -54.66454,55.85144 z'
})
const buttonLeft = pxsim.svg.child(gInnerWrapper, 'path', {
style: 'fill:#a8a9a8;stroke-width:3.91719985',
d: 'm 36.492567,78.357208 h 40.69971 V 126.48393 H 36.492567 A 24.063359,24.063359 0 0 1 12.429199,102.42057 v 0 A 24.063359,24.063359 0 0 1 36.492567,78.357208 Z'
})
const buttonRight = pxsim.svg.child(gInnerWrapper, 'path', {
style: 'fill:#a8a9a8;stroke-width:3.91719985',
d: 'M 229.00727,126.48784 H 188.30756 V 78.361126 h 40.69971 a 24.063359,24.063359 0 0 1 24.06335,24.063354 v 0 a 24.063359,24.063359 0 0 1 -24.06335,24.06336 z'
})
const buttonEnter = pxsim.svg.child(gInnerWrapper, 'path', {
style: 'fill:#3c3c3c;stroke-width:3.91719985',
d: 'm 109.27806,78.357208 h 46.9398 a 1.782326,1.782326 0 0 1 1.78233,1.782326 V 124.7016 a 1.782326,1.782326 0 0 1 -1.78233,1.78233 h -46.9398 a 1.782326,1.782326 0 0 1 -1.78233,-1.78233 V 80.139534 a 1.782326,1.782326 0 0 1 1.78233,-1.782326 z'
})
const buttonTop = pxsim.svg.child(gInnerWrapper, 'path', {
style: 'fill:#a8a9a8;stroke-width:3.91719985',
d: 'm 108.09114,15.967966 49.90905,-0.59542 37.43276,38.619675 -15.44943,15.449437 V 97.367379 H 165.7249 V 81.306861 A 11.978797,11.978797 0 0 0 153.84012,69.422075 c -11.59883,-0.184102 -43.37516,0 -43.37516,0 A 9.6676495,9.6676495 0 0 0 100.36251,79.520618 V 97.347793 H 86.103905 V 69.422075 L 70.654464,53.97264 Z'
})
const buttonBottom = pxsim.svg.child(gInnerWrapper, 'path', {
style: 'fill:#a8a9a8;stroke-width:3.91719985',
d: 'M 157.78865,189.01028 108.18908,189.38233 70.654464,150.794 86.323259,135.4895 v -28.08625 h 14.101921 v 16.11144 a 12.006218,12.006218 0 0 0 11.85346,11.9788 c 11.59882,0.1841 43.13227,0 43.13227,0 a 10.18472,10.18472 0 0 0 10.38059,-10.38058 v -17.70966 h 14.39179 v 28.08632 l 15.3045,15.3045 z'
})
const buttons = [buttonEnter, buttonLeft, buttonRight, buttonTop, buttonBottom];
const options = this.getOptions();
for (let i = 0, option: any; option = options[i]; i++) {
let content = (options[i] as any)[0]; // Human-readable text or image.
const value = (options[i] as any)[1]; // Language-neutral value.
const button = buttons[i];
button.setAttribute('id', ':' + i); // For aria-activedescendant
button.setAttribute('role', 'menuitem');
button.setAttribute('cursor', 'pointer');
const title = pxsim.svg.child(button, 'title');
title.textContent = content;
Blockly.bindEvent_(button, 'click', this, this.buttonClick_);
Blockly.bindEvent_(button, 'mouseup', this, this.buttonClick_);
// These are applied manually instead of using the :hover pseudoclass
// because Android has a bad long press "helper" menu and green highlight
// that we must prevent with ontouchstart preventDefault
Blockly.bindEvent_(button, 'mousedown', button, function (e) {
this.setAttribute('stroke', '#ffffff');
e.preventDefault();
});
Blockly.bindEvent_(button, 'mouseover', button, function () {
this.setAttribute('stroke', '#ffffff');
});
Blockly.bindEvent_(button, 'mouseout', button, function () {
this.setAttribute('stroke', 'transparent');
});
button.setAttribute('data-value', value);
}
contentDiv.style.width = this.width_ + 'px';
dropdownDiv.appendChild(contentDiv);
Blockly.DropDownDiv.setColour('#ffffff', '#dddddd');
// Calculate positioning based on the field position.
var scale = this.sourceBlock_.workspace.scale;
var bBox = { width: this.size_.width, height: this.size_.height };
bBox.width *= scale;
bBox.height *= scale;
var position = this.fieldGroup_.getBoundingClientRect();
var primaryX = position.left + bBox.width / 2;
var primaryY = position.top + bBox.height;
var secondaryX = primaryX;
var secondaryY = position.top;
// Set bounds to workspace; show the drop-down.
(Blockly.DropDownDiv as any).setBoundsElement(this.sourceBlock_.workspace.getParentSvg().parentNode);
(Blockly.DropDownDiv as any).show(this, primaryX, primaryY, secondaryX, secondaryY,
this.onHide_.bind(this));
}
/**
* Callback for when a button is clicked inside the drop-down.
* Should be bound to the FieldIconMenu.
* @param {Event} e DOM event for the click/touch
* @private
*/
private buttonClick_ = function (e: any) {
let value = e.target.getAttribute('data-value');
this.setValue(value);
Blockly.DropDownDiv.hide();
};
/**
* Callback for when the drop-down is hidden.
*/
private onHide_ = function () {
Blockly.DropDownDiv.content_.removeAttribute('role');
Blockly.DropDownDiv.content_.removeAttribute('aria-haspopup');
Blockly.DropDownDiv.content_.removeAttribute('aria-activedescendant');
};
}

114
editor/field_images.ts Normal file
View File

@ -0,0 +1,114 @@
/// <reference path="../node_modules/pxt-core/localtypings/blockly.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtblocks.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
export interface FieldImagesOptions extends pxtblockly.FieldImageDropdownOptions {
}
export class FieldImages extends pxtblockly.FieldImageDropdown implements Blockly.FieldCustom {
public isFieldCustom_ = true;
constructor(text: string, options: FieldImagesOptions, validator?: Function) {
super(text, options, validator);
}
/**
* Create a dropdown menu under the text.
* @private
*/
public showEditor_() {
// If there is an existing drop-down we own, this is a request to hide the drop-down.
if (Blockly.DropDownDiv.hideIfOwner(this)) {
return;
}
// If there is an existing drop-down someone else owns, hide it immediately and clear it.
Blockly.DropDownDiv.hideWithoutAnimation();
Blockly.DropDownDiv.clearContent();
// Populate the drop-down with the icons for this field.
let dropdownDiv = Blockly.DropDownDiv.getContentDiv();
let contentDiv = document.createElement('div');
// Accessibility properties
contentDiv.setAttribute('role', 'menu');
contentDiv.setAttribute('aria-haspopup', 'true');
const options = this.getOptions();
for (let i = 0, option: any; option = options[i]; i++) {
let content = (options[i] as any)[0]; // Human-readable text or image.
const value = (options[i] as any)[1]; // Language-neutral value.
// Icons with the type property placeholder take up space but don't have any functionality
// Use for special-case layouts
if (content.type == 'placeholder') {
let placeholder = document.createElement('span');
placeholder.setAttribute('class', 'blocklyDropDownPlaceholder');
placeholder.style.width = content.width + 'px';
placeholder.style.height = content.height + 'px';
contentDiv.appendChild(placeholder);
continue;
}
let button = document.createElement('button');
button.setAttribute('id', ':' + i); // For aria-activedescendant
button.setAttribute('role', 'menuitem');
button.setAttribute('class', 'blocklyDropDownButton');
button.title = content.alt;
if ((this as any).columns_) {
button.style.width = (((this as any).width_ / (this as any).columns_) - 8) + 'px';
//button.style.height = ((this.width_ / this.columns_) - 8) + 'px';
} else {
button.style.width = content.width + 'px';
button.style.height = content.height + 'px';
}
let backgroundColor = this.sourceBlock_.getColour();
if (value == this.getValue()) {
// This icon is selected, show it in a different colour
backgroundColor = this.sourceBlock_.getColourTertiary();
button.setAttribute('aria-selected', 'true');
}
button.style.backgroundColor = backgroundColor;
button.style.borderColor = this.sourceBlock_.getColourTertiary();
Blockly.bindEvent_(button, 'click', this, (this as any).buttonClick_);
Blockly.bindEvent_(button, 'mouseup', this, (this as any).buttonClick_);
// These are applied manually instead of using the :hover pseudoclass
// because Android has a bad long press "helper" menu and green highlight
// that we must prevent with ontouchstart preventDefault
Blockly.bindEvent_(button, 'mousedown', button, function (e) {
this.setAttribute('class', 'blocklyDropDownButton blocklyDropDownButtonHover');
e.preventDefault();
});
Blockly.bindEvent_(button, 'mouseover', button, function () {
this.setAttribute('class', 'blocklyDropDownButton blocklyDropDownButtonHover');
contentDiv.setAttribute('aria-activedescendant', this.id);
});
Blockly.bindEvent_(button, 'mouseout', button, function () {
this.setAttribute('class', 'blocklyDropDownButton');
contentDiv.removeAttribute('aria-activedescendant');
});
let buttonImg = document.createElement('img');
buttonImg.src = content.src;
//buttonImg.alt = icon.alt;
// Upon click/touch, we will be able to get the clicked element as e.target
// Store a data attribute on all possible click targets so we can match it to the icon.
button.setAttribute('data-value', value);
buttonImg.setAttribute('data-value', value);
button.appendChild(buttonImg);
contentDiv.appendChild(button);
}
contentDiv.style.width = (this as any).width_ + 'px';
dropdownDiv.appendChild(contentDiv);
Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), this.sourceBlock_.getColourTertiary());
// Calculate positioning based on the field position.
var scale = this.sourceBlock_.workspace.scale;
var bBox = { width: this.size_.width, height: this.size_.height };
bBox.width *= scale;
bBox.height *= scale;
var position = this.fieldGroup_.getBoundingClientRect();
var primaryX = position.left + bBox.width / 2;
var primaryY = position.top + bBox.height;
var secondaryX = primaryX;
var secondaryY = position.top;
// Set bounds to workspace; show the drop-down.
(Blockly.DropDownDiv as any).setBoundsElement(this.sourceBlock_.workspace.getParentSvg().parentNode);
(Blockly.DropDownDiv as any).show(this, primaryX, primaryY, secondaryX, secondaryY,
(this as any).onHide_.bind(this));
}
}

151
editor/field_ports.ts Normal file
View File

@ -0,0 +1,151 @@
/// <reference path="../node_modules/pxt-core/localtypings/blockly.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
export interface FieldPortsOptions extends Blockly.FieldCustomDropdownOptions {
columns?: string;
width?: string;
}
export class FieldPorts extends Blockly.FieldDropdown implements Blockly.FieldCustom {
public isFieldCustom_ = true;
// Width in pixels
private width_: number;
// Columns in grid
private columns_: number;
private savedPrimary_: string;
constructor(text: string, options: FieldPortsOptions, validator?: Function) {
super(options.data);
this.columns_ = parseInt(options.columns) || 4;
this.width_ = parseInt(options.width) || 300;
}
trimOptions_() {
}
/**
* Create a dropdown menu under the text.
* @private
*/
public showEditor_() {
// If there is an existing drop-down we own, this is a request to hide the drop-down.
if (Blockly.DropDownDiv.hideIfOwner(this)) {
return;
}
// If there is an existing drop-down someone else owns, hide it immediately and clear it.
Blockly.DropDownDiv.hideWithoutAnimation();
Blockly.DropDownDiv.clearContent();
// Populate the drop-down with the icons for this field.
let dropdownDiv = Blockly.DropDownDiv.getContentDiv();
let contentDiv = document.createElement('div');
// Accessibility properties
contentDiv.setAttribute('role', 'menu');
contentDiv.setAttribute('aria-haspopup', 'true');
let options = this.getOptions();
options = options.sort();
for (let i = 0, option: any; option = options[i]; i++) {
let content = (options[i] as any)[0]; // Human-readable text or image.
const value = (options[i] as any)[1]; // Language-neutral value.
// Icons with the type property placeholder take up space but don't have any functionality
// Use for special-case layouts
if (content.type == 'placeholder') {
let placeholder = document.createElement('span');
placeholder.setAttribute('class', 'blocklyDropDownPlaceholder');
placeholder.style.width = content.width + 'px';
placeholder.style.height = content.height + 'px';
contentDiv.appendChild(placeholder);
continue;
}
let button = document.createElement('button');
button.setAttribute('id', ':' + i); // For aria-activedescendant
button.setAttribute('role', 'menuitem');
button.setAttribute('class', 'blocklyDropDownButton');
button.title = content.alt;
if (this.columns_) {
button.style.width = ((this.width_ / this.columns_) - 8) + 'px';
button.style.height = ((this.width_ / this.columns_) - 8) + 'px';
} else {
button.style.width = content.width + 'px';
button.style.height = content.height + 'px';
}
let backgroundColor = this.sourceBlock_.getColour();
if (value == this.getValue()) {
// This icon is selected, show it in a different colour
backgroundColor = this.sourceBlock_.getColourTertiary();
button.setAttribute('aria-selected', 'true');
}
button.style.backgroundColor = backgroundColor;
button.style.borderColor = this.sourceBlock_.getColourTertiary();
Blockly.bindEvent_(button, 'click', this, this.buttonClick_);
Blockly.bindEvent_(button, 'mouseup', this, this.buttonClick_);
// These are applied manually instead of using the :hover pseudoclass
// because Android has a bad long press "helper" menu and green highlight
// that we must prevent with ontouchstart preventDefault
Blockly.bindEvent_(button, 'mousedown', button, function (e) {
this.setAttribute('class', 'blocklyDropDownButton blocklyDropDownButtonHover');
e.preventDefault();
});
Blockly.bindEvent_(button, 'mouseover', button, function () {
this.setAttribute('class', 'blocklyDropDownButton blocklyDropDownButtonHover');
contentDiv.setAttribute('aria-activedescendant', this.id);
});
Blockly.bindEvent_(button, 'mouseout', button, function () {
this.setAttribute('class', 'blocklyDropDownButton');
contentDiv.removeAttribute('aria-activedescendant');
});
let buttonImg = document.createElement('img');
buttonImg.src = content.src;
//buttonImg.alt = icon.alt;
// Upon click/touch, we will be able to get the clicked element as e.target
// Store a data attribute on all possible click targets so we can match it to the icon.
button.setAttribute('data-value', value);
buttonImg.setAttribute('data-value', value);
button.appendChild(buttonImg);
contentDiv.appendChild(button);
}
contentDiv.style.width = this.width_ + 'px';
dropdownDiv.appendChild(contentDiv);
Blockly.DropDownDiv.setColour(this.sourceBlock_.getColour(), this.sourceBlock_.getColourTertiary());
// Calculate positioning based on the field position.
var scale = this.sourceBlock_.workspace.scale;
var bBox = { width: this.size_.width, height: this.size_.height };
bBox.width *= scale;
bBox.height *= scale;
var position = this.fieldGroup_.getBoundingClientRect();
var primaryX = position.left + bBox.width / 2;
var primaryY = position.top + bBox.height;
var secondaryX = primaryX;
var secondaryY = position.top;
// Set bounds to workspace; show the drop-down.
(Blockly.DropDownDiv as any).setBoundsElement(this.sourceBlock_.workspace.getParentSvg().parentNode);
(Blockly.DropDownDiv as any).show(this, primaryX, primaryY, secondaryX, secondaryY,
this.onHide_.bind(this));
}
/**
* Callback for when a button is clicked inside the drop-down.
* Should be bound to the FieldIconMenu.
* @param {Event} e DOM event for the click/touch
* @private
*/
private buttonClick_ = function (e: any) {
let value = e.target.getAttribute('data-value');
this.setValue(value);
Blockly.DropDownDiv.hide();
};
/**
* Callback for when the drop-down is hidden.
*/
private onHide_ = function () {
Blockly.DropDownDiv.content_.removeAttribute('role');
Blockly.DropDownDiv.content_.removeAttribute('aria-haspopup');
Blockly.DropDownDiv.content_.removeAttribute('aria-activedescendant');
};
}

96
editor/field_speed.ts Normal file
View File

@ -0,0 +1,96 @@
/// <reference path="../node_modules/pxt-core/localtypings/blockly.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
export interface FieldSpeedOptions extends Blockly.FieldCustomOptions {
min?: string;
max?: string;
label?: string;
}
export class FieldSpeed extends Blockly.FieldSlider implements Blockly.FieldCustom {
public isFieldCustom_ = true;
private params: any;
private speedSVG: SVGElement;
private circleBar: SVGCircleElement;
private reporter: SVGTextElement;
/**
* Class for a color wheel field.
* @param {number|string} value The initial content of the field.
* @param {Function=} opt_validator An optional function that is called
* to validate any constraints on what the user entered. Takes the new
* text as an argument and returns either the accepted text, a replacement
* text, or null to abort the change.
* @extends {Blockly.FieldNumber}
* @constructor
*/
constructor(value_: any, params: FieldSpeedOptions, opt_validator?: Function) {
super(String(value_), '-100', '100', null, '10', 'Speed', opt_validator);
this.params = params;
if (this.params['min']) this.min_ = parseFloat(this.params.min);
if (this.params['max']) this.max_ = parseFloat(this.params.max);
if (this.params['label']) this.labelText_ = this.params.label;
(this as any).sliderColor_ = '#a8aaa8';
}
createLabelDom_(labelText: string) {
var labelContainer = document.createElement('div');
this.speedSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg") as SVGGElement;
pxsim.svg.hydrate(this.speedSVG, {
viewBox: "0 0 200 100"
});
labelContainer.appendChild(this.speedSVG);
const outerCircle = pxsim.svg.child(this.speedSVG, "circle", {
'stroke-dasharray': '565.48', 'stroke-dashoffset': '0',
'cx': 100, 'cy': 100, 'r': '90', 'style': `fill:transparent; transition: stroke-dashoffset 0.1s linear;`,
'stroke': '#a8aaa8', 'stroke-width': '1rem'
}) as SVGCircleElement;
this.circleBar = pxsim.svg.child(this.speedSVG, "circle", {
'stroke-dasharray': '565.48', 'stroke-dashoffset': '0',
'cx': 100, 'cy': 100, 'r': '90', 'style': `fill:transparent; transition: stroke-dashoffset 0.1s linear;`,
'stroke': '#f12a21', 'stroke-width': '1rem'
}) as SVGCircleElement;
this.reporter = pxsim.svg.child(this.speedSVG, "text", {
'x': 100, 'y': 80,
'text-anchor': 'middle', 'alignment-baseline': 'middle',
'style': 'font-size: 50px',
'class': 'sim-text inverted number'
}) as SVGTextElement;
// labelContainer.setAttribute('class', 'blocklyFieldSliderLabel');
var readout = document.createElement('span');
readout.setAttribute('class', 'blocklyFieldSliderReadout');
// var label = document.createElement('span');
// label.setAttribute('class', 'blocklyFieldSliderLabelText');
// label.innerHTML = labelText;
// labelContainer.appendChild(label);
// labelContainer.appendChild(readout);
return [labelContainer, readout];
};
setReadout_(readout: Element, value: string) {
this.updateSpeed(parseFloat(value));
// Update reporter
this.reporter.textContent = `${value}%`;
}
private updateSpeed(speed: number) {
let sign = this.sign(speed);
speed = (Math.abs(speed) / 100 * 50) + 50;
if (sign == -1) speed = 50 - speed;
let c = Math.PI * (90 * 2);
let pct = ((100 - speed) / 100) * c;
this.circleBar.setAttribute('stroke-dashoffset', `${pct}`);
}
// A re-implementation of Math.sign (since IE11 doesn't support it)
private sign(num: number) {
return num ? num < 0 ? -1 : 1 : 0;
}
}

108
editor/field_turnratio.ts Normal file
View File

@ -0,0 +1,108 @@
/// <reference path="../node_modules/pxt-core/localtypings/blockly.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
export interface FieldTurnRatioOptions extends Blockly.FieldCustomOptions {
}
export class FieldTurnRatio extends Blockly.FieldSlider implements Blockly.FieldCustom {
public isFieldCustom_ = true;
private params: any;
private path_: SVGPathElement;
private reporter_: SVGTextElement;
/**
* Class for a color wheel field.
* @param {number|string} value The initial content of the field.
* @param {Function=} opt_validator An optional function that is called
* to validate any constraints on what the user entered. Takes the new
* text as an argument and returns either the accepted text, a replacement
* text, or null to abort the change.
* @extends {Blockly.FieldNumber}
* @constructor
*/
constructor(value_: any, params: FieldTurnRatioOptions, opt_validator?: Function) {
super(String(value_), '-100', '100', null, '10', 'TurnRatio', opt_validator);
this.params = params;
(this as any).sliderColor_ = '#a8aaa8';
}
static HALF = 80;
static HANDLE_RADIUS = 30;
static RADIUS = FieldTurnRatio.HALF - FieldTurnRatio.HANDLE_RADIUS - 1;
createLabelDom_(labelText: string) {
let labelContainer = document.createElement('div');
let svg = Blockly.utils.createSvgElement('svg', {
'xmlns': 'http://www.w3.org/2000/svg',
'xmlns:html': 'http://www.w3.org/1999/xhtml',
'xmlns:xlink': 'http://www.w3.org/1999/xlink',
'version': '1.1',
'height': (FieldTurnRatio.HALF + FieldTurnRatio.HANDLE_RADIUS + 10) + 'px',
'width': (FieldTurnRatio.HALF * 2) + 'px'
}, labelContainer);
let defs = Blockly.utils.createSvgElement('defs', {}, svg);
let marker = Blockly.utils.createSvgElement('marker', {
'id': 'head',
'orient': "auto",
'markerWidth': '2',
'markerHeight': '4',
'refX': '0.1', 'refY': '1.5'
}, defs);
let markerPath = Blockly.utils.createSvgElement('path', {
'd': 'M0,0 V3 L1.5,1.5 Z',
'fill': '#f12a21'
}, marker);
this.reporter_ = pxsim.svg.child(svg, "text", {
'x': FieldTurnRatio.HALF, 'y': 96,
'text-anchor': 'middle', 'alignment-baseline': 'middle',
'style': 'font-size: 50px',
'class': 'sim-text inverted number'
}) as SVGTextElement;
this.path_ = Blockly.utils.createSvgElement('path', {
'x1': FieldTurnRatio.HALF,
'y1': FieldTurnRatio.HALF,
'marker-end': 'url(#head)',
'style': 'fill: none; stroke: #f12a21; stroke-width: 10'
}, svg);
this.updateGraph_();
let readout = document.createElement('span');
readout.setAttribute('class', 'blocklyFieldSliderReadout');
return [labelContainer, readout];
};
updateGraph_() {
if (!this.path_) {
return;
}
let v = goog.math.clamp(parseFloat(this.getText()), -100, 100);
if (isNaN(v)) {
v = 0;
}
const x = goog.math.clamp(parseFloat(this.getText()), -100, 100) / 100;
const theta = x * Math.PI / 2;
const cx = FieldTurnRatio.HALF;
const cy = FieldTurnRatio.HALF - 14;
const gamma = Math.PI - 2 * theta;
const r = FieldTurnRatio.RADIUS;
const alpha = 0.2 + Math.abs(x) * 0.5;
const x1 = 0;
const y1 = r * alpha;
const y2 = r * Math.sin(Math.PI / 2 - theta);
const x2 = r * Math.cos(Math.PI / 2 - theta);
const y3 = y2 - r * alpha * Math.cos(2 * theta);
const x3 = x2 - r * alpha * Math.sin(2 * theta);
const d = `M ${cx} ${cy} C ${cx} ${cy - y1} ${cx + x3} ${cy - y3} ${cx + x2} ${cy - y2}`;
this.path_.setAttribute('d', d);
this.reporter_.textContent = `${v}`;
}
setReadout_(readout: Element, value: string) {
this.updateGraph_();
}
}

View File

@ -1,12 +1,14 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"noImplicitAny": true, "noImplicitAny": false,
"noImplicitReturns": true, "noImplicitReturns": true,
"declaration": true, "module": "commonjs",
"out": "../built/editor.js", "outDir": "../built/editor",
"rootDir": ".", "rootDir": ".",
"newLine": "LF", "newLine": "LF",
"sourceMap": false "sourceMap": false,
"allowSyntheticDefaultImports": true,
"declaration": true
} }
} }

View File

@ -252,6 +252,13 @@ namespace pxt.editor {
return loop() return loop()
} }
downloadFileAsync(path: string, cb: (d: Uint8Array) => void) {
return this.lock.enqueue("file", () =>
this.streamFileOnceAsync(path, cb))
}
private initAsync() { private initAsync() {
return Promise.resolve() return Promise.resolve()
} }

Binary file not shown.

View File

@ -0,0 +1,193 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1344 8191 55 41">
<defs>
<style>
.cls-1 {
fill: #fff;
}
.cls-2 {
fill: #a8a9a8;
}
.cls-3 {
clip-path: url(#clip-path);
}
.cls-4 {
clip-path: url(#clip-path-2);
}
.cls-5 {
fill: #919191;
}
.cls-6 {
clip-path: url(#clip-path-3);
}
.cls-7 {
fill: #f2f2f2;
}
.cls-8 {
clip-path: url(#clip-path-4);
}
.cls-9 {
fill: #6a6a6a;
}
.cls-10 {
fill: #9a9a9a;
}
.cls-11 {
fill: #d02e26;
}
.cls-12 {
fill: #242424;
}
.cls-13 {
filter: url(#rød);
}
.cls-14 {
filter: url(#Path_4);
}
.cls-15 {
filter: url(#Path_1-2);
}
.cls-16 {
filter: url(#Path_2);
}
.cls-17 {
filter: url(#Path_1);
}
.cls-18 {
filter: url(#Path_34);
}
</style>
<clipPath id="clip-path">
<rect id="Rectangle_119" data-name="Rectangle 119" class="cls-1" width="55" height="41" transform="translate(-10.923 65.26)"/>
</clipPath>
<clipPath id="clip-path-2">
<path id="Union_6" data-name="Union 6" class="cls-2" d="M0,88.889A11.109,11.109,0,0,1,9.191,77.947L8.954,77.7,8.947,54.41c0-.273.093-.261.255-.438l7.1-6.846V40.6l-.488-.5v-.516H11.39a2.6,2.6,0,0,1-2.6-2.6V20.163a2.6,2.6,0,0,1,2.6-2.6h4.421V12.236a3.765,3.765,0,0,1,3.766-3.765h4.241c0-.059-.005-.117-.005-.176V3.941a3,3,0,0,1,1.882-2.785V.4a.4.4,0,0,1,.4-.4H43.183a.394.394,0,0,1,.394.4v1a3,3,0,0,1,1.412,2.546V8.294c0,.059,0,.118-.005.176h2.359a3.765,3.765,0,0,1,3.765,3.765V31.528c-6.749,9.152-11.8,15.533-11.8,15.533h-.387s-4.616-.035-8.906-.062l.022,7.681h4.479a2.6,2.6,0,0,1,2.6,2.6V74.093a2.6,2.6,0,0,1-2.6,2.6H30.1l.022,7.664c0,.545-.1.545-.3.74l-6.78,6.569-.139.124a.989.989,0,0,1-1.036-.154A11.108,11.108,0,0,1,0,88.889Z"/>
</clipPath>
<filter id="Path_34" x="1375.234" y="8125.181" width="24.177" height="13.354" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="0.5" result="blur"/>
<feFlood flood-opacity="0.502"/>
<feComposite operator="in" in2="blur"/>
<feComposite in="SourceGraphic"/>
</filter>
<filter id="Path_1" x="1360.37" y="8169.796" width="24.177" height="49.327" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="0.5" result="blur-2"/>
<feFlood flood-opacity="0.502"/>
<feComposite operator="in" in2="blur-2"/>
<feComposite in="SourceGraphic"/>
</filter>
<filter id="Path_2" x="1367.722" y="8164.375" width="16.687" height="17.582" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="0.5" result="blur-3"/>
<feFlood flood-opacity="0.502"/>
<feComposite operator="in" in2="blur-3"/>
<feComposite in="SourceGraphic"/>
</filter>
<filter id="Path_1-2" x="1367.234" y="8132.71" width="38.296" height="41.59" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="0.5" result="blur-4"/>
<feFlood flood-opacity="0.502"/>
<feComposite operator="in" in2="blur-4"/>
<feComposite in="SourceGraphic"/>
</filter>
<clipPath id="clip-path-3">
<path id="Path_9" data-name="Path 9" class="cls-2" d="M3.765,0H31.531A3.765,3.765,0,0,1,35.3,3.765V23.057C28.547,32.209,23.5,38.59,23.5,38.59h-.387s-12.667-.1-15.533-.1a1.484,1.484,0,0,1-1.548-.641L0,31.62V3.765A3.765,3.765,0,0,1,3.765,0Z"/>
</clipPath>
<filter id="Path_4" x="1370.999" y="8136.004" width="30.766" height="34.531" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="0.5" result="blur-5"/>
<feFlood flood-opacity="0.502"/>
<feComposite operator="in" in2="blur-5"/>
<feComposite in="SourceGraphic"/>
</filter>
<clipPath id="clip-path-4">
<path id="Path_10" data-name="Path 10" class="cls-2" d="M3.765,0H24a3.765,3.765,0,0,1,3.765,3.765v14.48c-5.628,7.331-10.127,13.286-10.127,13.286H3.765A3.765,3.765,0,0,1,0,27.766v-24A3.765,3.765,0,0,1,3.765,0Z"/>
</clipPath>
<filter id="rød" x="1351.423" y="8202.021" width="25.213" height="25.214" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="0.5" result="blur-6"/>
<feFlood flood-opacity="0.502"/>
<feComposite operator="in" in2="blur-6"/>
<feComposite in="SourceGraphic"/>
</filter>
</defs>
<g id="icn_block_Large_motor" transform="translate(666.315 8209.204)">
<g id="Symbol_13_1" data-name="Symbol 13 1" transform="translate(688.608 -83.464)">
<g id="Mask_Group_12" data-name="Mask Group 12" class="cls-3">
<g id="Mask_Group_6" data-name="Mask Group 6" class="cls-4" transform="translate(-2)">
<g id="Large_motor" data-name="Large motor" transform="translate(-1.056 0)">
<g id="Group_23" data-name="Group 23">
<path id="Subtraction_1" data-name="Subtraction 1" class="cls-5" d="M-2806.659-5548.724h-3.653a3.558,3.558,0,0,1-3.554-3.554v-14.908a3.558,3.558,0,0,1,3.554-3.555h3.653a3.558,3.558,0,0,1,3.554,3.555v14.908A3.558,3.558,0,0,1-2806.659-5548.724Zm.1-5.923a2.47,2.47,0,0,0-2.468,2.467,2.471,2.471,0,0,0,2.468,2.469,2.471,2.471,0,0,0,2.468-2.469A2.47,2.47,0,0,0-2806.56-5554.647Zm.062-.99h.01a2.859,2.859,0,0,1,1.425.37c.112.054.238.116.378.176a.67.67,0,0,0,.267.063c.364,0,.427-.425.428-.429v-1.145s-.111-.449-.454-.449a.556.556,0,0,0-.241.063l-.211.1a2.988,2.988,0,0,1-1.591.4h-.023a4.281,4.281,0,0,1-1.831-.5.642.642,0,0,0-.262-.059c-.167,0-.392.077-.517.444,0,0-.011.628,0,1.145.007.32.3.388.537.388a1.414,1.414,0,0,0,.239-.021A4.678,4.678,0,0,1-2806.5-5555.637Zm-1.218-3.3h.006c.048,0,.469.012.469.422v.844s.136.2.639.2c.039,0,.079,0,.123,0a2.375,2.375,0,0,0,.914-.2v-.844a.437.437,0,0,1,.429-.422c.145,0,.287,0,.394,0,.22,0,.391,0,.42,0,.005,0,.168-.134.19-.861.021-.7-.165-.883-.186-.9h-.818c-.022,0-.524-.049-.532-.5-.006-.386,0-1.306,0-1.684v-.022a.326.326,0,0,1,.048-.21.1.1,0,0,1,.076-.033.219.219,0,0,1,.093.025l.79.379a.668.668,0,0,0,.256.062.255.255,0,0,0,.189-.07.4.4,0,0,0,.084-.292c-.008-.485,0-1.013,0-1.163v-.008a.214.214,0,0,0-.215-.179.654.654,0,0,0-.315.111,2.7,2.7,0,0,1-1.524.458c-.075.006-.151.009-.224.009a3.3,3.3,0,0,1-1.72-.468,1.044,1.044,0,0,0-.545-.253.225.225,0,0,0-.167.065.4.4,0,0,0-.087.255v1.171a.423.423,0,0,0,.451.4.709.709,0,0,0,.349-.1c.357-.2.564-.326.633-.366l.022-.013a.216.216,0,0,1,.088-.021c.067,0,.147.042.147.238v1.706a.578.578,0,0,1-.138.378.427.427,0,0,1-.319.121h-.018c-.136,0-.288,0-.449,0-.219,0-.384,0-.445,0,0,0-.2.165-.2.9,0,.717.184.855.192.861Zm1.156-10.815a2.471,2.471,0,0,0-2.468,2.469,2.47,2.47,0,0,0,2.468,2.467,2.47,2.47,0,0,0,2.468-2.467A2.471,2.471,0,0,0-2806.56-5569.753Z" transform="translate(2841.282 5625.42)"/>
</g>
<path id="Path_36" data-name="Path 36" class="cls-2" d="M.395,0H17.488a.4.4,0,0,1,.395.395V3.841a.4.4,0,0,1-.395.395H.395A.4.4,0,0,1,0,3.841V.395A.4.4,0,0,1,.395,0Z" transform="translate(26.751 0)"/>
<g class="cls-18" transform="matrix(1, 0, 0, 1, -1351.87, -8125.74)">
<path id="Path_34-2" data-name="Path 34" class="cls-2" d="M.395,0H20.782a.4.4,0,0,1,.395.395V9.958a.4.4,0,0,1-.395.395H.395A.4.4,0,0,1,0,9.958V.395A.4.4,0,0,1,.395,0Z" transform="translate(1376.73 8126.68)"/>
</g>
<g class="cls-17" transform="matrix(1, 0, 0, 1, -1351.87, -8125.74)">
<path id="Path_1-3" data-name="Path 1" class="cls-5" d="M-.121,4,8.6-4.416,20.69-3.98,20.8,34.388c0,.545-.1.545-.3.74l-6.78,6.57-.138.124c-.38.26-1.293-.075-1.293-.62L-.368,27.722-.375,4.438C-.375,4.165-.283,4.176-.121,4Z" transform="translate(1362.25 8175.71)"/>
</g>
<g class="cls-16" transform="matrix(1, 0, 0, 1, -1351.87, -8125.74)">
<path id="Path_2-2" data-name="Path 2" class="cls-2" d="M1484.037,521.285v11.229s.012.55.2.729,2.289,2.36,2.289,2.36a1.019,1.019,0,0,0,.753.262c.493-.016,7.567,0,7.567,0l2.883-3.057v-5.183l-6.94-.369Z" transform="translate(-114.81 7644.59)"/>
</g>
<g id="Group_4" data-name="Group 4" transform="translate(9.843 17.559)">
<path id="Path_44" data-name="Path 44" class="cls-2" d="M3.554,0H7.207a3.554,3.554,0,0,1,3.554,3.554V18.462a3.554,3.554,0,0,1-3.554,3.554H3.554A3.554,3.554,0,0,1,0,18.462V3.554A3.554,3.554,0,0,1,3.554,0Z" transform="translate(0 0)"/>
<ellipse id="Ellipse_3" data-name="Ellipse 3" class="cls-1" cx="2.468" cy="2.468" rx="2.468" ry="2.468" transform="translate(0.691 0.987)"/>
<ellipse id="Ellipse_4" data-name="Ellipse 4" class="cls-1" cx="2.468" cy="2.468" rx="2.468" ry="2.468" transform="translate(0.691 16.092)"/>
<path id="Path_5" data-name="Path 5" class="cls-1" d="M5607.868,939.1a2.7,2.7,0,0,1-1.524.459,3.338,3.338,0,0,1-1.945-.459c-.818-.606-.8.067-.8.067v1.172c0,.293.36.55.8.3s.654-.378.654-.378.235-.12.235.218v1.705s.013.512-.475.5-.9,0-.9,0-.191.161-.191.9.191.86.191.86h.9s.475-.016.475.422v.844s.147.234.761.2a2.341,2.341,0,0,0,.914-.2v-.844a.436.436,0,0,1,.43-.422c.41-.006.818,0,.818,0s.164-.124.187-.86-.187-.9-.187-.9h-.818s-.524-.034-.533-.5,0-1.705,0-1.705-.03-.335.216-.218l.791.378s.541.265.53-.3,0-1.172,0-1.172S5608.345,938.813,5607.868,939.1Z" transform="translate(-5602.81 -932.641)"/>
<path id="Path_6" data-name="Path 6" class="cls-1" d="M5601.894,1015.1a.54.54,0,0,1,.778-.386,4.241,4.241,0,0,0,1.854.5,3.287,3.287,0,0,0,1.8-.5c.54-.263.695.386.695.386v1.145a.462.462,0,0,1-.695.365,3.768,3.768,0,0,0-1.8-.545,4.6,4.6,0,0,0-1.854.545s-.767.155-.778-.365S5601.894,1015.1,5601.894,1015.1Z" transform="translate(-5601.296 -1000.958)"/>
</g>
<g class="cls-15" transform="matrix(1, 0, 0, 1, -1351.87, -8125.74)">
<path id="Path_1-4" data-name="Path 1" class="cls-2" d="M3.765,0H31.531A3.765,3.765,0,0,1,35.3,3.765V23.057C28.547,32.209,23.5,38.59,23.5,38.59h-.387s-12.667-.1-15.533-.1a1.484,1.484,0,0,1-1.548-.641L0,31.62V3.765A3.765,3.765,0,0,1,3.765,0Z" transform="translate(1368.73 8134.21)"/>
</g>
<g id="hvid" transform="translate(16.868 8.471)">
<g id="Mask_Group_1" data-name="Mask Group 1" class="cls-6">
<path id="hvid-2" data-name="hvid" class="cls-7" d="M1498.578,448.445l4.657,4.8,15.484,20.229v9.67l8.5-10.5V452.321l-.646-5.006Z" transform="translate(-1491.247 -448.708)"/>
</g>
</g>
<g class="cls-14" transform="matrix(1, 0, 0, 1, -1351.87, -8125.74)">
<path id="Path_4-2" data-name="Path 4" class="cls-2" d="M3.765,0H24a3.765,3.765,0,0,1,3.765,3.765v14.48c-5.628,7.331-10.127,13.286-10.127,13.286H3.765A3.765,3.765,0,0,1,0,27.766v-24A3.765,3.765,0,0,1,3.765,0Z" transform="translate(1372.5 8137.51)"/>
</g>
<g id="Group_3" data-name="Group 3" transform="translate(20.633 11.963)">
<g id="Mask_Group_2" data-name="Mask Group 2" class="cls-8" transform="translate(0 0)">
<path id="Union_1" data-name="Union 1" class="cls-9" d="M9.412,18.589V.706a.706.706,0,1,1,1.412,0V18.589a.706.706,0,1,1-1.412,0Zm-2.353,0V.706a.706.706,0,1,1,1.412,0V18.589a.706.706,0,1,1-1.412,0Zm-2.353,0V.706a.706.706,0,1,1,1.412,0V18.589a.706.706,0,1,1-1.412,0Zm-2.353,0V.706a.706.706,0,1,1,1.412,0V18.589a.706.706,0,1,1-1.412,0ZM0,18.589V.706a.706.706,0,1,1,1.412,0V18.589a.706.706,0,1,1-1.412,0Z" transform="translate(10.353 -3.492)"/>
</g>
</g>
<ellipse id="Ellipse_1" data-name="Ellipse 1" class="cls-10" cx="1.461" cy="1.461" rx="1.461" ry="1.461" transform="translate(18.925 10.528)"/>
<ellipse id="Ellipse_2" data-name="Ellipse 2" class="cls-10" cx="1.461" cy="1.461" rx="1.461" ry="1.461" transform="translate(37.584 43.404)"/>
<g class="cls-13" transform="matrix(1, 0, 0, 1, -1351.87, -8125.74)">
<ellipse id="rød-2" data-name="rød" class="cls-11" cx="11.107" cy="11.107" rx="11.107" ry="11.107" transform="translate(1352.92 8203.52)"/>
</g>
<g id="Group_2" data-name="Group 2" transform="matrix(0.966, 0.259, -0.259, 0.966, 5.162, 76.726)">
<ellipse id="Ellipse_4-2" data-name="Ellipse 4" cx="2.468" cy="2.468" rx="2.468" ry="2.468" transform="translate(7.503 0)"/>
<ellipse id="Ellipse_7" data-name="Ellipse 7" cx="2.468" cy="2.468" rx="2.468" ry="2.468" transform="translate(15.006 7.503)"/>
<ellipse id="Ellipse_5" data-name="Ellipse 5" cx="2.468" cy="2.468" rx="2.468" ry="2.468" transform="translate(7.503 15.006)"/>
<ellipse id="Ellipse_6" data-name="Ellipse 6" cx="2.468" cy="2.468" rx="2.468" ry="2.468" transform="translate(0 7.503)"/>
<path id="Path_4-3" data-name="Path 4" class="cls-12" d="M1.564,1.019s.014.512-.475.5-.9,0-.9,0S0,1.68,0,2.421s.191.86.191.86h.9s.475-.016.475.422,0,.844,0,.844.147.234.761.2a2.339,2.339,0,0,0,.914-.2V3.7a.436.436,0,0,1,.43-.422c.41-.006.818,0,.818,0s.164-.124.187-.86-.187-.9-.187-.9H3.669s-.524-.034-.532-.5A8.122,8.122,0,0,1,3.179.2,1.884,1.884,0,0,0,1.646.138C1.595.533,1.564,1.019,1.564,1.019Z" transform="translate(7.602 12.277) rotate(-90)"/>
<path id="Path_5-2" data-name="Path 5" d="M.3.1,1.312,0,2.369.1a.3.3,0,0,1,.3.3V1.779a.3.3,0,0,1-.3.3L1.36,1.939.3,2.075a.3.3,0,0,1-.3-.3V.4A.3.3,0,0,1,.3.1Z" transform="translate(8.618 5.261)"/>
<path id="Path_7" data-name="Path 7" d="M.3.1,1.312,0,2.369.1a.3.3,0,0,1,.3.3V1.779a.3.3,0,0,1-.3.3L1.36,1.939.3,2.075a.3.3,0,0,1-.3-.3V.4A.3.3,0,0,1,.3.1Z" transform="translate(5.26 11.285) rotate(-90)"/>
<path id="Path_6-2" data-name="Path 6" d="M.3.1,1.312,0,2.369.1a.3.3,0,0,1,.3.3V1.779a.3.3,0,0,1-.3.3L1.36,1.939.3,2.075a.3.3,0,0,1-.3-.3V.4A.3.3,0,0,1,.3.1Z" transform="translate(11.284 14.642) rotate(180)"/>
<path id="Path_8" data-name="Path 8" d="M.3.1,1.312,0,2.369.1a.3.3,0,0,1,.3.3V1.779a.3.3,0,0,1-.3.3L1.36,1.939.3,2.075a.3.3,0,0,1-.3-.3V.4A.3.3,0,0,1,.3.1Z" transform="translate(14.641 8.619) rotate(90)"/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,35 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1321.124 9006.084 42.65 31.79">
<defs>
<style>
.cls-1 {
fill: #6a6a6a;
}
.cls-2 {
fill: url(#linear-gradient);
}
.cls-3 {
fill: #a8a9a8;
}
.cls-4 {
fill: #3c3c3c;
}
</style>
<linearGradient id="linear-gradient" x1="0.5" y1="0.948" x2="0.5" y2="0.059" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.522" stop-color="#8ce300"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
</defs>
<g id="icn_block_buttons_green" transform="translate(666.315 8209.204)">
<path id="Union_4" data-name="Union 4" class="cls-1" d="M16.882,31.79c-3.635-3.509-9.28-9.28-9.28-9.28V21.325H5.38a5.381,5.381,0,0,1,0-10.761H7.6V9.379L16.783,0h9.182c4.158,4.237,9.182,9.182,9.182,9.182v1.382h2.122a5.381,5.381,0,1,1,0,10.761H35.147V22.51c-4.891,5.031-9.083,9.28-9.083,9.28Z" transform="translate(654.809 796.881)"/>
<path id="light" class="cls-2" d="M16.882,31.79c-3.635-3.509-9.28-9.28-9.28-9.28V21.325H5.38a5.381,5.381,0,0,1,0-10.761H7.6V9.379L16.783,0h9.182c4.158,4.237,9.182,9.182,9.182,9.182v1.382h2.122a5.381,5.381,0,1,1,0,10.761H35.147V22.51c-4.891,5.031-9.083,9.28-9.083,9.28Z" transform="translate(654.809 796.881)"/>
<path id="Rectangle_23" data-name="Rectangle 23" class="cls-3" d="M4,0h6.763a0,0,0,0,1,0,0V8a0,0,0,0,1,0,0H4A4,4,0,0,1,0,4V4A4,4,0,0,1,4,0Z" transform="translate(656.092 808.729)"/>
<path id="Rectangle_24" data-name="Rectangle 24" class="cls-3" d="M4,0h6.763a0,0,0,0,1,0,0V8a0,0,0,0,1,0,0H4A4,4,0,0,1,0,4V4A4,4,0,0,1,4,0Z" transform="translate(696.077 816.725) rotate(180)"/>
<path id="Path_42" data-name="Path 42" class="cls-4" d="M.3,0H8.1a.3.3,0,0,1,.3.3V7.7a.3.3,0,0,1-.3.3H.3A.3.3,0,0,1,0,7.7V.3A.3.3,0,0,1,.3,0Z" transform="translate(671.889 808.729)"/>
<path id="Path_15" data-name="Path 15" class="cls-3" d="M-102.228-1598.9l8.293-.1,6.22,6.417-2.567,2.567v4.64h-2.369v-2.666a1.99,1.99,0,0,0-1.975-1.974c-1.927-.031-7.207,0-7.207,0a1.606,1.606,0,0,0-1.678,1.678v2.962h-2.369v-4.64l-2.567-2.567Z" transform="translate(774.216 2397.264)"/>
<path id="Path_16" data-name="Path 16" class="cls-3" d="M6.264.062,14.505,0l6.236,6.412L18.135,8.954v4.667H15.79V10.945a2,2,0,0,0-1.969-1.99c-1.927-.031-7.166,0-7.166,0A1.689,1.689,0,0,0,4.93,10.679v2.942H2.543V8.954L0,6.412Z" transform="translate(686.509 827.175) rotate(180)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,35 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1321.124 8957.084 42.65 31.79">
<defs>
<style>
.cls-1 {
fill: #6a6a6a;
}
.cls-2 {
fill: url(#linear-gradient);
}
.cls-3 {
fill: #a8a9a8;
}
.cls-4 {
fill: #3c3c3c;
}
</style>
<linearGradient id="linear-gradient" x1="0.5" y1="0.948" x2="0.5" y2="0.059" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.522" stop-color="#e5352c"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
</defs>
<g id="icn_block_buttons_red" transform="translate(666.315 8209.204)">
<path id="Union_4" data-name="Union 4" class="cls-1" d="M16.882,31.79c-3.635-3.509-9.28-9.28-9.28-9.28V21.325H5.38a5.381,5.381,0,0,1,0-10.761H7.6V9.379L16.783,0h9.182c4.158,4.237,9.182,9.182,9.182,9.182v1.382h2.122a5.381,5.381,0,1,1,0,10.761H35.147V22.51c-4.891,5.031-9.083,9.28-9.083,9.28Z" transform="translate(654.809 747.881)"/>
<path id="light" class="cls-2" d="M16.882,31.79c-3.635-3.509-9.28-9.28-9.28-9.28V21.325H5.38a5.381,5.381,0,0,1,0-10.761H7.6V9.379L16.783,0h9.182c4.158,4.237,9.182,9.182,9.182,9.182v1.382h2.122a5.381,5.381,0,1,1,0,10.761H35.147V22.51c-4.891,5.031-9.083,9.28-9.083,9.28Z" transform="translate(654.809 747.881)"/>
<path id="Rectangle_23" data-name="Rectangle 23" class="cls-3" d="M4,0h6.763a0,0,0,0,1,0,0V8a0,0,0,0,1,0,0H4A4,4,0,0,1,0,4V4A4,4,0,0,1,4,0Z" transform="translate(656.092 759.729)"/>
<path id="Rectangle_24" data-name="Rectangle 24" class="cls-3" d="M4,0h6.763a0,0,0,0,1,0,0V8a0,0,0,0,1,0,0H4A4,4,0,0,1,0,4V4A4,4,0,0,1,4,0Z" transform="translate(696.077 767.725) rotate(180)"/>
<path id="Path_42" data-name="Path 42" class="cls-4" d="M.3,0H8.1a.3.3,0,0,1,.3.3V7.7a.3.3,0,0,1-.3.3H.3A.3.3,0,0,1,0,7.7V.3A.3.3,0,0,1,.3,0Z" transform="translate(671.889 759.729)"/>
<path id="Path_15" data-name="Path 15" class="cls-3" d="M-102.228-1598.9l8.293-.1,6.22,6.417-2.567,2.567v4.64h-2.369v-2.666a1.99,1.99,0,0,0-1.975-1.974c-1.927-.031-7.207,0-7.207,0a1.606,1.606,0,0,0-1.678,1.678v2.962h-2.369v-4.64l-2.567-2.567Z" transform="translate(774.216 2348.264)"/>
<path id="Path_16" data-name="Path 16" class="cls-3" d="M6.264.062,14.505,0l6.236,6.412L18.135,8.954v4.667H15.79V10.945a2,2,0,0,0-1.969-1.99c-1.927-.031-7.166,0-7.166,0A1.689,1.689,0,0,0,4.93,10.679v2.942H2.543V8.954L0,6.412Z" transform="translate(686.509 778.175) rotate(180)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,35 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1393.124 8957.084 42.65 31.79">
<defs>
<style>
.cls-1 {
fill: #6a6a6a;
}
.cls-2 {
fill: url(#linear-gradient);
}
.cls-3 {
fill: #a8a9a8;
}
.cls-4 {
fill: #3c3c3c;
}
</style>
<linearGradient id="linear-gradient" x1="0.5" y1="0.948" x2="0.5" y2="0.059" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.522" stop-color="#ffeb00"/>
<stop offset="1" stop-color="#838383"/>
</linearGradient>
</defs>
<g id="icn_block_buttons_yellow" transform="translate(666.315 8209.204)">
<path id="Union_4" data-name="Union 4" class="cls-1" d="M16.882,31.79c-3.635-3.509-9.28-9.28-9.28-9.28V21.325H5.38a5.381,5.381,0,0,1,0-10.761H7.6V9.379L16.783,0h9.182c4.158,4.237,9.182,9.182,9.182,9.182v1.382h2.122a5.381,5.381,0,1,1,0,10.761H35.147V22.51c-4.891,5.031-9.083,9.28-9.083,9.28Z" transform="translate(726.809 747.881)"/>
<path id="light" class="cls-2" d="M16.882,31.79c-3.635-3.509-9.28-9.28-9.28-9.28V21.325H5.38a5.381,5.381,0,0,1,0-10.761H7.6V9.379L16.783,0h9.182c4.158,4.237,9.182,9.182,9.182,9.182v1.382h2.122a5.381,5.381,0,1,1,0,10.761H35.147V22.51c-4.891,5.031-9.083,9.28-9.083,9.28Z" transform="translate(726.809 747.881)"/>
<path id="Rectangle_23" data-name="Rectangle 23" class="cls-3" d="M4,0h6.763a0,0,0,0,1,0,0V8a0,0,0,0,1,0,0H4A4,4,0,0,1,0,4V4A4,4,0,0,1,4,0Z" transform="translate(728.092 759.729)"/>
<path id="Rectangle_24" data-name="Rectangle 24" class="cls-3" d="M4,0h6.763a0,0,0,0,1,0,0V8a0,0,0,0,1,0,0H4A4,4,0,0,1,0,4V4A4,4,0,0,1,4,0Z" transform="translate(768.077 767.725) rotate(180)"/>
<path id="Path_42" data-name="Path 42" class="cls-4" d="M.3,0H8.1a.3.3,0,0,1,.3.3V7.7a.3.3,0,0,1-.3.3H.3A.3.3,0,0,1,0,7.7V.3A.3.3,0,0,1,.3,0Z" transform="translate(743.889 759.729)"/>
<path id="Path_15" data-name="Path 15" class="cls-3" d="M-102.228-1598.9l8.293-.1,6.22,6.417-2.567,2.567v4.64h-2.369v-2.666a1.99,1.99,0,0,0-1.975-1.974c-1.927-.031-7.207,0-7.207,0a1.606,1.606,0,0,0-1.678,1.678v2.962h-2.369v-4.64l-2.567-2.567Z" transform="translate(846.216 2348.264)"/>
<path id="Path_16" data-name="Path 16" class="cls-3" d="M6.264.062,14.505,0l6.236,6.412L18.135,8.954v4.667H15.79V10.945a2,2,0,0,0-1.969-1.99c-1.927-.031-7.166,0-7.166,0A1.689,1.689,0,0,0,4.93,10.679v2.942H2.543V8.954L0,6.412Z" transform="translate(758.509 778.175) rotate(180)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,65 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1327.274 8333.921 23.497 21.72">
<defs>
<style>
.cls-1 {
fill: #a8a9a8;
}
.cls-2 {
clip-path: url(#clip-path);
}
.cls-3 {
fill: url(#linear-gradient);
}
.cls-4 {
fill: #b72b1c;
}
.cls-5 {
fill: #f2f2f2;
}
.cls-6 {
filter: url(#Path_1);
}
</style>
<clipPath id="clip-path">
<path id="Union_5" data-name="Union 5" class="cls-1" d="M2.543,21.72c-.7,0-1.26-.4-1.26-.9V17.968H.494A.494.494,0,0,1,0,17.475V4.64a.494.494,0,0,1,.494-.494h.79V.9c0-.5.564-.9,1.26-.9H20.954c.7,0,1.26.4,1.26.9v3.25H23a.494.494,0,0,1,.494.494V17.475a.494.494,0,0,1-.494.494h-.79v2.855c0,.5-.564.9-1.26.9Z"/>
</clipPath>
<linearGradient id="linear-gradient" x1="0.5" y1="0.901" x2="0.5" y2="1.068" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#a8a9a8"/>
<stop offset="1" stop-color="#545554"/>
</linearGradient>
<filter id="Path_1" x="1319.557" y="8327.921" width="38.93" height="39.72" filterUnits="userSpaceOnUse">
<feOffset dy="3" input="SourceAlpha"/>
<feGaussianBlur stdDeviation="3" result="blur"/>
<feFlood flood-opacity="0.502"/>
<feComposite operator="in" in2="blur"/>
<feComposite in="SourceGraphic"/>
</filter>
</defs>
<g id="icn_block_color_sensor" transform="translate(666.315 8209.204)">
<g id="Mask_Group_5" data-name="Mask Group 5" class="cls-2" transform="translate(660.959 124.718)">
<g id="Group_4" data-name="Group 4" transform="translate(0)">
<g id="Group_2" data-name="Group 2">
<path id="Path_28" data-name="Path 28" class="cls-1" d="M.494,0H23A.494.494,0,0,1,23.5.494V13.328a.494.494,0,0,1-.494.494H.494A.494.494,0,0,1,0,13.328V.494A.494.494,0,0,1,.494,0Z" transform="translate(0 4.147)"/>
<g class="cls-6" transform="matrix(1, 0, 0, 1, -1327.27, -8333.92)">
<path id="Path_1-2" data-name="Path 1" class="cls-3" d="M1.26,0H19.67c.7,0,1.26.4,1.26.9V20.823c0,.5-.564.9-1.26.9H1.26c-.7,0-1.26-.4-1.26-.9V.9C0,.4.564,0,1.26,0Z" transform="translate(1328.56 8333.92)"/>
</g>
<rect id="Rectangle_2" data-name="Rectangle 2" width="0.494" height="3.949" transform="translate(22.51 6.121)"/>
<rect id="Rectangle_5" data-name="Rectangle 5" width="0.494" height="3.949" transform="translate(0.592 6.121)"/>
<rect id="Rectangle_3" data-name="Rectangle 3" width="0.494" height="3.949" transform="translate(22.51 11.748)"/>
<rect id="Rectangle_4" data-name="Rectangle 4" width="0.494" height="3.949" transform="translate(0.592 11.748)"/>
</g>
<path id="Union_1" data-name="Union 1" class="cls-4" d="M1.678,11.551a4.557,4.557,0,0,1,.1-.973,6.22,6.22,0,1,1,8.874,0,4.542,4.542,0,1,1-8.979.973Z" transform="translate(5.529 2.666)"/>
<path id="Union_2" data-name="Union 2" d="M1.738,10.614A3.5,3.5,0,0,1,1.98,9.332,5.233,5.233,0,1,1,8.5,9.317a3.507,3.507,0,1,1-6.765,1.3Z" transform="translate(6.516 3.602)"/>
<g id="Group_3" data-name="Group 3" transform="translate(9.379 6.615)">
<ellipse id="Ellipse_5" data-name="Ellipse 5" class="cls-5" cx="2.369" cy="2.369" rx="2.369" ry="2.369"/>
<ellipse id="Ellipse_6" data-name="Ellipse 6" class="cls-5" cx="1.283" cy="1.283" rx="1.283" ry="1.283" transform="translate(1.086 6.22)"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,26 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1299.627 9145.076 41.445 32.779">
<defs>
<style>
.cls-1 {
fill: url(#linear-gradient);
}
.cls-2 {
fill: #3c3c3c;
}
.cls-3 {
fill: #a0b5a6;
}
</style>
<linearGradient id="linear-gradient" x1="0.5" y1="0.924" x2="0.5" y2="0.948" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#a8a9a8"/>
<stop offset="1" stop-color="gray"/>
</linearGradient>
</defs>
<g id="icn_block_display" transform="translate(666.315 8209.204)">
<path id="Path_91" data-name="Path 91" class="cls-1" d="M.816,0H40.629a.816.816,0,0,1,.816.816V31.963a.816.816,0,0,1-.816.816H.816A.816.816,0,0,1,0,31.963V.816A.816.816,0,0,1,.816,0Z" transform="translate(633.313 935.874)"/>
<path id="Path_92" data-name="Path 92" class="cls-2" d="M1.57,0H32.4a1.57,1.57,0,0,1,1.57,1.57V18.9a1.57,1.57,0,0,1-1.57,1.57H1.57A1.57,1.57,0,0,1,0,18.9V1.57A1.57,1.57,0,0,1,1.57,0Z" transform="translate(637.08 940.207)"/>
<path id="Path_93" data-name="Path 93" class="cls-3" d="M1.13,0H27.316a1.13,1.13,0,0,1,1.13,1.13v16.7a1.13,1.13,0,0,1-1.13,1.13H1.13A1.13,1.13,0,0,1,0,17.834V1.13A1.13,1.13,0,0,1,1.13,0Z" transform="translate(639.906 941.023)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,101 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1306.936 8729.215 61.393 44.083">
<defs>
<style>
.cls-1 {
fill: #d5277e;
}
.cls-2 {
fill: #a8a9a8;
}
.cls-3 {
clip-path: url(#clip-path);
}
.cls-4 {
clip-path: url(#clip-path-2);
}
.cls-11, .cls-5 {
fill: #9a9a9a;
}
.cls-6 {
fill: #f2f2f2;
}
.cls-7 {
opacity: 0.6;
fill: url(#linear-gradient);
}
.cls-8 {
fill: url(#linear-gradient-2);
}
.cls-9 {
fill: #b72b1c;
}
.cls-10, .cls-11 {
stroke: none;
}
.cls-12 {
filter: url(#Path_12);
}
</style>
<clipPath id="clip-path">
<path id="Path_88" data-name="Path 88" class="cls-1" d="M1162.538,3051.215l1.79,38.862h-31.593l-5.221,5.221h-11.692l-5.221-5.221h-7.666l1.729-38.862Z" transform="translate(-1124.637 -3056.569)"/>
</clipPath>
<clipPath id="clip-path-2">
<path id="Union_7" data-name="Union 7" class="cls-2" d="M6.318,39.688a6.076,6.076,0,0,1-1.291-.3H2.271A1.283,1.283,0,0,1,.987,38.108V35.147H.494A.494.494,0,0,1,0,34.653V4.542a.494.494,0,0,1,.494-.494H.987V1.284A1.283,1.283,0,0,1,2.271,0h8.237V.395h2.226V0h8.3a1.284,1.284,0,0,1,1.284,1.284V4.048H22.9a.494.494,0,0,1,.494.494V34.653a.494.494,0,0,1-.494.493h-.592v2.962a1.284,1.284,0,0,1-1.284,1.283h-2.7c-.111.2-1.244.3-1.451.3Z"/>
</clipPath>
<filter id="Path_12" x="1328.499" y="8733.444" width="23.575" height="33.349" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="0.375" result="blur"/>
<feFlood flood-opacity="0.502"/>
<feComposite operator="in" in2="blur"/>
<feComposite in="SourceGraphic"/>
</filter>
<linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#fff" stop-opacity="0"/>
<stop offset="1" stop-color="#404040"/>
</linearGradient>
<linearGradient id="linear-gradient-2" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#fff"/>
<stop offset="1" stop-color="gray"/>
</linearGradient>
</defs>
<g id="icn_block_gyro" transform="translate(666.315 8209.204)">
<g id="Mask_Group_11" data-name="Mask Group 11" class="cls-3" transform="translate(662.322 525.366)">
<g id="Group_16" data-name="Group 16">
<g id="Mask_Group_7" data-name="Mask Group 7" class="cls-4" transform="translate(0 0)">
<g id="Group_9" data-name="Group 9" transform="translate(0 0)">
<path id="Path_29" data-name="Path 29" class="cls-2" d="M.494,0H22.9A.494.494,0,0,1,23.4.494V30.605a.494.494,0,0,1-.494.494H.494A.494.494,0,0,1,0,30.605V.494A.494.494,0,0,1,.494,0Z" transform="translate(0 4.048)"/>
<rect id="Rectangle_11" data-name="Rectangle 11" class="cls-5" width="3.752" height="10.268" transform="translate(9.774 0.395)"/>
<g class="cls-12" transform="matrix(1, 0, 0, 1, -1328.64, -8734.57)">
<path id="Path_12-2" data-name="Path 12" class="cls-2" d="M1.283,0H9.52V10.424l2.226-.163V0h8.3a1.283,1.283,0,0,1,1.283,1.283V29.815A1.283,1.283,0,0,1,20.041,31.1H1.283A1.283,1.283,0,0,1,0,29.815V1.283A1.283,1.283,0,0,1,1.283,0Z" transform="translate(1329.62 8734.57)"/>
</g>
<g id="hvid" transform="translate(0.987 19.252)">
<g id="hvid-2" data-name="hvid" transform="translate(0)">
<path id="Path_57" data-name="Path 57" class="cls-6" d="M.79,0H20.535a.79.79,0,0,1,.79.79V18.857a1.283,1.283,0,0,1-1.283,1.283H1.283A1.283,1.283,0,0,1,0,18.857V.79A.79.79,0,0,1,.79,0Z" transform="translate(0)"/>
<path id="Path_59" data-name="Path 59" class="cls-7" d="M0,0H21.325V1.975a1.283,1.283,0,0,1-1.283,1.283H1.283A1.283,1.283,0,0,1,0,1.975Z" transform="translate(0 16.882)"/>
</g>
<g id="Path_1" data-name="Path 1" class="cls-8" transform="translate(15.935 18.955)">
<path class="cls-10" d="M -0.03972615301609039 1.355897426605225 L -10.6034460067749 1.355897426605225 C -10.8238697052002 1.355897426605225 -11.76168155670166 1.143560767173767 -12.02564239501953 0.9932262897491455 L -11.25642585754395 0.3544974625110626 C -11.06739616394043 0.1967574656009674 -10.78548622131348 0.1249974593520164 -10.6034460067749 0.1249974593520164 L -0.03972615301609039 0.1249974593520164 C 0.08689384907484055 0.1249974593520164 0.1953838467597961 0.221777468919754 0.3209938406944275 0.3338374495506287 C 0.3559758961200714 0.3650458753108978 0.3912657201290131 0.3964739441871643 0.4275123476982117 0.4264010488986969 L 1.240363001823425 1.159494996070862 C 0.997438907623291 1.265054941177368 0.2347392439842224 1.355897426605225 -0.03972615301609039 1.355897426605225 Z"/>
<path class="cls-11" d="M -0.03972615301609039 1.230897426605225 C 0.1518102586269379 1.230897426605225 0.6746260523796082 1.174463033676147 0.9910745024681091 1.102993011474609 L 0.3458296954631805 0.5210594534873962 C 0.3090922832489014 0.490643322467804 0.2732802927494049 0.4587787985801697 0.2377838492393494 0.4271174669265747 C 0.1312438398599625 0.3320774734020233 0.03924384713172913 0.249997466802597 -0.03972615301609039 0.249997466802597 L -10.6034460067749 0.249997466802597 C -10.76875591278076 0.249997466802597 -11.01853656768799 0.3187874555587769 -11.1765661239624 0.4506674706935883 L -11.78844928741455 0.9587525725364685 C -11.43126487731934 1.086030006408691 -10.7613353729248 1.230897426605225 -10.6034460067749 1.230897426605225 L -0.03972615301609039 1.230897426605225 M -0.03972615301609039 1.480897426605225 L -10.6034460067749 1.480897426605225 C -10.82154655456543 1.480897426605225 -12.20312595367432 1.196227431297302 -12.20312595367432 0.9781274795532227 L -11.33627605438232 0.258327454328537 C -11.12889575958252 0.08526746183633804 -10.82154655456543 -2.538394937801058e-06 -10.6034460067749 -2.538394937801058e-06 L -0.03972615301609039 -2.538394937801058e-06 C 0.1783738434314728 -2.538394937801058e-06 0.3312638401985168 0.1853174567222595 0.5091438293457031 0.3316974639892578 L 1.42017388343811 1.153337478637695 C 1.42017388343811 1.371437430381775 0.1783738434314728 1.480897426605225 -0.03972615301609039 1.480897426605225 Z"/>
</g>
</g>
<g id="red_things" data-name="red things" transform="translate(2.962 5.529)">
<ellipse id="red_dot" data-name="red dot" class="cls-9" cx="1.975" cy="1.975" rx="1.975" ry="1.975" transform="translate(6.713 3.85)"/>
<path id="red_arrow_1" data-name="red arrow 1" class="cls-9" d="M3121.088-1937.325a6.718,6.718,0,0,1-.494-7.01c.151.093.443.226.592.3.42.239.482-.2.4-.494l-.79-2.468-2.468.691a.939.939,0,0,0-.3.1c-.129.082-.24.258,0,.395l.691.395a8.146,8.146,0,0,0,.691,9.28C3120.449-1936.882,3121.088-1937.325,3121.088-1937.325Z" transform="translate(-3117.592 1947)"/>
<path id="red_arrow_2" data-name="red arrow 2" class="cls-9" d="M3118.12-1937.325a6.718,6.718,0,0,0,.493-7.01c-.151.093-.443.226-.592.3-.42.239-.482-.2-.395-.494l.79-2.468,2.468.691a.943.943,0,0,1,.3.1c.128.082.24.258,0,.395l-.691.395a8.147,8.147,0,0,1-.691,9.28C3118.758-1936.882,3118.12-1937.325,3118.12-1937.325Z" transform="translate(-3104.259 1947)"/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -0,0 +1,65 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1323.372 8463.761 30.979 30.979">
<defs>
<style>
.cls-1 {
fill: url(#linear-gradient);
}
.cls-2 {
fill: #a8a9a8;
}
.cls-3 {
fill: #3c3c3c;
}
.cls-4 {
fill: #b72b1c;
stroke: #8b1104;
stroke-width: 0.25px;
}
.cls-5 {
stroke: none;
}
.cls-6 {
fill: none;
}
.cls-7 {
filter: url(#Union_1);
}
</style>
<linearGradient id="linear-gradient" x1="0.5" y1="0.919" x2="0.5" y2="1.077" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#a8a9a8"/>
<stop offset="1" stop-color="#545554"/>
</linearGradient>
<filter id="Union_1" x="1323.372" y="8463.761" width="30.979" height="30.979" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="0.375" result="blur"/>
<feFlood flood-opacity="0.322"/>
<feComposite operator="in" in2="blur"/>
<feComposite in="SourceGraphic"/>
</filter>
</defs>
<g id="icn_block_medium_motor" transform="translate(666.315 8209.204)">
<g id="Group_4" data-name="Group 4" transform="translate(658.182 255.683)">
<path id="Path_1" data-name="Path 1" class="cls-1" d="M2.383-.287H27.768A1.534,1.534,0,0,1,29.44,1V27.258c0,.654-.714,1.185-1.673,1.185H2.383c-.959,0-1.673-.531-1.673-1.185V1A1.534,1.534,0,0,1,2.383-.287Z" transform="translate(-0.711 0.287)"/>
</g>
<g id="Group_7" data-name="Group 7" transform="translate(686.912 255.683) rotate(90)">
<g class="cls-7" transform="matrix(0, -1, 1, 0, -8464.89, 1353.23)">
<path id="Union_1-2" data-name="Union 1" class="cls-2" d="M13.822,28.729a4.048,4.048,0,0,1-4.048-4.048V18.955H4.048A4.048,4.048,0,0,1,0,14.908V13.822A4.048,4.048,0,0,1,4.048,9.774H9.774V4.048A4.048,4.048,0,0,1,13.822,0h1.086a4.048,4.048,0,0,1,4.048,4.048V9.774h5.726a4.048,4.048,0,0,1,4.048,4.048v1.086a4.048,4.048,0,0,1-4.048,4.048H18.955v5.726a4.048,4.048,0,0,1-4.048,4.048Z" transform="translate(1353.23 8464.89) rotate(90)"/>
</g>
<ellipse id="Ellipse_1" data-name="Ellipse 1" class="cls-3" cx="3.159" cy="3.159" rx="3.159" ry="3.159" transform="translate(11.255 0.987)"/>
<ellipse id="Ellipse_2" data-name="Ellipse 2" class="cls-3" cx="3.159" cy="3.159" rx="3.159" ry="3.159" transform="translate(11.255 21.424)"/>
<ellipse id="Ellipse_1-2" data-name="Ellipse 1" class="cls-3" cx="3.159" cy="3.159" rx="3.159" ry="3.159" transform="translate(0.987 17.475) rotate(-90)"/>
<ellipse id="Ellipse_2-2" data-name="Ellipse 2" class="cls-3" cx="3.159" cy="3.159" rx="3.159" ry="3.159" transform="translate(21.424 17.475) rotate(-90)"/>
</g>
<g id="Ellipse_4" data-name="Ellipse 4" class="cls-4" transform="translate(668.3 265.702)">
<ellipse class="cls-5" cx="4.395" cy="4.395" rx="4.395" ry="4.395"/>
<ellipse class="cls-6" cx="4.395" cy="4.395" rx="4.27" ry="4.27"/>
</g>
<path id="Hole" d="M5605.5,961.821s-.035.664-.5.67-.952,0-.952,0a1.541,1.541,0,0,0-.3,1.1c0,.824.232,1.045.232,1.045h1.06a.42.42,0,0,1,.454.454v1.085a2.528,2.528,0,0,0,1.149.187,4.2,4.2,0,0,0,1.091-.187v-1.085a.475.475,0,0,1,.478-.454,6.978,6.978,0,0,0,.94-.091s.257-.243.282-1.062-.23-1.07-.23-1.07h-1.1a.417.417,0,0,1-.5-.441,7.426,7.426,0,0,1,0-1.07,3.135,3.135,0,0,0-2.113,0C5605.488,961.354,5605.5,961.821,5605.5,961.821Z" transform="translate(-4933.915 -693.478)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,84 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1327.51 8602.067 23.497 21.72">
<defs>
<style>
.cls-1 {
fill: #a8a9a8;
}
.cls-2 {
clip-path: url(#clip-path);
}
.cls-3 {
fill: url(#linear-gradient);
}
.cls-4 {
fill: url(#linear-gradient-2);
}
.cls-5 {
fill: #b72b1c;
stroke: #8b1104;
stroke-width: 0.25px;
}
.cls-6 {
stroke: none;
}
.cls-7 {
fill: none;
}
.cls-8 {
filter: url(#Path_1);
}
</style>
<clipPath id="clip-path">
<path id="Union_3" data-name="Union 3" class="cls-1" d="M2.567,21.72c-.7,0-1.283-.393-1.283-.889V17.968H.651A.651.651,0,0,1,0,17.317V4.8a.651.651,0,0,1,.651-.651h.633V.889C1.283.394,1.871,0,2.567,0H9.576V.889h4.147V0H20.93c.7,0,1.283.394,1.283.889V4.147h.633A.65.65,0,0,1,23.5,4.8v12.52a.651.651,0,0,1-.651.651h-.633v2.863c0,.5-.588.889-1.283.889Z"/>
</clipPath>
<linearGradient id="linear-gradient" x1="0.5" y1="0.91" x2="0.5" y2="1.046" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#a8a9a8"/>
<stop offset="1" stop-color="#545554"/>
</linearGradient>
<filter id="Path_1" x="1325.794" y="8599.067" width="26.93" height="27.72" filterUnits="userSpaceOnUse">
<feOffset input="SourceAlpha"/>
<feGaussianBlur stdDeviation="1" result="blur"/>
<feFlood flood-opacity="0.502"/>
<feComposite operator="in" in2="blur"/>
<feComposite in="SourceGraphic"/>
</filter>
<linearGradient id="linear-gradient-2" x1="0.949" y1="0.5" x2="0.056" y2="0.5" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#b72b1c"/>
<stop offset="1" stop-color="#8b1104"/>
</linearGradient>
</defs>
<g id="icn_block_touch_sensor" transform="translate(666.315 8209.204)">
<g id="Group_8" data-name="Group 8" transform="translate(661.196 392.864)">
<g id="Mask_Group_3" data-name="Mask Group 3" class="cls-2">
<g id="Group_2" data-name="Group 2" transform="translate(0 0)">
<path id="Path_27" data-name="Path 27" class="cls-1" d="M.494,0H23A.494.494,0,0,1,23.5.494V13.328a.494.494,0,0,1-.494.494H.494A.494.494,0,0,1,0,13.328V.494A.494.494,0,0,1,.494,0Z" transform="translate(0 4.147)"/>
<g class="cls-8" transform="matrix(1, 0, 0, 1, -1327.51, -8602.07)">
<path id="Path_1-2" data-name="Path 1" class="cls-3" d="M1.283,0h7.01V.889H12.44V0h7.207c.7,0,1.283.393,1.283.889V20.831c0,.5-.588.889-1.283.889H1.283c-.7,0-1.283-.393-1.283-.889V.889C0,.393.588,0,1.283,0Z" transform="translate(1328.79 8602.07)"/>
</g>
<rect id="Rectangle_2" data-name="Rectangle 2" width="0.494" height="3.949" transform="translate(22.51 6.121)"/>
<rect id="Rectangle_5" data-name="Rectangle 5" width="0.494" height="3.949" transform="translate(0.592 6.121)"/>
<rect id="Rectangle_3" data-name="Rectangle 3" width="0.494" height="3.949" transform="translate(22.51 11.748)"/>
<rect id="Rectangle_4" data-name="Rectangle 4" width="0.494" height="3.949" transform="translate(0.592 11.748)"/>
</g>
</g>
</g>
<g id="Group_5" data-name="Group 5" transform="translate(664.158 395.579)">
<rect id="Rectangle_6" data-name="Rectangle 6" class="cls-4" width="6.22" height="4.048" transform="translate(0 6.861)"/>
<rect id="Rectangle_9" data-name="Rectangle 9" class="cls-4" width="6.22" height="4.048" transform="translate(10.811) rotate(90)"/>
<rect id="Rectangle_7" data-name="Rectangle 7" class="cls-4" width="6.22" height="4.048" transform="translate(17.573 10.909) rotate(180)"/>
<rect id="Rectangle_8" data-name="Rectangle 8" class="cls-4" width="6.22" height="4.048" transform="translate(6.763 17.573) rotate(-90)"/>
<g id="Ellipse_1" data-name="Ellipse 1" class="cls-5" transform="translate(4.838 4.887)">
<ellipse class="cls-6" cx="3.949" cy="3.949" rx="3.949" ry="3.949"/>
<ellipse class="cls-7" cx="3.949" cy="3.949" rx="3.824" ry="3.824"/>
</g>
<path id="Hole" d="M5605.323,961.71s-.032.6-.45.6-.854,0-.854,0a1.382,1.382,0,0,0-.266.989c0,.74.208.939.208.939h.953a.378.378,0,0,1,.409.408v.975a2.269,2.269,0,0,0,1.033.168,3.77,3.77,0,0,0,.98-.168v-.975a.426.426,0,0,1,.43-.408,6.239,6.239,0,0,0,.845-.082s.231-.219.253-.955-.207-.961-.207-.961h-.99a.375.375,0,0,1-.446-.4,6.76,6.76,0,0,1,0-.961,2.814,2.814,0,0,0-1.9,0C5605.313,961.289,5605.323,961.71,5605.323,961.71Z" transform="translate(-5597.534 -954.45)"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1,103 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="1324.724 8870.247 54.201 22.707">
<defs>
<style>
.cls-1 {
fill: #f2f2f2;
}
.cls-2 {
fill: #292929;
}
.cls-3 {
stroke: rgba(242,242,242,0.5);
stroke-width: 0.15px;
}
.cls-4 {
fill: #931f1f;
}
.cls-5 {
fill: #9d761f;
}
.cls-6 {
clip-path: url(#clip-path);
}
.cls-7 {
stroke: none;
}
.cls-8 {
fill: none;
}
</style>
<clipPath id="clip-path">
<ellipse id="guld" class="cls-1" cx="4.541" cy="4.541" rx="4.541" ry="4.541"/>
</clipPath>
</defs>
<g id="icn_block_ultra_sonic" transform="translate(666.315 8209.204)">
<rect id="Rectangle_1" data-name="Rectangle 1" class="cls-2" width="28.236" height="20.338" transform="translate(673.021 661.932)"/>
<rect id="Rectangle_2" data-name="Rectangle 2" width="16.487" height="11.452" transform="translate(677.958 666.474)"/>
<g id="eye1" transform="translate(658.41 661.044)">
<g id="sort" class="cls-3" transform="translate(0 0)">
<ellipse class="cls-7" cx="11.354" cy="11.354" rx="11.354" ry="11.354"/>
<ellipse class="cls-8" cx="11.354" cy="11.354" rx="11.279" ry="11.279"/>
</g>
<ellipse id="rød" class="cls-4" cx="7.01" cy="7.01" rx="7.01" ry="7.01" transform="translate(4.344 4.344)"/>
<ellipse id="guld-3" data-name="guld" class="cls-5" cx="5.232" cy="5.232" rx="5.232" ry="5.232" transform="translate(6.121 6.121)"/>
<ellipse id="guld-4" data-name="guld" class="cls-1" cx="4.541" cy="4.541" rx="4.541" ry="4.541" transform="translate(6.812 6.812)"/>
<g id="Group_5" data-name="Group 5" transform="translate(6.812 6.812)">
<g id="Mask_Group_8" data-name="Mask Group 8" class="cls-6">
<g id="Group_17" data-name="Group 17" transform="translate(-4.652 2.089) rotate(-30)">
<rect id="Rectangle_84" data-name="Rectangle 84" class="cls-5" width="0.395" height="14.834" transform="translate(1.333 0)"/>
<rect id="Rectangle_91" data-name="Rectangle 91" class="cls-5" width="0.395" height="14.649" transform="translate(0 13.081) rotate(-90)"/>
<rect id="Rectangle_85" data-name="Rectangle 85" class="cls-5" width="0.395" height="14.834" transform="translate(3.209 0)"/>
<rect id="Rectangle_97" data-name="Rectangle 97" class="cls-5" width="0.395" height="14.649" transform="translate(0 11.205) rotate(-90)"/>
<rect id="Rectangle_86" data-name="Rectangle 86" class="cls-5" width="0.395" height="14.834" transform="translate(5.084 0)"/>
<rect id="Rectangle_96" data-name="Rectangle 96" class="cls-5" width="0.395" height="14.649" transform="translate(0 9.33) rotate(-90)"/>
<rect id="Rectangle_87" data-name="Rectangle 87" class="cls-5" width="0.395" height="14.834" transform="translate(6.96 0)"/>
<rect id="Rectangle_95" data-name="Rectangle 95" class="cls-5" width="0.395" height="14.649" transform="translate(0 7.454) rotate(-90)"/>
<rect id="Rectangle_88" data-name="Rectangle 88" class="cls-5" width="0.395" height="14.834" transform="translate(8.836 0)"/>
<rect id="Rectangle_94" data-name="Rectangle 94" class="cls-5" width="0.395" height="14.649" transform="translate(0 5.578) rotate(-90)"/>
<rect id="Rectangle_89" data-name="Rectangle 89" class="cls-5" width="0.395" height="14.834" transform="translate(10.712 0)"/>
<rect id="Rectangle_93" data-name="Rectangle 93" class="cls-5" width="0.395" height="14.649" transform="translate(0 3.702) rotate(-90)"/>
<rect id="Rectangle_90" data-name="Rectangle 90" class="cls-5" width="0.395" height="14.834" transform="translate(12.588 0)"/>
<rect id="Rectangle_92" data-name="Rectangle 92" class="cls-5" width="0.395" height="14.649" transform="translate(0 1.826) rotate(-90)"/>
</g>
</g>
</g>
</g>
<g id="eye2" transform="translate(689.903 661.044)">
<g id="sort-2" data-name="sort" class="cls-3" transform="translate(0 0)">
<ellipse class="cls-7" cx="11.354" cy="11.354" rx="11.354" ry="11.354"/>
<ellipse class="cls-8" cx="11.354" cy="11.354" rx="11.279" ry="11.279"/>
</g>
<ellipse id="rød-2" data-name="rød" class="cls-4" cx="7.01" cy="7.01" rx="7.01" ry="7.01" transform="translate(4.344 4.344)"/>
<ellipse id="guld-5" data-name="guld" class="cls-5" cx="5.232" cy="5.232" rx="5.232" ry="5.232" transform="translate(6.121 6.121)"/>
<ellipse id="guld-6" data-name="guld" class="cls-1" cx="4.541" cy="4.541" rx="4.541" ry="4.541" transform="translate(6.812 6.812)"/>
<g id="Group_18" data-name="Group 18" transform="translate(6.812 6.812)">
<g id="Mask_Group_8-2" data-name="Mask Group 8" class="cls-6">
<g id="Group_17-2" data-name="Group 17" transform="translate(-4.652 2.089) rotate(-30)">
<rect id="Rectangle_84-2" data-name="Rectangle 84" class="cls-5" width="0.395" height="14.834" transform="translate(1.333 0)"/>
<rect id="Rectangle_91-2" data-name="Rectangle 91" class="cls-5" width="0.395" height="14.649" transform="translate(0 13.081) rotate(-90)"/>
<rect id="Rectangle_85-2" data-name="Rectangle 85" class="cls-5" width="0.395" height="14.834" transform="translate(3.209 0)"/>
<rect id="Rectangle_97-2" data-name="Rectangle 97" class="cls-5" width="0.395" height="14.649" transform="translate(0 11.205) rotate(-90)"/>
<rect id="Rectangle_86-2" data-name="Rectangle 86" class="cls-5" width="0.395" height="14.834" transform="translate(5.084 0)"/>
<rect id="Rectangle_96-2" data-name="Rectangle 96" class="cls-5" width="0.395" height="14.649" transform="translate(0 9.33) rotate(-90)"/>
<rect id="Rectangle_87-2" data-name="Rectangle 87" class="cls-5" width="0.395" height="14.834" transform="translate(6.96 0)"/>
<rect id="Rectangle_95-2" data-name="Rectangle 95" class="cls-5" width="0.395" height="14.649" transform="translate(0 7.454) rotate(-90)"/>
<rect id="Rectangle_88-2" data-name="Rectangle 88" class="cls-5" width="0.395" height="14.834" transform="translate(8.836 0)"/>
<rect id="Rectangle_94-2" data-name="Rectangle 94" class="cls-5" width="0.395" height="14.649" transform="translate(0 5.578) rotate(-90)"/>
<rect id="Rectangle_89-2" data-name="Rectangle 89" class="cls-5" width="0.395" height="14.834" transform="translate(10.712 0)"/>
<rect id="Rectangle_93-2" data-name="Rectangle 93" class="cls-5" width="0.395" height="14.649" transform="translate(0 3.702) rotate(-90)"/>
<rect id="Rectangle_90-2" data-name="Rectangle 90" class="cls-5" width="0.395" height="14.834" transform="translate(12.588 0)"/>
<rect id="Rectangle_92-2" data-name="Rectangle 92" class="cls-5" width="0.395" height="14.649" transform="translate(0 1.826) rotate(-90)"/>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,73 @@
# Functions for measuring in Swift Playgrounds "EV3 Animal Rescue" (Miranda)
## Sensors
* Ultrasonic (cm, inches)
* Gyro (angle, rate)
* Reset Gyro
* Touch (count, on/off)
* Light (color, reflection, ambience)
* IR (proximity, seek)
## Motor Sensors
* Motor (degrees, rotations, power)
#### Wait for
All sensor methods have a `waitFor` version that waits for the sensor value to be >= or <=. We don't use '=' equality because it is non-sensical for floating point data.
All sensors also have a `waitForIncrease`, `waitForDecrease` version.
------------------------
# Output Functions
* Move tank ( for seconds, for degrees, for rotations, indefinitely )
* Stop Move (stops 2 motors)
* Motor off
* Motor on (for seconds, for degrees, for rotations, indefinitely)
* Reset motor (resets all counters related to the motor)
# Brick Functions
* Brick light on (color + mode: flashing, on, or pulsating)
* Brick light off
* Play sound (wait for completion, play once, play repeating)
- Parameters:
- file: Takes an input conforming to enum `SoundFile`. One of the following:
- `.hello`
- `.goodbye`
- `.fanfare`
- `.errorAlarm`
- `.start`
- `.stop`
- `.object`
- `.ouch`
- `.blip`
- `.arm`
- `.snap`
- `.laser`
* Play sound frequency (for seconds, can either wait for completion or continue while playing)
* Play sound note (in range `C4-D#9`) (for seconds, can either wait for completion or continue while playing)
* Stopsound (stops all sounds playing)
* Wait for seconds
* Display text
* Display text at `(x,y)` with color`(black, white)`, font`(bold, normal, large)` with option to clear screen
* Display line from `(x1,y1)` to `(x2,y2)` with color `(black, white)` option to clear screen
* Display rectangle at `(x,y)` with `(width, height)`, with fill or no fill, with color `(black, white)`, option to clear screen
* Display image at `(x,y)`, option to clear screen.
takes an input conforming to enum `ImageName`. One of the following:
- `.neutral`
- `.pinchRight`
- `.awake`
- `.hurt`
- `.accept`
- `.decline`
- `.questionMark`
- `.warning`
- `.stop`
- `.pirate`
- `.boom`
- `.ev3Icon`

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 KiB

Some files were not shown because too many files have changed in this diff Show More