|
|
| JBWoprDevice () |
| | JBWoprDevice constructor.
|
| virtual bool | begin (JBWoprBoardVariant variant=JBWoprBoardVariant::ORIGINAL) |
| | Initialize JBWoprDevice.
|
| virtual bool | begin (JBWoprBoardVariant variant, JBWoprBoardPins pins) |
| | Initialize JBWoprDevice.
|
| virtual void | loop () |
| | JBWoprDevice loop.
|
|
JBWoprBoardVariant | getBoardVariant () |
| | Get W.O.P.R board variant.
|
| JBWoprConfiguration * | getConfiguration () |
| | Get current JBWoprDevice configuration.
|
| virtual void | setLogLevel (LogLevel level) |
| | Set log level.
|
| virtual LogLevel | getLogLevel () |
| | Get log level.
|
| void | effectsRegisterDefaultEffect (JBWoprEffectBase *effect) |
| | Register default effect.
|
| bool | effectsDefaultEffectIsRunning () |
| | Check if default effect is running.
|
| void | effectsRegisterEffect (JBWoprEffectBase *effect) |
| | Register effect.
|
| std::vector< JBWoprEffectBase * > | effectsGetRegisteredEffects () |
| | Get a list of registered effects.
|
| JBWoprEffectBase * | effectsGetCurrentEffect () |
| | Get current effect.
|
| virtual void | effectsStartCurrentEffect () |
| | Start current effect.
|
| virtual void | effectsStopCurrentEffect () |
| | Stop current effect.
|
| bool | effectsCurrentEffectIsRunning () |
| | Check if current effect is running.
|
| virtual void | effectsStartEffect (JBWoprEffectBase *effect) |
| | Start effect.
|
| virtual void | effectsStartEffect (const std::string &name) |
| | Start named effect.
|
| virtual void | effectsStartEffect (const char *name) |
| | Start named effect.
|
| std::array< Adafruit_AlphaNum4, 3 > | getDisplay () |
| | Get display.
|
| virtual void | displaySetState (bool state) |
| | Set display state.
|
| virtual void | displayClear () |
| | Clear display.
|
|
virtual void | displayShow () |
| | Force display to show current data.
|
| virtual void | displaySetBrightness (uint8_t val) |
| | Set display brightness percentage.
|
| virtual void | displaySetChar (uint8_t index, char chr) |
| | Set individual display character.
|
| virtual void | displayShowText (const char *text, JBTextAlignment alignment) |
| | Set display text.
|
| virtual void | displayShowText (const std::string &text, JBTextAlignment alignment) |
| | Set display text.
|
| virtual void | displayShowText (const String &text, JBTextAlignment alignment) |
| | Set display text.
|
| virtual void | displayShowText (const char *text) |
| | Set display text, left aligned.
|
| virtual void | displayShowText (const std::string &text) |
| | Set display text, left aligned.
|
| virtual void | displayShowText (const String &text) |
| | Set display text, left aligned.
|
| virtual void | displayScrollText (const char *text, uint16_t delay_ms) |
| | Set display scroll text.
|
| virtual void | displayScrollText (const String &text, uint16_t delay_ms) |
| | Set display scroll text.
|
| virtual void | displayScrollText (const std::string &text, uint16_t delay_ms) |
| | Set display scroll text.
|
| virtual void | displayScrollText (const char *text) |
| | Set display scroll text with a delay of 100 ms.
|
| virtual void | displayScrollText (const std::string &text) |
| | Set display scroll text with a delay of 100 ms.
|
| virtual void | displayScrollText (const String &text) |
| | Set display scroll text with a delay of 100 ms.
|
| Adafruit_NeoPixel * | getDefconLeds () |
| | Get DEFCON LEDs.
|
| virtual void | defconLedsSetState (bool state) |
| | Set DEFCON state.
|
| virtual void | defconLedsSetBrightness (uint8_t brightness) |
| | Set DEFCON LED's brightness level.
|
| virtual void | defconLedsSetDefconLevel (JBDefconLevel level) |
| | Set DEFCON level.
|
| virtual void | defconLedsSetColor (uint32_t color) |
| | Set all DEFCON LED's color.
|
|
virtual void | defconLedsClear () |
| | Clear all DEFCON LEDs.
|
| virtual void | defconLedSetColor (JBDefconLevel level, uint32_t color) |
| | Set individual DEFCON LED's color.
|
| virtual void | defconLedSetDefconStateColor (JBDefconLevel level, uint32_t color) |
| | Set color for a DEFCON level.
|
| void | audioPlayTone (const uint16_t freq) |
| | Play audio tone.
|
| void | audioPlayNote (note_t note, uint8_t octave) |
| | Play audio tone.
|
|
void | audioClear () |
| | Stop audio playback.
|
| OneButton * | getButtonFrontLeft () |
| | Get front left button OneButton instance.
|
| OneButton * | getButtonFrontRight () |
| | Get front right button OneButton instance.
|
| OneButton * | getButtonBackTop () |
| | Get back top button OneButton instance.
|
| OneButton * | getButtonBackBottom () |
| | Get back bottom button OneButton instance.
|
| virtual void | buttonFrontLeftSetClickCallback (std::function< void()> func) |
| | Set front left button click callback.
|
| virtual void | buttonFrontLeftSetDoubleClickCallback (std::function< void()> func) |
| | Set front left button double click callback.
|
| virtual void | buttonFrontRightSetClickCallback (std::function< void()> func) |
| | Set front right button click callback.
|
| virtual void | buttonFrontRightSetDoubleClickCallback (std::function< void()> func) |
| | Set front right button double click callback.
|
| virtual void | buttonBackTopSetClickCallback (std::function< void()> func) |
| | Set back top button click callback.
|
| virtual void | buttonBackTopSetDoubleClickCallback (std::function< void()> func) |
| | Set back top button double click callback.
|
| virtual void | buttonBackBottomSetClickCallback (std::function< void()> func) |
| | Set back top button long press callback.
|
| virtual void | buttonBackBottomSetDoubleClickCallback (std::function< void()> func) |
| | Set back bottom button double click callback.
|
|
|
static void | _staticButtonFrontLeftClickCallback (void *data) |
| | Front left button internal click callback.
|
|
static void | _staticButtonFrontLeftDoubleClickCallback (void *data) |
| | Front left button internal double click callback.
|
|
static void | _staticButtonFrontRightClickCallback (void *data) |
| | Front right button internal click callback.
|
|
static void | _staticButtonFrontRightDoubleClickCallback (void *data) |
| | Front right button internal double click callback.
|
|
static void | _staticButtonBackTopClickCallback (void *data) |
| | Back top button internal click callback.
|
|
static void | _staticButtonBackTopDoubleClickCallback (void *data) |
| | Back top button internal double click callback.
|
|
static void | _staticButtonBackBottomClickCallback (void *data) |
| | Back bottom button internal click callback.
|
|
static void | _staticButtonBackBottomDoubleClickCallback (void *data) |
| | Back bottom button internal double click callback.
|
|
|
JBWoprBoardVariant | _woprVariant |
| | W.O.P.R. board version.
|
|
JBWoprConfiguration | _config |
| | JBWoprDevice configuration.
|
|
JBWoprBoardPins | _pins |
| | W.O.P.R. board pin assignements.
|
|
JBWoprEffectBase * | _defaultEffect = nullptr |
| | Default effect.
|
|
std::vector< JBWoprEffectBase * > | _effects |
| | Effects.
|
|
JBWoprEffectBase * | _currentEffect = nullptr |
| | Current effect.
|
|
uint32_t | _effectsCounter = 0 |
| | Effects counter.
|
|
std::array< Adafruit_AlphaNum4, 3 > | _display |
| | Display.
|
|
bool | _displayState = true |
| | Display state.
|
|
uint32_t | _displayBrightness = 100 |
| | Display brightness.
|
|
Adafruit_NeoPixel | _defconLeds = Adafruit_NeoPixel(5, 1, NEO_GRB + NEO_KHZ800) |
| | DEFCON LEDs.
|
|
bool | _defconState = true |
| | DEFCON state.
|
|
JBDefconLevel | _defconLevel = JBDefconLevel::DEFCON_NONE |
| | DEFCON level.
|
|
uint32_t | _defconColors [5] |
| | DEFCON colors.
|
|
uint32_t | _defconBrightness = 100 |
| | DEFCON brightness.
|
|
uint32_t | _defconLedsColor = 0 |
| | DEFCON LED's color.
|
|
uint32_t | _defconPixels [5] { 0,0,0,0,0} |
| | DEFCON buffered pixel colors.
|
|
uint32_t | _defconBrigthtness = 100 |
| | DEFCON brightness.
|
|
OneButton * | _buttonFrontLeft |
| | Front left button.
|
|
OneButton * | _buttonFrontRight |
| | Front right button.
|
|
OneButton * | _buttonBackTop |
| | Back to.
|
|
OneButton * | _buttonBackBottom |
| | Back bottom button.
|
|
std::function< void()> | _buttonFrontLeftClickCallback |
| | Front left button click callback.
|
|
std::function< void()> | _buttonFrontLeftDoubleClickCallback |
| | Front left button double click callback.
|
|
std::function< void()> | _buttonFrontRightClickCallback |
| | Front right button click callback.
|
|
std::function< void()> | _buttonFrontRightDoubleClickCallback |
| | Front right button double click callback.
|
|
std::function< void()> | _buttonBackTopClickCallback |
| | Back top button click callback.
|
|
std::function< void()> | _buttonBackTopDoubleClickCallback |
| | Back top button double click callback.
|
|
std::function< void()> | _buttonBackBottomClickCallback |
| | Back bottom button click callback.
|
|
std::function< void()> | _buttonBackBottomDoubleClickCallback |
| | Back bottom button double click callback.
|
|
bool | _useDAC = false |
| | Use DAC.
|
|
int | _audioFreq = 2000 |
| | Audio frequency.
|
|
int | _audioChannel = 0 |
| | Audio channel.
|
|
int | _audioResolution = 8 |
| | Audio resolution.
|
W.O.P.R. device base class.
This class contains all the base functionality for the W.O.P.R.
This class can be used as is, or as a base class for your own W.O.P.R. device. It exposes convenient methods for controlling the display, DEFCON LEDs, audio and buttons. It also contains a simple effects system that can be used to create your own effects.