Class BlynkConfig

Class Documentation

class BlynkConfig

Configuration class for storing all Blynk related information.

Public Types

enum ColorSelector

possible selection options of the segmented switch responsible for selecting which color should be changed in the App

Values:

enumerator CHANGE_HOURS_COLOR
enumerator CHANGE_MINUTES_COLOR
enumerator CHANGE_INTERIOR_COLOR
enumerator CHANGE_DOT_COLOR

Public Functions

~BlynkConfig()

Destroy the Blynk Config object. Ensure proper deletion.

void setup()

to be called as part of the setup function

call Blynk.config and start the separate thread on the second core

Pre:

WIFI connection has to be established already by calling #wifiSetup before this method

void stop()

Stop the execution of Blynk.

Terminates the blynk task running on the second core.

void updateUI()

Call this if a UI update is needed Possible cases for this are that the timer ticked or was triggered or the alarm was triggered.

Notify the Blynk thread that a UI update is needed. What exactly needs to be updated will be figured out in the thread loop itself.

void changeSelection(ColorSelector selector, bool state)

Change the selection of the segmented switch responsible for selecting which color should be changed.

Figure out which changes have to be made in the UI to represent the correct state.

Public Members

uint8_t ColorSelection
CRGB InternalColor
CRGB HourColor
CRGB MinuteColor
CRGB DotColor
bool blynkUIUpdateRequired
DisplayManager *ShelfDisplays
bool isClearAction

Public Static Functions

static BlynkConfig *getInstance()

Get the Instance object. Use this to get an instance to the Blynk config singleton instead of its constructor.

Either instantiate a new BlynkConfig object by calling the private constructor and return it’s address or it an instance of it already exists just return that.

Returns:

BlynkConfig* pointer to the already existing or newly created BlynkConfig object.

Returns:

BlynkConfig* address of the new/already existing blynk config object