Class for LED grid layer; created with DumbDisplay::createLedGridLayer() More...
#include <dumbdisplay.h>
Public Member Functions | |
LedGridDDLayer (int8_t layerId) | |
for internal use only | |
void | turnOn (int x=0, int y=0) |
turn on LED @ (x, y) | |
void | turnOff (int x=0, int y=0) |
turn off LED @ (x, y) | |
void | toggle (int x=0, int y=0) |
toggle LED @ (x, y) | |
void | turnOnEx (int x=0, int y=0, const String &onColor="") |
void | bitwise (unsigned int bits, int y=0, bool reverse=false) |
void | bitwise2 (unsigned int bits_0, unsigned int bits_1, int y=0, bool reverse=false) |
void | bitwise3 (unsigned int bits_0, unsigned int bits_1, unsigned int bits_2, int y=0, bool reverse=false) |
void | bitwise4 (unsigned int bits_0, unsigned int bits_1, unsigned int bits_2, unsigned int bits_3, int y=0, bool reverse=false) |
void | horizontalBar (int count, bool rightToLeft=false) |
void | verticalBar (int count, bool bottomToTop=true) |
void | horizontalBarEx (int count, int startX=0, const String &color="") |
void | verticalBarEx (int count, int startY=0, const String &color="") |
void | onColor (const String &color) |
void | offColor (const String &color) |
void | noOffColor () |
set no LED off color | |
Public Member Functions inherited from DDLayer | |
void | border (float size, const String &color, const String &shape="flat", float extraSize=0) |
void | noBorder () |
void | padding (float size) |
void | padding (float left, float top, float right, float bottom) |
void | noPadding () |
void | margin (float size) |
void | margin (float left, float top, float right, float bottom) |
void | noMargin () |
void | backgroundColor (const String &color, int opacity=100) |
void | noBackgroundColor () |
void | visible (bool visible) |
void | transparent (bool transparent) |
void | disabled (bool disabled=true) |
void | opacity (int opacity) |
void | alpha (int alpha) |
void | blend (const String &color, int alpha=255, const String &mode="darken") |
void | noblend () |
void | clear () |
clear the layer | |
void | flash () |
normally used for "feedback" – flash the default way (layer + border) | |
void | flashArea (int x, int y) |
normally used for "feedback" – flash the area (x, y) where the layer is clicked | |
void | explicitFeedback (int16_t x=0, int16_t y=0, const String &text="", DDFeedbackType type=CLICK, const String &option="") |
const String & | getLayerId () const |
void | setFeedbackHandler (DDFeedbackHandler handler, const String &autoFeedbackMethod="", const String &allowFeedbackTypes="") |
void | enableFeedback (const String &autoFeedbackMethod="", const String &allowFeedbackTypes="") |
void | disableFeedback () |
disable "feedback" | |
const DDFeedback * | getFeedback () |
void | debugOnly (int i) |
for debug use | |
DDFeedbackManager * | getFeedbackManager () const |
DDFeedbackHandler | getFeedbackHandler () const |
Additional Inherited Members | |
Public Attributes inherited from DDObject | |
int8_t | objectType |
object type – DD_OBJECT_TYPE_LAYER or DD_OBJECT_TYPE_TUNNEL | |
String | customData |
custom data | |
Protected Member Functions inherited from DDLayer | |
DDLayer (int8_t layerId) | |
void | _enableFeedback () |
Protected Attributes inherited from DDLayer | |
String | layerId |
DDFeedbackManager * | pFeedbackManager |
DDFeedbackHandler | feedbackHandler |
Class for LED grid layer; created with DumbDisplay::createLedGridLayer()
void LedGridDDLayer::bitwise | ( | unsigned int | bits, |
int | y = 0 , |
||
bool | reverse = false |
||
) |
turn on/off LEDs based on bits
bits | most significant bit (bit 0) maps to left-most LED |
y | row |
reverse | true means reversed ... i.e. least significant bit (bit 31) maps to left-most LED |
void LedGridDDLayer::bitwise2 | ( | unsigned int | bits_0, |
unsigned int | bits_1, | ||
int | y = 0 , |
||
bool | reverse = false |
||
) |
turn on/off two rows of LEDs by bits
void LedGridDDLayer::bitwise3 | ( | unsigned int | bits_0, |
unsigned int | bits_1, | ||
unsigned int | bits_2, | ||
int | y = 0 , |
||
bool | reverse = false |
||
) |
turn on/off three rows of LEDs by bits
void LedGridDDLayer::bitwise4 | ( | unsigned int | bits_0, |
unsigned int | bits_1, | ||
unsigned int | bits_2, | ||
unsigned int | bits_3, | ||
int | y = 0 , |
||
bool | reverse = false |
||
) |
turn on/off four rows of LEDs by bits
void LedGridDDLayer::horizontalBar | ( | int | count, |
bool | rightToLeft = false |
||
) |
turn on LEDs to form a horizontal "bar"
void LedGridDDLayer::horizontalBarEx | ( | int | count, |
int | startX = 0 , |
||
const String & | color = "" |
||
) |
turn on LEDs to form a horizontal "bar"
count | can be negative (if it makes sense) |
startX | normally 0 |
color | LED on color; DD_RGB_COLOR(...) or common color name; empty string means what already set |
void LedGridDDLayer::offColor | ( | const String & | color | ) |
set LED off color
color | DD_COLOR_XXX; DD_RGB_COLOR(...); can also be common "color name" |
void LedGridDDLayer::onColor | ( | const String & | color | ) |
set LED on color
color | DD_COLOR_XXX; DD_RGB_COLOR(...); can also be common "color name" |
void LedGridDDLayer::turnOnEx | ( | int | x = 0 , |
int | y = 0 , |
||
const String & | onColor = "" |
||
) |
turn on LED @ (x, y)
onColor | LED on color (common color name); empty string means what already set |
void LedGridDDLayer::verticalBar | ( | int | count, |
bool | bottomToTop = true |
||
) |
turn on LEDs to form a vertical "bar"
bottomToTop | true means bottom to top |
void LedGridDDLayer::verticalBarEx | ( | int | count, |
int | startY = 0 , |
||
const String & | color = "" |
||
) |
turn on LEDs to form a vertical "bar"
count | can be negative (if it makes sense) |
startY | normally 0 |
color | LED on color; DD_RGB_COLOR(...) or common color name; empty string means what already set |