fixed hidden ping issue and battery/wifi indicator issues
This commit is contained in:
parent
8985843c66
commit
f179a4b25e
4 changed files with 13 additions and 6 deletions
|
@ -100,8 +100,7 @@ public class ClientConnectionData {
|
|||
while (i1.hasNext()) {
|
||||
final IndicatorValue iv1 = i1.next();
|
||||
final IndicatorValue iv2 = i2.next();
|
||||
if (iv1.getIndicatorId().longValue() != iv2.getIndicatorId().longValue() ||
|
||||
Math.abs(iv1.getValue() - iv2.getValue()) > 0.1) {
|
||||
if (!iv1.dataEquals(iv2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,4 +38,15 @@ public interface IndicatorValue extends IndicatorValueHolder {
|
|||
}
|
||||
}
|
||||
|
||||
default boolean dataEquals(final IndicatorValue other) {
|
||||
final Long i1 = getIndicatorId();
|
||||
final Long i2 = other.getIndicatorId();
|
||||
if (i1 != null && i2 != null) {
|
||||
if (i1.longValue() != i2.longValue() || Math.abs(this.getValue() - other.getValue()) > 0.1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public class ClientIndicatorFactory {
|
|||
.getBean(PingIntervalClientIndicator.class);
|
||||
pingIndicator.setHidden();
|
||||
final Indicator indicator = new Indicator(
|
||||
null,
|
||||
-1L,
|
||||
clientConnection.examId,
|
||||
"hidden_ping_indicator",
|
||||
IndicatorType.LAST_PING,
|
||||
|
|
|
@ -54,9 +54,6 @@ public abstract class AbstractLogNumberIndicator extends AbstractLogIndicator {
|
|||
}
|
||||
|
||||
private void valueChanged(final String text, final double value) {
|
||||
|
||||
this.currentValue = getValue() + 1d;
|
||||
|
||||
if (this.tags == null || this.tags.length == 0 || hasTag(text)) {
|
||||
if (super.ditributedIndicatorValueRecordId != null) {
|
||||
if (!this.distributedPingCache.updateIndicatorValueAsync(
|
||||
|
|
Loading…
Reference in a new issue