rusEFI console to use LogicdataStreamFile #5113

minor progress
This commit is contained in:
rusefillc 2023-02-20 17:53:11 -05:00
parent 60435b063a
commit be6e5cfd5f
1 changed files with 6 additions and 3 deletions

View File

@ -23,7 +23,7 @@ import static com.rusefi.binaryprotocol.IoHelper.checkResponseCode;
public class BinaryProtocolLogger {
private static final int HIGH_RPM_DELAY = Integer.getInteger("high_speed_logger_time", 10);
public static final int COMPOSITE_OFF_RPM = Integer.getInteger("high_speed_logger_rpm", 300);
public static final int COMPOSITE_OFF_RPM = Integer.getInteger("high_speed_logger_rpm", 700);
/**
* Composite logging turns off after 10 seconds of RPM above 300
@ -38,8 +38,11 @@ public class BinaryProtocolLogger {
private final Thread hook = new Thread(() -> closeComposites(), "BinaryProtocol::hook");
public BinaryProtocolLogger(LinkManager linkManager) {
rpmListener = value -> {
if (value <= COMPOSITE_OFF_RPM) {
rpmListener = currentRpm -> {
/**
* we only request and log composite logger at relatively low RPM
*/
if (currentRpm <= COMPOSITE_OFF_RPM) {
needCompositeLogger = linkManager.getCompositeLogicEnabled();
lastLowRpmTime = System.currentTimeMillis();
} else if (System.currentTimeMillis() - lastLowRpmTime > HIGH_RPM_DELAY * Timeouts.SECOND) {