Skip to content

Commit

Permalink
Beta updates (#259)
Browse files Browse the repository at this point in the history
* minor updates

* update assets

- pin beta to 6.0.24
- replace assets
- fix simulator rgbled off block
  • Loading branch information
Amerlander authored Nov 20, 2023
1 parent 330ac5a commit 6556be1
Show file tree
Hide file tree
Showing 32 changed files with 61 additions and 32 deletions.
2 changes: 1 addition & 1 deletion docs/beta-ref.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"appref": "v6.0.21"
"appref": "v6.0.24"
}
Binary file modified docs/calliope/links/thumbnail_didactic_material.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/calliope/links/thumbnail_projects.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/calliope/links/thumbnail_screenshots.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/calliope/links/thumbnail_shop.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/connect-microbit.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/connect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/connected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/device-forgotten.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/firmware.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/incompatible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/pair-browser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/pair.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/successfully-paired.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/transfer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/static/download/unpair.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/webusb/unpair.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion libs/audio-recording/pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"public": true,
"disablesVariants": [
"minidal"
]
],
"icon": "./static/packages/microphone/icon.png"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
"basic.setLedColors|param|color2": "The second LED color.",
"basic.setLedColors|param|color3": "The third LED color.",
"input": "Events and data from sensors",
"input.logoIsPressed": "Get the logo state (pressed or not).",
"input.onLogoEvent": "Do something when the logo is touched and released again.",
"input.logoIsPressed": "Get the logo state (pressed or not). Calliope mini 3 block.",
"input.onLogoEvent": "Do something when the logo is touched and released again. Calliope mini 3 block.",
"input.onLogoEvent|param|body": "the code to run when the logo is pressed",
"motors": "Blocks to control the onboard motors",
"motors.brakeMotor": "Controls one or two motors attached to the board.",
"motors.dualMotorPower": "Controls two motors attached to the board.",
"motors.motorCommand": "Send break, coast or sleep commands to the motor. Has no effect in dual-motor mode.",
"motors.motorPower": "Turns on the motor at a certain percent of power. Switches to single motor mode!",
Expand Down
2 changes: 1 addition & 1 deletion libs/core-mini-codal/_locales/core-mini-codal-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"TouchTarget.P0|block": "P0",
"TouchTarget.P1|block": "P1",
"TouchTarget.P2|block": "P2",
"TouchTarget.P3|block": "P3",
"TouchTargetMode.Capacitive|block": "capacitive",
"TouchTargetMode.Resistive|block": "resistive",
"WaveShape.Noise|block": "noise",
Expand All @@ -30,7 +31,6 @@
"input.logoIsPressed|block": "logo is pressed",
"input.onLogoEvent|block": "on logo $action",
"input|block": "input",
"motors.brakeMotor|block": "motor %motor break",
"motors.dualMotorPower|block": "motor %motor|at %percent \\%",
"motors.motorCommand|block": "motor %command",
"motors.motorPower|block": "motor on at %percent \\%",
Expand Down
2 changes: 2 additions & 0 deletions libs/core-mini-codal/enums.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
P1 = 101, // MICROBIT_ID_IO_P1
//% block="P2"
P2 = 102, // MICROBIT_ID_IO_P2
//% block="P3"
P3 = 103, // MICROBIT_ID_IO_P3
//% block="logo"
LOGO = 121, // MICROBIT_ID_LOGO
}
Expand Down
4 changes: 2 additions & 2 deletions libs/core-mini-codal/logo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ enum TouchButtonEvent {

namespace input {
/**
* Do something when the logo is touched and released again.
* Do something when the logo is touched and released again. Calliope mini 3 block.
* @param body the code to run when the logo is pressed
*/
//% weight=83 blockGap=32
Expand All @@ -33,7 +33,7 @@ namespace input {
}

/**
* Get the logo state (pressed or not).
* Get the logo state (pressed or not). Calliope mini 3 block.
*/
//% weight=58
//% blockId="input_logo_is_pressed" block="logo is pressed"
Expand Down
19 changes: 1 addition & 18 deletions libs/core-mini-codal/motors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,7 @@ namespace motors {
//% hidden=1 deprecated=1
export function motorCommand(command: MotorCommand) {
if(command == MotorCommand.Break) {
brakeMotor(Motor.M0_M1)
}
}

/**
* Controls one or two motors attached to the board.
*/
//% blockId=block_break_motor block="motor %motor break"
//% weight=80
export function brakeMotor(motor: Motor) {

pins.digitalWritePin(DigitalPin.M_MODE, 1);

if (motor === Motor.M0 || motor === Motor.M0_M1) {
pins.analogWritePin(AnalogPin.M0_SPEED, 0);
}
if (motor === Motor.M1 || motor === Motor.M0_M1) {
pins.analogWritePin(AnalogPin.M1_SPEED, 0);
dualMotorPower(Motor.M0_M1, 0)
}
}

Expand Down
4 changes: 2 additions & 2 deletions libs/core-mini-codal/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ declare namespace music {
declare namespace input {

/**
* Do something when the logo is touched and released again.
* Do something when the logo is touched and released again. Calliope mini 3 block.
* @param body the code to run when the logo is pressed
*/
//% weight=83 blockGap=32
Expand All @@ -71,7 +71,7 @@ declare namespace input {
function onLogoEvent(action: TouchButtonEvent, body: () => void): void;

/**
* Get the logo state (pressed or not).
* Get the logo state (pressed or not). Calliope mini 3 block.
*/
//% weight=58
//% blockId="input_logo_is_pressed" block="logo is pressed"
Expand Down
2 changes: 2 additions & 0 deletions libs/core-mini-codal/touchmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ enum class TouchTarget {
P1 = MICROBIT_ID_IO_P1,
//% block="P2"
P2 = MICROBIT_ID_IO_P2,
//% block="P3"
P3 = MICROBIT_ID_IO_P3,
//% block="logo"
LOGO = MICROBIT_ID_LOGO
};
Expand Down
6 changes: 6 additions & 0 deletions libs/core-mini-dal/_locales/core-mini-dal-jsdoc-strings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"basic": "Provides access to basic micro:bit functionality.\n\nProvides access to basic micro:bit functionality.\n\nProvides access to basic calliope mini functionality.\n\r\nProvides access to basic calliope mini functionality.",
"basic.setLedColors": "Sets the color on the built-in RGB LED. Set to 0 to turn off.",
"basic.setLedColors|param|brightness": "The LED brightness in percent.",
"basic.setLedColors|param|color1": "The color of the first LED in RGB format (e.g., 0xFF0000 for red).",
"basic.setLedColors|param|color2": "The second LED color.",
"basic.setLedColors|param|color3": "The third LED color.",
"input": "Events and data from sensors",
"input.assumeCalibrationCompass": "Obsolete, compass calibration is automatic.",
"input.clearCalibrationCompass": "Obsolete, compass calibration is automatic.",
Expand Down
4 changes: 4 additions & 0 deletions libs/core-mini-dal/_locales/core-mini-dal-strings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"basic.setLedColors|block": "set LED to %color1=colorNumberPicker %color2=colorNumberPicker %color3=colorNumberPicker",
"basic|block": "basic",
"input.assumeCalibrationCompass|block": "assume calibration compass",
"input.clearCalibrationCompass|block": "clear calibration compass",
"input.isCalibratedCompass|block": "is compass calibrated",
Expand All @@ -8,8 +10,10 @@
"motors.motorCommand|block": "motor %command",
"motors.motorPower|block": "motor on at %percent \\%",
"motors|block": "motors",
"{id:category}Basic": "Basic",
"{id:category}Input": "Input",
"{id:category}Motors": "Motors",
"{id:group}Configuration": "Configuration",
"{id:group}RGB LED": "RGB LED",
"{id:group}System": "System"
}
3 changes: 2 additions & 1 deletion libs/core-mini-dal/pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"microphone.ts",
"motors.ts",
"parts/dcmotor.svg",
"input.cpp"
"input.cpp",
"rgbled.ts"
]
}
29 changes: 29 additions & 0 deletions libs/core-mini-dal/rgbled.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Provides access to basic calliope mini functionality.
*/
namespace basic {

/**
* Sets the color on the built-in RGB LED. Set to 0 to turn off.
* @param color1 The color of the first LED in RGB format (e.g., 0xFF0000 for red).
* @param color2 The second LED color.
* @param color3 The third LED color.
* @param brightness The LED brightness in percent.
*/
//% help=basic/set-led-colors
//% blockId=device_set_led_colors
//% block="set LED to %color1=colorNumberPicker %color2=colorNumberPicker %color3=colorNumberPicker"
//% color1.defl=0xff0000
//% color2.defl=0xff0000
//% color3.defl=0xff0000
//% brightness.defl=20
//% expandableArgumentMode="toggle"
//% weight=10
//% group="RGB LED"
//% inlineInputMode=inline
//% hidden=1
export function setLedColors(color1: number, color2: number, color3: number, brightness: number = 20) {
setLedColorDal(color1);
}

}
4 changes: 2 additions & 2 deletions pxtarget.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"yottaTarget": "calliope-mini-classic-gcc@https://github.com/calliope-mini/target-calliope-mini-classic-gcc#v1.2.4",
"yottaCorePackage": "microbit",
"githubCorePackage": "calliope-mini/microbit",
"gittag": "v2.2.0-rc6-calliope.rc4",
"gittag": "v2.2.0-rc6-calliope.rc5",
"serviceId": "calliope",
"dockerImage": "pext/yotta:gcc5"
},
Expand All @@ -174,7 +174,7 @@
"codalTarget": {
"name": "codal-microbit-v2",
"url": "https://github.com/calliope-edu/codal-microbit-v2",
"branch": "v0.2.57-calliope-1.5",
"branch": "v0.2.63-calliope-rc1",
"type": "git"
},
"codalBinary": "MICROBIT",
Expand Down
2 changes: 2 additions & 0 deletions sim/state/rgbled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ namespace pxsim.basic {
}

export function turnRgbLedOff() {
board().rgbLedLeftState = 0;
board().rgbLedState = 0;
board().rgbLedRightState = 0;
runtime.queueDisplayUpdate()
}
}
2 changes: 1 addition & 1 deletion sim/visuals/microbit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ namespace pxsim.visuals {
"Button A", "Button B",
"GND", "GND", "GND", "+3v3",
"P0", "P2", "C4", "C6", "C8", "C10", "C12", "C14", "C16 (A1 RX)", "C18", "C20 (A0 SDA)",
"P1", "P3", "C5", "C7", "C9", "C11", "C13", "C15", "C17 (A1 TX)", "C19",
"P1", "P3", "C5", "C7", "C9", "C11", "C13", "C15", "C17 (A1 TX)", "C19 (A0 SCL)",
"Motor 0 -", "Motor 1 -", "MOTOR 0 +", "MOTOR 1 +", "MOTOR VM+",
"GND", "+3v3", "C20 (A0 SDA)", "C19 (A0 SCL)",
"C16 (A1 RX)", "C17 (A1 TX)", "+3v3", "GND"
Expand Down

0 comments on commit 6556be1

Please sign in to comment.