-void Block::sensor_event(unsigned addr, bool s)
-{
- if(addr==sensor_id)
- {
- if(s && state<MAYBE_ACTIVE)
- {
- state = MAYBE_ACTIVE;
- state_confirm_timeout = 300*Time::msec;
- signal_state_changed.emit(state);
- }
- else if(!s && state>MAYBE_INACTIVE)
- {
- state = MAYBE_INACTIVE;
- state_confirm_timeout = 700*Time::msec;
- signal_state_changed.emit(state);
- }
- }
-}
-