new debug field to show PID period
This commit is contained in:
parent
e5534d79b7
commit
dfd6a1e98a
|
@ -496,7 +496,13 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
|||
} else if (sensor.getType() == FieldType.INT) {
|
||||
int value = bb.getInt();
|
||||
SensorCentral.getInstance().setValue(value, sensor);
|
||||
}
|
||||
} else if (sensor.getType() == FieldType.INT16) {
|
||||
int value = bb.getInt() & 0xFFFF;
|
||||
SensorCentral.getInstance().setValue(value, sensor);
|
||||
} else if (sensor.getType() == null) {
|
||||
// do nothing for old text sensors which I am suprised are still in the code
|
||||
} else
|
||||
throw new UnsupportedOperationException("type " + sensor.getType());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.rusefi.config;
|
|||
|
||||
public enum FieldType {
|
||||
INT,
|
||||
INT16,
|
||||
BIT,
|
||||
FLOAT;
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.rusefi.core;
|
|||
import com.rusefi.config.FieldType;
|
||||
import com.rusefi.config.Fields;
|
||||
import eu.hansolo.steelseries.tools.BackgroundColor;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
|
@ -113,7 +114,7 @@ public enum Sensor {
|
|||
deltaTps(SensorCategory.FUEL, FieldType.FLOAT, 116, BackgroundColor.MUD),
|
||||
engineLoadAccelDelta(SensorCategory.FUEL, FieldType.FLOAT, 124, BackgroundColor.MUD),
|
||||
tpsAccelFuel(Fields.GAUGE_NAME_FUEL_TPS_EXTRA, SensorCategory.FUEL, FieldType.FLOAT, 128, BackgroundColor.MUD),
|
||||
PPS("pedal", SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, 126, BackgroundColor.MUD), // pedal position sensor
|
||||
PPS("pedal", SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, 136, BackgroundColor.MUD), // pedal position sensor
|
||||
|
||||
injectorDutyCycle(Fields.GAUGE_NAME_FUEL_INJ_DUTY, SensorCategory.OPERATIONS, FieldType.FLOAT, 140, BackgroundColor.MUD),
|
||||
wallFuelAmount(SensorCategory.FUEL, FieldType.FLOAT, 160, BackgroundColor.MUD),
|
||||
|
@ -148,6 +149,9 @@ public enum Sensor {
|
|||
debugFloatField7(GAUGE_NAME_DEBUG_F7, SensorCategory.OPERATIONS, FieldType.FLOAT, 260, BackgroundColor.MUD, 0, 5),
|
||||
coilDutyCycle(Fields.GAUGE_NAME_DWELL_DUTY, SensorCategory.OPERATIONS, FieldType.FLOAT, 272, BackgroundColor.MUD),
|
||||
|
||||
debugIntField4("debug i4", SensorCategory.OPERATIONS, FieldType.INT16, 292, BackgroundColor.MUD, 0, 5),
|
||||
debugIntField5("debug i5", SensorCategory.OPERATIONS, FieldType.INT16, 294, BackgroundColor.MUD, 0, 5),
|
||||
|
||||
INJ_1_2_DELTA("inj 1-2 delta", SensorCategory.SNIFFING),
|
||||
INJ_3_4_DELTA("inj 3-4 delta", SensorCategory.SNIFFING),
|
||||
;
|
||||
|
@ -158,6 +162,7 @@ public enum Sensor {
|
|||
private final double minValue;
|
||||
private final double maxValue;
|
||||
private final BackgroundColor color;
|
||||
@Nullable
|
||||
private final FieldType type;
|
||||
private final int offset;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20181007;
|
||||
public static final int CONSOLE_VERSION = 20181010;
|
||||
public static final boolean SHOW_STIMULATOR = false;
|
||||
private static final String TAB_INDEX = "main_tab";
|
||||
protected static final String PORT_KEY = "port";
|
||||
|
|
|
@ -79,6 +79,8 @@ public class SensorLogger {
|
|||
Sensor.debugIntField1,
|
||||
Sensor.debugIntField2,
|
||||
Sensor.debugIntField3,
|
||||
Sensor.debugIntField4,
|
||||
Sensor.debugIntField5,
|
||||
|
||||
Sensor.errorCodeCounter,
|
||||
Sensor.lastErrorCode,
|
||||
|
@ -194,6 +196,12 @@ public class SensorLogger {
|
|||
if (sensor == Sensor.debugIntField2 && isPidDebugMode(debugMode)) {
|
||||
return "PID: offset";
|
||||
}
|
||||
if (sensor == Sensor.debugIntField3 && isPidDebugMode(debugMode)) {
|
||||
return "PID: counter";
|
||||
}
|
||||
if (sensor == Sensor.debugIntField4 && isPidDebugMode(debugMode)) {
|
||||
return "PID: period";
|
||||
}
|
||||
return sensor.getName();
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,15 @@ public class EtbTestSequence {
|
|||
|
||||
static {
|
||||
FIRST_STEP
|
||||
.addNext(5 * SECOND, 30)
|
||||
.addNext(10 * SECOND, 50);
|
||||
.addNext(5 * SECOND, 10)
|
||||
.addNext(10 * SECOND, 30)
|
||||
.addNext(10 * SECOND, 50)
|
||||
.addNext(10 * SECOND, 70)
|
||||
.addNext(10 * SECOND, 100)
|
||||
.addNext(10 * SECOND, 50)
|
||||
.addNext(10 * SECOND, 70)
|
||||
.addNext(10 * SECOND, 0)
|
||||
;
|
||||
}
|
||||
|
||||
public EtbTestSequence() {
|
||||
|
|
Loading…
Reference in New Issue