Helper class to manage passive connection to DumbDisplay. The only method that should be called in void loop() {}
is DDPassiveConnectionHelper::loop(), passing to it some callbacks Note that it will call DumbDisplay::masterReset() when reconnected (i.e. lost previous connection)
More...
#include <_dd_misc.h>
Helper class to manage passive connection to DumbDisplay. The only method that should be called in void loop() {}
is DDPassiveConnectionHelper::loop(), passing to it some callbacks Note that it will call DumbDisplay::masterReset() when reconnected (i.e. lost previous connection)
- Since
- v0.9.9
◆ DDMasterResetPassiveConnectionHelper()
DDMasterResetPassiveConnectionHelper::DDMasterResetPassiveConnectionHelper |
( |
DumbDisplay & |
dumbdisplay, |
|
|
bool |
saveAndPlaybackWhenInit = false |
|
) |
| |
|
inline |
◆ loop()
bool DDMasterResetPassiveConnectionHelper::loop |
( |
void(*)() |
initializeCallback, |
|
|
void(*)() |
updateCallback, |
|
|
void(*)() |
disconnectedCallback = NULL |
|
) |
| |
|
inline |
- Parameters
-
initializeCallback | called after DumbDisplay is connected (or reconnected) |
updateCallback | called to update DumbDisplay components |
disconnectedCallback | called after "master reset" DumbDisplay, i.e. lost previous connection |
◆ masterReset()
void DDMasterResetPassiveConnectionHelper::masterReset |
( |
| ) |
|
|
inline |
normally, "master reset" will be called automatically when lost connection; but can be called explicitly; note that if called explicitly, will not call disconnectedCallback; IMPORTANT: should only call it in updateCallback, and after calling it, should return immediately