parent
cb426863c9
commit
ef20cf8916
|
@ -231,7 +231,7 @@ public class BinaryProtocol {
|
|||
textListener.onDataArrived((text + "\r\n").getBytes());
|
||||
}
|
||||
if (linkManager.isNeedPullLiveData()) {
|
||||
LiveDocsRegistry.LiveDataProvider liveDataProvider = LiveDocsRegistry.getLiveDataProvider(BinaryProtocol.this);
|
||||
LiveDocsRegistry.LiveDataProvider liveDataProvider = LiveDocsRegistry.getLiveDataProvider();
|
||||
LiveDocsRegistry.INSTANCE.refresh(liveDataProvider);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.rusefi.ui.livedocs;
|
|||
|
||||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.config.Field;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
import com.rusefi.enums.live_data_e;
|
||||
import com.rusefi.ldmp.StateDictionary;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -46,7 +46,7 @@ public enum LiveDocsRegistry {
|
|||
}
|
||||
|
||||
@NotNull
|
||||
public static LiveDataProvider getLiveDataProvider(BinaryProtocol binaryProtocol) {
|
||||
public static LiveDataProvider getLiveDataProvider() {
|
||||
return context -> {
|
||||
Field[] values = StateDictionary.INSTANCE.getFields(context);
|
||||
int size = Field.getStructureSize(values);
|
||||
|
@ -54,13 +54,12 @@ public enum LiveDocsRegistry {
|
|||
putShort(packet, 0, swap16(context.ordinal())); // offset
|
||||
putShort(packet, 2, swap16(size));
|
||||
|
||||
byte[] responseWithCode = binaryProtocol.executeCommand(Fields.TS_GET_STRUCT, packet, "get LiveDoc");
|
||||
if (responseWithCode == null || responseWithCode.length != (size + 1) || responseWithCode[0] != Fields.TS_RESPONSE_OK)
|
||||
return null;
|
||||
int structOffset = StateDictionary.INSTANCE.getOffset(context);
|
||||
byte[] overallOutputs = SensorCentral.getInstance().getResponse();
|
||||
|
||||
byte[] response = new byte[size];
|
||||
|
||||
System.arraycopy(responseWithCode, 1, response, 0, size);
|
||||
System.arraycopy(overallOutputs, structOffset, overallOutputs, 0, size);
|
||||
return response;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.net.URL;
|
|||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class rusEFIVersion {
|
||||
public static final int CONSOLE_VERSION = 20220618;
|
||||
public static final int CONSOLE_VERSION = 20220625;
|
||||
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
||||
|
||||
public static long classBuildTimeMillis() {
|
||||
|
|
Loading…
Reference in New Issue