65 int16_t screenWidth = 0;
66 int16_t screenHeight = 0;
74 knobObjects =
new BindKnob*[MAX_HANDLERS];
81 for (
int i = 0; i < MAX_HANDLERS; ++i)
84 switchObjects[i] =
nullptr;
85 buttonObjects[i] =
nullptr;
86 knobObjects[i] =
nullptr;
87 seekBarObjects[i] =
nullptr;
88 joystickObjects[i] =
nullptr;
89 colorPickerObjects[i] =
nullptr;
90 textInputObjects[i] =
nullptr;
91 dialogObjects[i] =
nullptr;
105 Bind(
void (*_setupCallback)(int16_t, int16_t)) :
Bind()
107 setupCallback = _setupCallback;
120 return isInitialized;
145 bool init(Stream &stream,
void (&setupCallback)(int16_t, int16_t));
179 void sync(
const uint8_t *buffer,
size_t size);
208 void sync(
const char *str, int32_t textColor,
bool autoScroll,
bool newLine,
bool bold,
bool italic,
BindTerminal &obj);
311 uint8_t bufFrame[MAX_DATA_LENGHT];
312 uint8_t frameTXBuffer[MAX_DATA_LENGHT + 6];
318 uint32_t deltaMs = 0;
328 uint8_t buttonIndex = 1;
329 uint8_t dialKnobIndex = 1;
330 uint8_t switchIndex = 1;
331 uint8_t seekBarIndex = 1;
332 uint8_t joystickHandlerIndex = 1;
333 uint8_t colorPickerHandlerIndex = 1;
334 uint8_t textInputHandlerIndex = 1;
335 bool isInitialized =
false;
336 void (*setupCallback)(int16_t, int16_t);
337 bool internalInit(Stream *stream,
void (*setupCallback)(int16_t, int16_t));
338 void screenInit(int16_t w, int16_t h);
339 Stream *bindStream = NULL;
340 void updateScreen(uint8_t inp);
341 void updateScreen(Stream *stream);
342 void updateScreenInternal(uint8_t *dataFrame, uint16_t dataLen);
343 void updateJoystick(uint8_t tag, int16_t valX, int16_t valY);
344 void updateColorPicker(uint8_t tag, uint8_t r, uint8_t g, uint8_t b);
345 void updateSeekBar(uint8_t tag, int16_t val);
346 void knobChanged(int8_t tag,
int val);
347 void clickButton(uint8_t tag);
348 void updateSwitch(uint8_t tag,
bool val);
349 void updateTextInput(uint8_t tag,
const char *val, uint8_t length);
350 void dialogResult(uint8_t tag,
bool result,
const char *text, uint8_t length);
bool init(Stream &stream, void(&setupCallback)(int16_t, int16_t))
Initializes the Bind framework with communication and screen setup.
Definition Bind.cpp:23
Bind(void(*_setupCallback)(int16_t, int16_t))
Constructs a Bind object with a setup callback function.
Definition Bind.h:105