![]() |
RSeries astromech firmware
|
#include <dome/LogicEngine.h>
Base class renderer for both front and rear RSeries logics.
Base class renderer for all animation on RSeries front and rear logics.
For further information on the hardware:
Inheritance diagram for LogicEngineRenderer:
Collaboration diagram for LogicEngineRenderer:Public Types | |
| typedef bool(* | LogicEffect) (LogicEngineRenderer &renderer) |
| typedef LogicEffect(* | LogicEffectSelector) (unsigned effectVal) |
| typedef PROGMEMString(* | LogicPMessageSelector) (unsigned index) |
| typedef byte(* | LogicRenderGlyph) (char ch, byte fontNum, const CRGB fontColors[], int x, int y, CRGB *leds, const byte *ledMap, int w, int h, byte *glyphHeight) |
Public Types inherited from LogicEngineDefaults | |
| enum | ColorVal { kRed = 1, kOrange = 2, kYellow = 3, kGreen = 4, kCyan = 5, kBlue = 6, kPurple = 7, kMagenta = 8, kPink = 9, kDefault = 0 } |
Public Member Functions | |
| ColorVal | randomColor () |
| void | selectEffect (long inputNum) |
| void | selectSequence (byte seq, ColorVal colorVal=kDefault, uint8_t speedScale=0, uint8_t numSeconds=0) |
| void | selectTextCenter (const char *text, ColorVal colorVal=kDefault, uint8_t speedScale=0, uint8_t numSeconds=0) |
| void | selectScrollTextLeft (const char *text, ColorVal colorVal=kDefault, uint8_t speedScale=0, uint8_t numSeconds=0) |
| void | selectScrollTextRight (const char *text, ColorVal colorVal=kDefault, uint8_t speedScale=0, uint8_t numSeconds=0) |
| void | selectScrollTextUp (const char *text, ColorVal colorVal=kDefault, uint8_t speedScale=0, uint8_t numSeconds=0) |
| virtual void | handleCommand (const char *cmd) |
| Subclasses should implement this function to process commands specific to their device. More... | |
| virtual void | setup () override |
| Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor. More... | |
| virtual void | animate () override |
| Subclasses must implement this function to run through a single frame of animation/activity. More... | |
| bool | hasEffectChanged () |
| void | resetEffect () |
| bool | hasEffectChangedType () |
| unsigned | getID () const |
| int | getEffectColor () |
| int | getEffectHue () |
| int | getEffectSpeed () |
| int | getEffectLength () |
| int | getEffectTextMsg () |
| unsigned | getEffectDuration () |
| byte | getHue () |
| void | setHue (byte hue) |
| byte | getFade () |
| void | setFade (byte fade) |
| byte | getDelay () |
| void | setDelay (byte delay) |
| byte | getBrightness () |
| void | setBrightness (byte bri) |
| bool | getEffectFlip () |
| void | setEffectFlip (bool flip) |
| LogicEffectObject * | getEffectObject () |
| uint32_t | getEffectData () |
| void | setEffectObject (LogicEffectObject *obj) |
| void | setEffectData (uint32_t data) |
| uint32_t | getEffectData2 () |
| void | setEffectData2 (uint32_t data) |
| void | setEffectWidthRange (float percent) |
| int | getEffectMsgWidth () |
| int | getEffectMsgHeight () |
| byte | getPeakValue () |
| void | setEffectDelay (uint32_t effectDelay) |
| int | width () const |
| int | height () const |
| unsigned | count () const |
| unsigned | mapLED (unsigned index) |
| void | setLogicEffectSelector (LogicEffectSelector selector) |
| void | setMessageSelector (LogicMessageSelector selector) |
| void | setPMessageSelector (LogicPMessageSelector selector) |
| void | setPeakValueProvider (PeakValueProvider &provider) |
| void | set (unsigned index, const struct CRGB &val) |
| void | setHSV (unsigned index, uint8_t hue, uint8_t sat, uint8_t val) |
| void | restoreSettings () |
| void | changePalette () |
| unsigned | getCurrentPalette () |
| void | setPaletteHue (byte palNum, byte hue) |
| void | clearBlockedPortion () |
| void | updateDisplay () |
| void | updateDisplayPeak () |
| void | updateDisplay (byte bri) |
| void | updateDisplaySplitHalf (byte topBri, byte bottomBri) |
| void | updateDisplaySplitRowThirds (byte topBri, byte bottomBri) |
| unsigned | measureText (const char *txt, int &outWidth, int &outHeight) |
| unsigned | measureText (PROGMEMString ptxt, int &outWidth, int &outHeight) |
| byte | getEffectFontNum () |
| void | setEffectFontNum (byte fontNum) |
| void | setTextMessage (const char *msg) |
| void | setupTextMessage (int selectTextMsg) |
| void | clear () |
| void | renderText (int x, int y, byte effectHue) |
| LEDStatus * | getUnmappedLEDStatus () |
| CRGB * | getUnmappedLEDs () |
| void | setPixel (int x, int y, byte effectHue, byte bri) |
| void | setPixelRGB (int x, int y, const struct CRGB &val) |
| void | setPixelRGB (int x, int y, uint8_t r, uint8_t g, uint8_t b) |
| void | calculateAllColors (byte colorPalNum, byte brightVal) |
| void | calculateAllColors () |
| void | updateMappedLED (unsigned index, byte hueVal, byte briVal=255) |
| virtual void | jawaCommand (char cmd, int arg, int value) override |
| Subclasses should override this method to handle commands specifying a value. More... | |
| virtual void | jawaCommand (char cmd, const char *arg) override |
| Subclasses should override this method to handle commands. More... | |
| LogicEngineSettings | getSettings () |
| void | changeSettings (LogicEngineSettings &newSettings) |
| virtual void | changeDefaultSettings (LogicEngineSettings &settings)=0 |
Static Public Member Functions | |
| static int | getNextID () |
| static constexpr uint32_t | getDefaultEffectDelay () |
| static int | mapSelectColorToHue (unsigned selectColor) |
Static Public Member Functions inherited from LogicEngineDefaults | |
| static long | sequence (byte seq, ColorVal colorVal=kDefault, uint8_t speedScale=0, uint8_t numSeconds=0) |
| Calculate sequence value given four parameters. More... | |
Public Attributes | |
| const typedef char *(* | LogicMessageSelector )(unsigned index) |
Protected Member Functions | |
| LogicEngineRenderer (byte id, byte tweens, byte totalColors, byte totalColorsWBIZ, unsigned width, unsigned height, unsigned count, unsigned start, unsigned end, CRGB *led, HSVColor *allColors, LEDStatus *ledStatus, const byte *ledMap, LogicRenderGlyph renderGlyph) | |
| virtual void | defaultSettings ()=0 |
Protected Attributes | |
| LogicEngineSettings | fSettings |
| LogicEffectSelector | fEffectSelector = NULL |
| LogicMessageSelector | fMessageSelector = NULL |
| LogicPMessageSelector | fPMessageSelector = NULL |
Static Protected Attributes | |
| static uint16_t | sLastEventCount |
Additional Inherited Members | |
Static Public Attributes inherited from LogicEngineDefaults | |
| static constexpr byte | FRONT_FADE = 1 |
| static constexpr byte | FRONT_DELAY = 10 |
| static constexpr byte | FRONT_HUE = 0 |
| static constexpr byte | REAR_FADE = 3 |
| static constexpr byte | REAR_DELAY = 40 |
| static constexpr byte | REAR_HUE = 0 |
| static constexpr byte | FRONT_PAL = 0 |
| static constexpr byte | REAR_PAL = 1 |
| static constexpr byte | FRONT_PSI_PAL = 4 |
| static constexpr byte | REAR_PSI_PAL = 5 |
| static constexpr byte | FRONT_BRI = 160 |
| static constexpr byte | REAR_BRI = 140 |
| static constexpr byte | MAX_BRIGHTNESS = 225 |
| static constexpr byte | MIN_BRIGHTNESS = 1 |
| static constexpr uint32_t | NORMVAL = 0 |
| static constexpr byte | PAL_COUNT = 6 |
| static constexpr byte | NORMAL = 0 |
| static constexpr byte | ALARM = 1 |
| static constexpr byte | FAILURE = 2 |
| static constexpr byte | LEIA = 3 |
| static constexpr byte | MARCH = 4 |
| static constexpr byte | SOLIDCOLOR = 5 |
| static constexpr byte | FLASHCOLOR = 6 |
| static constexpr byte | FLIPFLOPCOLOR = 7 |
| static constexpr byte | FLIPFLOPALTCOLOR = 8 |
| static constexpr byte | COLORSWAP = 9 |
| static constexpr byte | RAINBOW = 10 |
| static constexpr byte | REDALERT = 11 |
| static constexpr byte | MICBRIGHT = 12 |
| static constexpr byte | MICRAINBOW = 13 |
| static constexpr byte | LIGHTSOUT = 14 |
| static constexpr byte | TEXT = 15 |
| static constexpr byte | TEXTSCROLLLEFT = 16 |
| static constexpr byte | TEXTSCROLLRIGHT = 17 |
| static constexpr byte | TEXTSCROLLUP = 18 |
| static constexpr byte | ROAMINGPIXEL = 19 |
| static constexpr byte | HORIZONTALSCANLINE = 20 |
| static constexpr byte | VERTICALSCANLINE = 21 |
| static constexpr byte | FIRE = 22 |
| static constexpr byte | PSICOLORWIPE = 23 |
| static constexpr byte | PULSE = 24 |
| static constexpr byte | RANDOM = 99 |
| typedef bool(* LogicEngineRenderer::LogicEffect) (LogicEngineRenderer &renderer) |
| typedef LogicEffect(* LogicEngineRenderer::LogicEffectSelector) (unsigned effectVal) |
| typedef PROGMEMString(* LogicEngineRenderer::LogicPMessageSelector) (unsigned index) |
| typedef byte(* LogicEngineRenderer::LogicRenderGlyph) (char ch, byte fontNum, const CRGB fontColors[], int x, int y, CRGB *leds, const byte *ledMap, int w, int h, byte *glyphHeight) |
|
inlineprotected |
|
inlineoverridevirtual |
Subclasses must implement this function to run through a single frame of animation/activity.
Subclasses should not call delay() or otherwise block.
Implements AnimatedEvent.
|
inline |
|
inline |
|
pure virtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protectedpure virtual |
|
inline |
|
inline |
|
inlinestaticconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Subclasses should implement this function to process commands specific to their device.
By convention the first two characters are the device type identifier. 'H' 'P' for holoprojector, etc.
Implements CommandEvent.
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Subclasses should override this method to handle commands.
Reimplemented from JawaEvent.
|
inlineoverridevirtual |
Subclasses should override this method to handle commands specifying a value.
Reimplemented from JawaEvent.
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor.
Implements SetupEvent.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
| const typedef char*(* LogicEngineRenderer::LogicMessageSelector) (unsigned index) |
|
staticprotected |