Fix Black and White Typo (#2138)

* Fixed typo: Back->Black

* Added Upgrade Rules to fix spelling

* Removed extra isEmpty

* Added previous BackAndWhite to allow for compilation of old scripts
This commit is contained in:
Chase Mortensen 2019-06-07 15:54:58 -07:00 committed by GitHub
parent b68eb5e960
commit 1eec659894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 3 deletions

View File

@ -12,7 +12,7 @@ led.plotBrightness(0, 0, 255)
led.setBrightness(255);
led.stopAnimation();
led.plotBarGraph(0, 0);
led.setDisplayMode(DisplayMode.BackAndWhite);
led.setDisplayMode(DisplayMode.BlackAndWhite);
led.enable(false)
```

View File

@ -18,7 +18,7 @@ to have some amount of brightness to represent the grey value of real color. The
Set the display mode to `black and white`.
```blocks
led.setDisplayMode(DisplayMode.BackAndWhite)
led.setDisplayMode(DisplayMode.BlackAndWhite)
```
## See also

View File

@ -69,7 +69,7 @@
"Dimension.Z|block": "z",
"Direction.Left|block": "left",
"Direction.Right|block": "right",
"DisplayMode.BackAndWhite|block": "black and white",
"DisplayMode.BlackAndWhite|block": "black and white",
"DisplayMode.Greyscale|block": "greyscale",
"EventCreationMode.CreateAndFire": "MicroBitEvent is initialised, and its event handlers are immediately fired (not suitable for use in interrupts!).",
"EventCreationMode.CreateOnly": "MicroBitEvent is initialised, and no further processing takes place.",

View File

@ -416,6 +416,8 @@ declare namespace control {
declare const enum DisplayMode {
//% block="black and white"
BlackAndWhite = 0, // DISPLAY_MODE_BLACK_AND_WHITE
//% blockHidden=true
BackAndWhite = 0, // DISPLAY_MODE_BLACK_AND_WHITE
//% block="greyscale"
Greyscale = 1, // DISPLAY_MODE_GREYSCALE

View File

@ -2,6 +2,8 @@
enum class DisplayMode_ {
//% block="black and white"
BlackAndWhite = DISPLAY_MODE_BLACK_AND_WHITE,
//% blockHidden=true
BackAndWhite = DISPLAY_MODE_BLACK_AND_WHITE,
//% block="greyscale"
Greyscale = DISPLAY_MODE_GREYSCALE,

View File

@ -88,6 +88,14 @@
"device_print_message.message": "text"
}
}
],
"0.0.0 - 1.4.12": [
{
"type": "api",
"map": {
"DisplayMode\\s*\\.\\s*BackAndWhite": "DisplayMode.BlackAndWhite"
}
}
]
},
"hidSelectors": [