support for led.plotBrightness (#494)
* support for led.plotBrightness * fixing c++ build * fixed blockid
This commit is contained in:
committed by
Sam El-Husseini
parent
e1764567c5
commit
e7c1915076
17
libs/core/shims.d.ts
vendored
17
libs/core/shims.d.ts
vendored
@ -441,8 +441,8 @@ declare namespace led {
|
||||
|
||||
/**
|
||||
* Turn on the specified LED using x, y coordinates (x is horizontal, y is vertical). (0,0) is upper left.
|
||||
* @param x TODO
|
||||
* @param y TODO
|
||||
* @param x the horizontal coordinate of the LED starting at 0
|
||||
* @param y the vertical coordinate of the LED starting at 0
|
||||
*/
|
||||
//% help=led/plot weight=78
|
||||
//% blockId=device_plot block="plot|x %x|y %y" blockGap=8
|
||||
@ -450,6 +450,19 @@ declare namespace led {
|
||||
//% x.min=0 x.max=4 y.min=0 y.max=4 shim=led::plot
|
||||
function plot(x: number, y: number): void;
|
||||
|
||||
/**
|
||||
* Turn on the specified LED with specific brightness using x, y coordinates (x is horizontal, y is vertical). (0,0) is upper left.
|
||||
* @param x the horizontal coordinate of the LED starting at 0
|
||||
* @param y the vertical coordinate of the LED starting at 0
|
||||
* @param brightness the brightness from 0 (off) to 255 (bright), eg:255
|
||||
*/
|
||||
//% help=led/plot weight=78
|
||||
//% blockId=device_plot_brightness block="plot|x %x|y %y|value %brightness" blockGap=8
|
||||
//% parts="ledmatrix"
|
||||
//% x.min=0 x.max=4 y.min=0 y.max=4 brightness.min=0 brightness.max=255
|
||||
//% advanced=true shim=led::plotBrightness
|
||||
function plotBrightness(x: number, y: number, brightness: number): void;
|
||||
|
||||
/**
|
||||
* Turn off the specified LED using x, y coordinates (x is horizontal, y is vertical). (0,0) is upper left.
|
||||
* @param x TODO
|
||||
|
Reference in New Issue
Block a user