Remove shim=s
This commit is contained in:
parent
9820a035ce
commit
0130ecb0c2
@ -16,7 +16,7 @@ namespace led {
|
|||||||
* @param x TODO
|
* @param x TODO
|
||||||
* @param y TODO
|
* @param y TODO
|
||||||
*/
|
*/
|
||||||
//% help=led/plot weight=78 shim=micro_bit::plot
|
//% help=led/plot weight=78
|
||||||
//% blockId=device_plot block="plot|x %x|y %y" icon="\uf205" blockGap=8
|
//% blockId=device_plot block="plot|x %x|y %y" icon="\uf205" blockGap=8
|
||||||
void plot(int x, int y) {
|
void plot(int x, int y) {
|
||||||
uBit.display.image.setPixelValue(x, y, 1);
|
uBit.display.image.setPixelValue(x, y, 1);
|
||||||
@ -27,7 +27,7 @@ namespace led {
|
|||||||
* @param x TODO
|
* @param x TODO
|
||||||
* @param y TODO
|
* @param y TODO
|
||||||
*/
|
*/
|
||||||
//% help=led/unplot weight=77 shim=micro_bit::unPlot
|
//% help=led/unplot weight=77
|
||||||
//% blockId=device_unplot block="unplot|x %x|y %y" icon="\uf204" blockGap=8
|
//% blockId=device_unplot block="unplot|x %x|y %y" icon="\uf204" blockGap=8
|
||||||
void unplot(int x, int y) {
|
void unplot(int x, int y) {
|
||||||
uBit.display.image.setPixelValue(x, y, 0);
|
uBit.display.image.setPixelValue(x, y, 0);
|
||||||
@ -38,7 +38,7 @@ namespace led {
|
|||||||
* @param x TODO
|
* @param x TODO
|
||||||
* @param y TODO
|
* @param y TODO
|
||||||
*/
|
*/
|
||||||
//% help=led/point weight=76 shim=micro_bit::point
|
//% help=led/point weight=76
|
||||||
//% blockId=device_point block="point|x %x|y %y" icon="\uf10c"
|
//% blockId=device_point block="point|x %x|y %y" icon="\uf10c"
|
||||||
bool point(int x, int y) {
|
bool point(int x, int y) {
|
||||||
int pix = uBit.display.image.getPixelValue(x, y);
|
int pix = uBit.display.image.getPixelValue(x, y);
|
||||||
@ -48,7 +48,7 @@ namespace led {
|
|||||||
/**
|
/**
|
||||||
* Get the screen brightness from 0 (off) to 255 (full bright).
|
* Get the screen brightness from 0 (off) to 255 (full bright).
|
||||||
*/
|
*/
|
||||||
//% help=led/brightness weight=60 shim=micro_bit::getBrightness
|
//% help=led/brightness weight=60
|
||||||
//% blockId=device_get_brightness block="brightness" icon="\uf042" blockGap=8
|
//% blockId=device_get_brightness block="brightness" icon="\uf042" blockGap=8
|
||||||
int brightness() {
|
int brightness() {
|
||||||
return uBit.display.getBrightness();
|
return uBit.display.getBrightness();
|
||||||
@ -58,7 +58,7 @@ namespace led {
|
|||||||
* Set the screen brightness from 0 (off) to 255 (full bright).
|
* Set the screen brightness from 0 (off) to 255 (full bright).
|
||||||
* @param value the brightness value, eg:255, 127, 0
|
* @param value the brightness value, eg:255, 127, 0
|
||||||
*/
|
*/
|
||||||
//% help=led/set-brightness weight=59 shim=micro_bit::setBrightness
|
//% help=led/set-brightness weight=59
|
||||||
//% blockId=device_set_brightness block="set brightness %value" icon="\uf042"
|
//% blockId=device_set_brightness block="set brightness %value" icon="\uf042"
|
||||||
void setBrightness(int value) {
|
void setBrightness(int value) {
|
||||||
uBit.display.setBrightness(value);
|
uBit.display.setBrightness(value);
|
||||||
@ -67,7 +67,7 @@ namespace led {
|
|||||||
/**
|
/**
|
||||||
* Cancels the current animation and clears other pending animations.
|
* Cancels the current animation and clears other pending animations.
|
||||||
*/
|
*/
|
||||||
//% weight=50 shim=uBit.display.stopAnimation help=led/stop-animation
|
//% weight=50 help=led/stop-animation
|
||||||
//% blockId=device_stop_animation block="stop animation" icon="\uf04d"
|
//% blockId=device_stop_animation block="stop animation" icon="\uf04d"
|
||||||
void stopAnimation() {
|
void stopAnimation() {
|
||||||
uBit.display.stopAnimation();
|
uBit.display.stopAnimation();
|
||||||
@ -77,7 +77,7 @@ namespace led {
|
|||||||
* Sets the display mode between black and white and greyscale for rendering LEDs.
|
* Sets the display mode between black and white and greyscale for rendering LEDs.
|
||||||
* @param mode TODO
|
* @param mode TODO
|
||||||
*/
|
*/
|
||||||
//% shim=micro_bit::setDisplayMode weight=1 help=/led/set-display-mode
|
//% weight=1 help=/led/set-display-mode
|
||||||
void setDisplayMode(DisplayMode_ mode) {
|
void setDisplayMode(DisplayMode_ mode) {
|
||||||
uBit.display.setDisplayMode((DisplayMode)mode);
|
uBit.display.setDisplayMode((DisplayMode)mode);
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ namespace led {
|
|||||||
/**
|
/**
|
||||||
* Takes a screenshot of the LED screen and returns an image.
|
* Takes a screenshot of the LED screen and returns an image.
|
||||||
*/
|
*/
|
||||||
//% shim=uBit.display.screenShot help=led/screenshot
|
//% help=led/screenshot
|
||||||
Image screenshot() {
|
Image screenshot() {
|
||||||
return uBit.display.screenShot().leakData();
|
return uBit.display.screenShot().leakData();
|
||||||
/*
|
/*
|
||||||
|
16
libs/microbit/shims.d.ts
vendored
16
libs/microbit/shims.d.ts
vendored
@ -311,7 +311,7 @@ declare namespace led {
|
|||||||
* @param x TODO
|
* @param x TODO
|
||||||
* @param y TODO
|
* @param y TODO
|
||||||
*/
|
*/
|
||||||
//% help=led/plot weight=78 shim=micro_bit::plot
|
//% help=led/plot weight=78
|
||||||
//% blockId=device_plot block="plot|x %x|y %y" icon="\uf205" blockGap=8 shim=led::plot
|
//% blockId=device_plot block="plot|x %x|y %y" icon="\uf205" blockGap=8 shim=led::plot
|
||||||
function plot(x: number, y: number): void;
|
function plot(x: number, y: number): void;
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ declare namespace led {
|
|||||||
* @param x TODO
|
* @param x TODO
|
||||||
* @param y TODO
|
* @param y TODO
|
||||||
*/
|
*/
|
||||||
//% help=led/unplot weight=77 shim=micro_bit::unPlot
|
//% help=led/unplot weight=77
|
||||||
//% blockId=device_unplot block="unplot|x %x|y %y" icon="\uf204" blockGap=8 shim=led::unplot
|
//% blockId=device_unplot block="unplot|x %x|y %y" icon="\uf204" blockGap=8 shim=led::unplot
|
||||||
function unplot(x: number, y: number): void;
|
function unplot(x: number, y: number): void;
|
||||||
|
|
||||||
@ -329,14 +329,14 @@ declare namespace led {
|
|||||||
* @param x TODO
|
* @param x TODO
|
||||||
* @param y TODO
|
* @param y TODO
|
||||||
*/
|
*/
|
||||||
//% help=led/point weight=76 shim=micro_bit::point
|
//% help=led/point weight=76
|
||||||
//% blockId=device_point block="point|x %x|y %y" icon="\uf10c" shim=led::point
|
//% blockId=device_point block="point|x %x|y %y" icon="\uf10c" shim=led::point
|
||||||
function point(x: number, y: number): boolean;
|
function point(x: number, y: number): boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the screen brightness from 0 (off) to 255 (full bright).
|
* Get the screen brightness from 0 (off) to 255 (full bright).
|
||||||
*/
|
*/
|
||||||
//% help=led/brightness weight=60 shim=micro_bit::getBrightness
|
//% help=led/brightness weight=60
|
||||||
//% blockId=device_get_brightness block="brightness" icon="\uf042" blockGap=8 shim=led::brightness
|
//% blockId=device_get_brightness block="brightness" icon="\uf042" blockGap=8 shim=led::brightness
|
||||||
function brightness(): number;
|
function brightness(): number;
|
||||||
|
|
||||||
@ -344,14 +344,14 @@ declare namespace led {
|
|||||||
* Set the screen brightness from 0 (off) to 255 (full bright).
|
* Set the screen brightness from 0 (off) to 255 (full bright).
|
||||||
* @param value the brightness value, eg:255, 127, 0
|
* @param value the brightness value, eg:255, 127, 0
|
||||||
*/
|
*/
|
||||||
//% help=led/set-brightness weight=59 shim=micro_bit::setBrightness
|
//% help=led/set-brightness weight=59
|
||||||
//% blockId=device_set_brightness block="set brightness %value" icon="\uf042" shim=led::setBrightness
|
//% blockId=device_set_brightness block="set brightness %value" icon="\uf042" shim=led::setBrightness
|
||||||
function setBrightness(value: number): void;
|
function setBrightness(value: number): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels the current animation and clears other pending animations.
|
* Cancels the current animation and clears other pending animations.
|
||||||
*/
|
*/
|
||||||
//% weight=50 shim=uBit.display.stopAnimation help=led/stop-animation
|
//% weight=50 help=led/stop-animation
|
||||||
//% blockId=device_stop_animation block="stop animation" icon="\uf04d" shim=led::stopAnimation
|
//% blockId=device_stop_animation block="stop animation" icon="\uf04d" shim=led::stopAnimation
|
||||||
function stopAnimation(): void;
|
function stopAnimation(): void;
|
||||||
|
|
||||||
@ -359,13 +359,13 @@ declare namespace led {
|
|||||||
* Sets the display mode between black and white and greyscale for rendering LEDs.
|
* Sets the display mode between black and white and greyscale for rendering LEDs.
|
||||||
* @param mode TODO
|
* @param mode TODO
|
||||||
*/
|
*/
|
||||||
//% shim=micro_bit::setDisplayMode weight=1 help=/led/set-display-mode shim=led::setDisplayMode
|
//% weight=1 help=/led/set-display-mode shim=led::setDisplayMode
|
||||||
function setDisplayMode(mode: DisplayMode): void;
|
function setDisplayMode(mode: DisplayMode): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes a screenshot of the LED screen and returns an image.
|
* Takes a screenshot of the LED screen and returns an image.
|
||||||
*/
|
*/
|
||||||
//% shim=uBit.display.screenShot help=led/screenshot shim=led::screenshot
|
//% help=led/screenshot shim=led::screenshot
|
||||||
function screenshot(): Image;
|
function screenshot(): Image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user