diff --git a/docs/reference/led.md b/docs/reference/led.md index 8338b867..fa3c92e2 100644 --- a/docs/reference/led.md +++ b/docs/reference/led.md @@ -8,6 +8,7 @@ led.unplot(0, 0); led.point(0, 0); led.toggle(0, 0); led.brightness(); +led.plotBrightness(0, 0, 255) led.setBrightness(255); led.stopAnimation(); led.plotBarGraph(0, 0); @@ -23,4 +24,4 @@ led.enable(false) ### See Also [plot](/reference/led/plot), [unplot](/reference/led/unplot), [point](/reference/led/point), [brightness](/reference/led/brightness), [setBrightness](/reference/led/set-brightness), [stopAnimation](/reference/led/stop-animation), [plotBarGraph](/reference/led/plot-bar-graph), [fadeIn](/reference/led/fade-in), [fadeOut](/reference/led/fade-out), [plotAll](/reference/led/plot-all), [screenshot](/reference/led/screenshot), [toggle](/reference/led/toggle), [toggleAll](/reference/led/toggle-all), [setDisplayMode](/reference/led/set-display-mode), [enabled](/reference/led/enable), -[plotBrightness](/reference/led/plotBrightness), +[plotBrightness](/reference/led/plot-brightness), diff --git a/docs/reference/led/plotBrightness.md b/docs/reference/led/plot-brightness.md similarity index 88% rename from docs/reference/led/plotBrightness.md rename to docs/reference/led/plot-brightness.md index 286f4200..3f3e7f38 100644 --- a/docs/reference/led/plotBrightness.md +++ b/docs/reference/led/plot-brightness.md @@ -6,12 +6,6 @@ Turn on a LED light with a specific brightness on the [LED screen](/device/scree led.plotBrightness(0,0, 128); ``` -## ~hint - -Use [unplot](/reference/led/unplot) to turn **off** an LED. - -## ~ - ### Parameters * ``x`` is a [number](/types/number) that means the @@ -37,7 +31,7 @@ coordinates, see [LED screen](/device/screen). This program turns on the bottom right LED at 50% brightness ```blocks -led.plot(4, 4, 128) +led.plotBrightness(2, 2, 128) ``` @@ -49,10 +43,10 @@ to make a square around the edges of the LED screen. ```blocks for (let i = 0; i < 5; i++) { - led.plot(0, i, 64) - led.plot(4, i, 128) - led.plot(i, 0, 172) - led.plot(i, 4, 255) + led.plotBrightness(0, i, 64) + led.plotBrightness(4, i, 128) + led.plotBrightness(i, 0, 172) + led.plotBrightness(i, 4, 255) basic.pause(500) } ``` diff --git a/libs/core/led.cpp b/libs/core/led.cpp index d432b7ee..8c4bcaf9 100644 --- a/libs/core/led.cpp +++ b/libs/core/led.cpp @@ -30,7 +30,7 @@ namespace led { * @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 + //% help=led/plot-brightness weight=78 //% blockId=device_plot_brightness block="plot|x %x|y %y|brightness %brightness" blockGap=8 //% parts="ledmatrix" //% x.min=0 x.max=4 y.min=0 y.max=4 brightness.min=0 brightness.max=255 diff --git a/libs/core/shims.d.ts b/libs/core/shims.d.ts index 92fd810a..f5fae3e3 100644 --- a/libs/core/shims.d.ts +++ b/libs/core/shims.d.ts @@ -456,7 +456,7 @@ declare namespace led { * @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 + //% help=led/plot-brightness weight=78 //% blockId=device_plot_brightness block="plot|x %x|y %y|brightness %brightness" blockGap=8 //% parts="ledmatrix" //% x.min=0 x.max=4 y.min=0 y.max=4 brightness.min=0 brightness.max=255