|
|
@ -686,17 +686,18 @@ public class Plan extends BaseClass{ |
|
|
|
|
|
|
|
|
|
|
|
public void sensor(int addr, boolean active) { |
|
|
|
public void sensor(int addr, boolean active) { |
|
|
|
Contact contact = Contact.get(addr); |
|
|
|
Contact contact = Contact.get(addr); |
|
|
|
|
|
|
|
if (active && learningContact != null) { |
|
|
|
if (isSet(contact)) { |
|
|
|
if (isSet(contact)) { |
|
|
|
contact.activate(active); |
|
|
|
contact.addr(0); |
|
|
|
} else { |
|
|
|
LOG.debug("unsibscribed {} from {}",contact,addr); |
|
|
|
LOG.debug("contact: {}", addr); |
|
|
|
|
|
|
|
if (active && learningContact != null) { |
|
|
|
|
|
|
|
LOG.debug("learned: {} = {}",addr,learningContact); |
|
|
|
|
|
|
|
stream(learningContact.addr(addr).propMenu().toString()); |
|
|
|
|
|
|
|
learningContact = null; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
stream(learningContact.addr(addr).propMenu().toString()); |
|
|
|
|
|
|
|
learningContact = null; |
|
|
|
|
|
|
|
LOG.debug("learned: {} = {}",addr,learningContact); |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isSet(contact)) contact.activate(active); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|