////////////////////////////////////////////////////////////////////////////
// Callback from DioBoard.
// Determine whether a quad switch is being pushed on the left (ON)
// or the right (OFF).
void QuadSwitch::dioChange (bool, DioDevice*, unsigned)
{
switch (classState) {
case IDLE:
{
const unsigned DEBOUNCE_DELAY_LENGTH = 25;
board->on(relayID);
delay (DEBOUNCE_DELAY_LENGTH);
notifyClients (board->in(pushID));
board->off(relayID);
delay (DEBOUNCE_DELAY_LENGTH);
Previous slide | Next slide | Back to first slide | View graphic version |