From b88271f625e9ad1158954b2b00a4542eba0195a8 Mon Sep 17 00:00:00 2001 From: Matt Hillsdon <44397098+microbit-matt-hillsdon@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:45:28 +0100 Subject: [PATCH 1/3] Add license and contributing files. (#83) --- CONTRIBUTING.md | 13 +++++++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 6 ++++++ 3 files changed, 40 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..3ccae7b5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +Thanks for looking here! We'd love your help. The micro:bit project is only +possible through contributions of companies and individuals around the world. + +This project is managed on GitHub, and the best way to contribute is to jump in +and fix/file issues. + +https://github.com/microbit-foundation/micropython-microbit-v2-simulator + +Significant features are best discussed first to make sure everyone is agreed +on the best direction. + +The project uses [Prettier](https://prettier.io/) to format TypeScript code so +please check out their documentation and set it up with your code editor. diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..2171dc8d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Damien P. George, Micro:bit Educational Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index c4c1c74e..ecaa0251 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,12 @@ To try the simulator use the [micro:bit Python Editor](https://python.microbit.o The rest of this page explains how to embed the simulator in an application and develop the simulator software. +## License + +This software is under the MIT open source license. + +[SPDX-License-Identifier: MIT](LICENSE) + ## Embedding The simulator is designed to be embedded into other web applications From 365bad7863ab4c2e2ac5d1f6437b57501cd8e0ba Mon Sep 17 00:00:00 2001 From: Matt Hillsdon <44397098+microbit-matt-hillsdon@users.noreply.github.com> Date: Mon, 31 Oct 2022 11:38:25 +0000 Subject: [PATCH 2/3] Set the random number seed. (#87) It's used in a non-crypto safe RNG in MicroPython so just seed it with a Math.random-derived value. Closes https://github.com/microbit-foundation/micropython-microbit-v2-simulator/issues/85 --- src/demo.html | 1 + src/examples/random.py | 13 +++++++++++++ src/jshal.h | 2 ++ src/jshal.js | 9 ++++++++- src/microbithal_js.c | 5 ++--- 5 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 src/examples/random.py diff --git a/src/demo.html b/src/demo.html index cdcbfd44..5889f7cf 100644 --- a/src/demo.html +++ b/src/demo.html @@ -93,6 +93,7 @@

MicroPython-micro:bit simulator example embedding

+