Fixed recursive issue with dummy event and reduce update time for gui selections
This commit is contained in:
parent
5e31cea660
commit
9e58387ef7
2 changed files with 4 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ import java.util.logging.Logger;
|
||||||
public class ConfigEventValueProvider implements Configurator.ConfigValueProvider<Event> {
|
public class ConfigEventValueProvider implements Configurator.ConfigValueProvider<Event> {
|
||||||
private static final Logger logger = LogUtil.getLogger();
|
private static final Logger logger = LogUtil.getLogger();
|
||||||
|
|
||||||
protected static int DEVICE_REFRESH_TIME_IN_SECONDS = 30;
|
protected static int DEVICE_REFRESH_TIME_IN_SECONDS = 3;
|
||||||
|
|
||||||
private Map<String, Event> events = new HashMap<>();
|
private Map<String, Event> events = new HashMap<>();
|
||||||
private Timer updateTimer = new Timer(DEVICE_REFRESH_TIME_IN_SECONDS * 1000);
|
private Timer updateTimer = new Timer(DEVICE_REFRESH_TIME_IN_SECONDS * 1000);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ import se.hal.plugin.dummy.DummyController;
|
||||||
import se.hal.plugin.dummy.DummyDevice;
|
import se.hal.plugin.dummy.DummyDevice;
|
||||||
import se.hal.struct.devicedata.OnOffEventData;
|
import se.hal.struct.devicedata.OnOffEventData;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class DummySwitchEvent implements DummyDevice, HalEventConfig {
|
public class DummySwitchEvent implements DummyDevice, HalEventConfig {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -32,6 +34,6 @@ public class DummySwitchEvent implements DummyDevice, HalEventConfig {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
return this.equals(obj);
|
return super.equals(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue