auto-sync
This commit is contained in:
parent
dea62e16f9
commit
7a39be6971
|
@ -58,7 +58,7 @@ typedef struct {
|
||||||
* Yes, I do not really enjoy packing bits into integers but we simply have too many boolean flags and I cannot
|
* Yes, I do not really enjoy packing bits into integers but we simply have too many boolean flags and I cannot
|
||||||
* water 4 bytes per traffic - I want gauges to work as fast as possible
|
* water 4 bytes per traffic - I want gauges to work as fast as possible
|
||||||
*/
|
*/
|
||||||
unsigned int hasSdCard : 1; // bit 0
|
unsigned int hasSdCard : 1; // bit 0, 72
|
||||||
unsigned int isIgnitionEnabled : 1; // bit 1
|
unsigned int isIgnitionEnabled : 1; // bit 1
|
||||||
unsigned int isInjectionEnabled : 1; // bit 2
|
unsigned int isInjectionEnabled : 1; // bit 2
|
||||||
unsigned int isCylinderCleanupEnabled : 1; // bit 3
|
unsigned int isCylinderCleanupEnabled : 1; // bit 3
|
||||||
|
@ -73,7 +73,7 @@ typedef struct {
|
||||||
unsigned int clutchDownState : 1; // bit 12
|
unsigned int clutchDownState : 1; // bit 12
|
||||||
unsigned int knockEverIndicator : 1; // bit 13
|
unsigned int knockEverIndicator : 1; // bit 13
|
||||||
unsigned int knockNowIndicator : 1; // bit 14
|
unsigned int knockNowIndicator : 1; // bit 14
|
||||||
float vehicleSpeedKph;
|
float vehicleSpeedKph; // 76
|
||||||
unsigned int isTpsError : 1; // bit 0
|
unsigned int isTpsError : 1; // bit 0
|
||||||
unsigned int isCltError : 1; // bit 1
|
unsigned int isCltError : 1; // bit 1
|
||||||
unsigned int isMapError : 1; // bit 2
|
unsigned int isMapError : 1; // bit 2
|
||||||
|
|
|
@ -185,11 +185,15 @@ static void printSensors(Logging *log, bool fileFormat) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
|
|
||||||
if (engineConfiguration->hasVehicleSpeedSensor) {
|
if (engineConfiguration->hasVehicleSpeedSensor) {
|
||||||
reportSensorF(log, fileFormat, "vss", "kph", getVehicleSpeed(), 2);
|
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
|
||||||
}
|
float vehicleSpeed = getVehicleSpeed();
|
||||||
|
#else
|
||||||
|
float vehicleSpeed = 0;
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
|
reportSensorF(log, fileFormat, "vss", "kph", vehicleSpeed, 2);
|
||||||
|
reportSensorF(log, fileFormat, "sp2rpm", "x", vehicleSpeed / rpm, 2);
|
||||||
|
}
|
||||||
|
|
||||||
reportSensorF(log, fileFormat, "knck_c", "count", engine->knockCount, 0);
|
reportSensorF(log, fileFormat, "knck_c", "count", engine->knockCount, 0);
|
||||||
reportSensorF(log, fileFormat, "knck_v", "v", engine->knockVolts, 2);
|
reportSensorF(log, fileFormat, "knck_v", "v", engine->knockVolts, 2);
|
||||||
|
|
|
@ -26,6 +26,8 @@ static int vssCounter = 0;
|
||||||
* @return vehicle speed, in kilometers per hour
|
* @return vehicle speed, in kilometers per hour
|
||||||
*/
|
*/
|
||||||
float getVehicleSpeed(void) {
|
float getVehicleSpeed(void) {
|
||||||
|
if (!engineConfiguration->hasVehicleSpeedSensor)
|
||||||
|
return 0;
|
||||||
efitick_t nowNt = getTimeNowNt();
|
efitick_t nowNt = getTimeNowNt();
|
||||||
if (nowNt - lastSignalTimeNt > US2NT(US_PER_SECOND_LL))
|
if (nowNt - lastSignalTimeNt > US2NT(US_PER_SECOND_LL))
|
||||||
return 0; // previous signal time is too long ago - we are stopped
|
return 0; // previous signal time is too long ago - we are stopped
|
||||||
|
|
|
@ -25,7 +25,6 @@ public enum Sensor {
|
||||||
MAFR("MAFR", SensorCategory.SENSOR_INPUTS, "kg/hr", 4),
|
MAFR("MAFR", SensorCategory.SENSOR_INPUTS, "kg/hr", 4),
|
||||||
TPS("throttle", SensorCategory.SENSOR_INPUTS, "%", 100),
|
TPS("throttle", SensorCategory.SENSOR_INPUTS, "%", 100),
|
||||||
PPS("pedal", SensorCategory.SENSOR_INPUTS, "%", 100),
|
PPS("pedal", SensorCategory.SENSOR_INPUTS, "%", 100),
|
||||||
VSS("Speed", SensorCategory.SENSOR_INPUTS, "kph", 100),
|
|
||||||
KS("Knock", SensorCategory.SENSOR_INPUTS, "count", 30),
|
KS("Knock", SensorCategory.SENSOR_INPUTS, "count", 30),
|
||||||
KV("Knock level", SensorCategory.SENSOR_INPUTS, "v", 6),
|
KV("Knock level", SensorCategory.SENSOR_INPUTS, "v", 6),
|
||||||
|
|
||||||
|
@ -93,6 +92,7 @@ public enum Sensor {
|
||||||
T_CHARGE(SensorCategory.FUEL, FieldType.FLOAT, 52, BackgroundColor.MUD, 30, 140),
|
T_CHARGE(SensorCategory.FUEL, FieldType.FLOAT, 52, BackgroundColor.MUD, 30, 140),
|
||||||
DWELL(SensorCategory.OPERATIONS, FieldType.FLOAT, 60, BackgroundColor.MUD, 1, 10),
|
DWELL(SensorCategory.OPERATIONS, FieldType.FLOAT, 60, BackgroundColor.MUD, 1, 10),
|
||||||
actualLastInjection(SensorCategory.FUEL, FieldType.FLOAT, 64, BackgroundColor.MUD, 0, 30, "ms"),
|
actualLastInjection(SensorCategory.FUEL, FieldType.FLOAT, 64, BackgroundColor.MUD, 0, 30, "ms"),
|
||||||
|
VSS(SensorCategory.OPERATIONS, FieldType.FLOAT, 76, BackgroundColor.BLUE),
|
||||||
CURRENT_VE(SensorCategory.FUEL, FieldType.FLOAT, 112, BackgroundColor.MUD),
|
CURRENT_VE(SensorCategory.FUEL, FieldType.FLOAT, 112, BackgroundColor.MUD),
|
||||||
|
|
||||||
deltaTps(SensorCategory.FUEL, FieldType.FLOAT, 116, BackgroundColor.MUD),
|
deltaTps(SensorCategory.FUEL, FieldType.FLOAT, 116, BackgroundColor.MUD),
|
||||||
|
@ -116,6 +116,7 @@ public enum Sensor {
|
||||||
|
|
||||||
RPM(SensorCategory.SENSOR_INPUTS, FieldType.INT, 0, BackgroundColor.RED, 0, 8000),
|
RPM(SensorCategory.SENSOR_INPUTS, FieldType.INT, 0, BackgroundColor.RED, 0, 8000),
|
||||||
TIME_SECONDS(SensorCategory.OPERATIONS, FieldType.INT, 224, BackgroundColor.MUD, 0, 5),
|
TIME_SECONDS(SensorCategory.OPERATIONS, FieldType.INT, 224, BackgroundColor.MUD, 0, 5),
|
||||||
|
SPEED2RPM(SensorCategory.SENSOR_INPUTS, FieldType.FLOAT, 232, BackgroundColor.MUD, 0, 5),
|
||||||
|
|
||||||
INJ_1_2_DELTA("inj 1-2 delta", SensorCategory.SNIFFING),
|
INJ_1_2_DELTA("inj 1-2 delta", SensorCategory.SNIFFING),
|
||||||
INJ_3_4_DELTA("inj 3-4 delta", SensorCategory.SNIFFING),
|
INJ_3_4_DELTA("inj 3-4 delta", SensorCategory.SNIFFING),
|
||||||
|
|
|
@ -33,6 +33,8 @@ public class SensorLogger {
|
||||||
Sensor.cltCorrection,
|
Sensor.cltCorrection,
|
||||||
Sensor.runningFuel,
|
Sensor.runningFuel,
|
||||||
Sensor.injectorLagMs,
|
Sensor.injectorLagMs,
|
||||||
|
Sensor.VSS,
|
||||||
|
Sensor.SPEED2RPM,
|
||||||
|
|
||||||
Sensor.MAF, Sensor.IAT};
|
Sensor.MAF, Sensor.IAT};
|
||||||
private static long fileStartTime;
|
private static long fileStartTime;
|
||||||
|
|
Loading…
Reference in New Issue