////////////////////////////////////////////////////////////////////////////
// Callback from LightSwitch.
void LightControl::lightSwitchChange (bool state, LightSwitch* )
{
// Look through the light list for light in the opposite condition
// as the state proposed.
for (int i=0; i
if ( board->in( lightList[i] ) != state )
break;
board->out (lightList[i], state); // Turn the light off or on.
}
Previous slide | Next slide | Back to first slide | View graphic version |