Live Data: trigger current gap
This commit is contained in:
parent
98a391011a
commit
f32b29f318
|
@ -270,8 +270,10 @@ static const void * getStructAddr(int structId) {
|
|||
return static_cast<engine_state2_s*>(&engine->engineState);
|
||||
case LDS_FUEL_TRIM_STATE_INDEX:
|
||||
return static_cast<wall_fuel_state*>(&engine->wallFuel);
|
||||
case LDS_TRIGGER_STATE_INDEX:
|
||||
case LDS_TRIGGER_CENTRAL_STATE_INDEX:
|
||||
return static_cast<trigger_central_s*>(&engine->triggerCentral);
|
||||
case LDS_TRIGGER_STATE_STATE_INDEX:
|
||||
return static_cast<trigger_state_s*>(&engine->triggerCentral.triggerState);
|
||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||
case LDS_ETB_PID_STATE_INDEX:
|
||||
return static_cast<pid_state_s*>(&etbPid);
|
||||
|
|
|
@ -816,6 +816,6 @@ int getRusEfiVersion(void) {
|
|||
if (initBootloader() != 0)
|
||||
return 123;
|
||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||
return 20190902;
|
||||
return 20190903;
|
||||
}
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
|
|
@ -1334,6 +1334,8 @@
|
|||
#define knockVThreshold_offset_hex 5e8
|
||||
#define lcdThreadPeriodMs_offset 720
|
||||
#define lcdThreadPeriodMs_offset_hex 2d0
|
||||
#define LDS_ALTERNATOR_PID_STATE_INDEX 9
|
||||
#define LDS_CJ125_PID_STATE_INDEX 10
|
||||
#define LDS_CLT_STATE_INDEX 0
|
||||
#define LDS_ENGINE_STATE_INDEX 3
|
||||
#define LDS_ETB_PID_STATE_INDEX 7
|
||||
|
@ -1342,7 +1344,8 @@
|
|||
#define LDS_IDLE_PID_STATE_INDEX 8
|
||||
#define LDS_SPEED_DENSITY_STATE_INDEX 2
|
||||
#define LDS_TPS_TPS_ENEICHMENT_STATE_INDEX 5
|
||||
#define LDS_TRIGGER_STATE_INDEX 6
|
||||
#define LDS_TRIGGER_CENTRAL_STATE_INDEX 6
|
||||
#define LDS_TRIGGER_STATE_STATE_INDEX 11
|
||||
#define LE_COMMAND_LENGTH 200
|
||||
#define LIS302DLCsPin_offset 2043
|
||||
#define LIS302DLCsPin_offset_hex 7fb
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_state.txt Mon Sep 02 20:41:37 EDT 2019
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Tue Sep 03 19:14:15 EDT 2019
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#ifndef CONTROLLERS_GENERATED_TRIGGER_GENERATED_H
|
||||
#define CONTROLLERS_GENERATED_TRIGGER_GENERATED_H
|
||||
#ifndef CONTROLLERS_GENERATED_TRIGGER_CENTRAL_GENERATED_H
|
||||
#define CONTROLLERS_GENERATED_TRIGGER_CENTRAL_GENERATED_H
|
||||
#include "rusefi_types.h"
|
||||
#define HW_EVENT_TYPES 6
|
||||
// start of trigger_central_s
|
||||
|
@ -31,4 +31,4 @@ typedef struct trigger_central_s trigger_central_s;
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_state.txt Mon Sep 02 20:41:37 EDT 2019
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Tue Sep 03 19:14:15 EDT 2019
|
|
@ -0,0 +1,20 @@
|
|||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_state.txt Tue Sep 03 19:14:16 EDT 2019
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#ifndef CONTROLLERS_GENERATED_TRIGGER_STATE_GENERATED_H
|
||||
#define CONTROLLERS_GENERATED_TRIGGER_STATE_GENERATED_H
|
||||
#include "rusefi_types.h"
|
||||
// start of trigger_state_s
|
||||
struct trigger_state_s {
|
||||
/**
|
||||
* offset 0
|
||||
*/
|
||||
float currentGap = (float)0;
|
||||
/** total size 4*/
|
||||
};
|
||||
|
||||
typedef struct trigger_state_s trigger_state_s;
|
||||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_state.txt Tue Sep 03 19:14:16 EDT 2019
|
|
@ -11,7 +11,7 @@
|
|||
#include "rusefi_enums.h"
|
||||
#include "listener_array.h"
|
||||
#include "trigger_decoder.h"
|
||||
#include "trigger_generated.h"
|
||||
#include "trigger_central_generated.h"
|
||||
|
||||
class Engine;
|
||||
typedef void (*ShaftPositionListener)(trigger_event_e signal, uint32_t index DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
|
|
@ -487,7 +487,12 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|
|||
bool isSynchronizationPoint;
|
||||
bool wasSynchronized = shaft_is_synchronized;
|
||||
|
||||
DISPLAY_STATE(Trigger)
|
||||
DISPLAY_STATE(Trigger_State)
|
||||
DISPLAY_TEXT(Current_Gap);
|
||||
DISPLAY(DISPLAY_FIELD(currentGap));
|
||||
DISPLAY_TEXT(EOL);
|
||||
|
||||
DISPLAY_STATE(Trigger_Central)
|
||||
DISPLAY(DISPLAY_CONFIG(TRIGGERINPUTPINS1));
|
||||
DISPLAY_TEXT(Trigger_1_Fall);
|
||||
DISPLAY(DISPLAY_FIELD(HWEVENTCOUNTERS1));
|
||||
|
@ -511,8 +516,9 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|
|||
if (triggerShape->isSynchronizationNeeded) {
|
||||
// this is getting a little out of hand, any ideas?
|
||||
|
||||
currentGap = 1.0 * toothDurations[0] / toothDurations[1];
|
||||
|
||||
if (CONFIG(debugMode) == DBG_TRIGGER_SYNC) {
|
||||
float currentGap = 1.0 * toothDurations[0] / toothDurations[1];
|
||||
#if EFI_TUNER_STUDIO
|
||||
tsOutputChannels.debugFloatField1 = currentGap;
|
||||
tsOutputChannels.debugFloatField2 = currentCycle.current_index;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "global.h"
|
||||
#include "trigger_structure.h"
|
||||
#include "engine_configuration.h"
|
||||
#include "trigger_state_generated.h"
|
||||
|
||||
class TriggerState;
|
||||
|
||||
|
@ -44,7 +45,7 @@ typedef struct {
|
|||
/**
|
||||
* @see TriggerShape for trigger wheel shape definition
|
||||
*/
|
||||
class TriggerState {
|
||||
class TriggerState : public trigger_state_s {
|
||||
public:
|
||||
TriggerState();
|
||||
/**
|
||||
|
|
|
@ -20,11 +20,17 @@ java -DSystemOut.name=gen_config2 ^
|
|||
-java_destination ../java_console/models/src/com/rusefi/config/generated/ThermistorState.java ^
|
||||
-c_destination controllers/generated/thermistor_generated.h
|
||||
|
||||
java -DSystemOut.name=gen_config2 ^
|
||||
-jar ../java_tools/ConfigDefinition.jar ^
|
||||
-definition integration/trigger_central.txt ^
|
||||
-java_destination ../java_console/models/src/com/rusefi/config/generated/TriggerCentral.java ^
|
||||
-c_destination controllers/generated/trigger_central_generated.h
|
||||
|
||||
java -DSystemOut.name=gen_config2 ^
|
||||
-jar ../java_tools/ConfigDefinition.jar ^
|
||||
-definition integration/trigger_state.txt ^
|
||||
-java_destination ../java_console/models/src/com/rusefi/config/generated/TriggerState.java ^
|
||||
-c_destination controllers/generated/trigger_generated.h
|
||||
-c_destination controllers/generated/trigger_state_generated.h
|
||||
|
||||
java -DSystemOut.name=gen_config2 ^
|
||||
-jar ../java_tools/ConfigDefinition.jar ^
|
||||
|
|
|
@ -1166,9 +1166,12 @@ end_struct
|
|||
#define LDS_ENGINE_STATE_INDEX 3
|
||||
#define LDS_FUEL_TRIM_STATE_INDEX 4
|
||||
#define LDS_TPS_TPS_ENEICHMENT_STATE_INDEX 5
|
||||
#define LDS_TRIGGER_STATE_INDEX 6
|
||||
#define LDS_TRIGGER_CENTRAL_STATE_INDEX 6
|
||||
#define LDS_ETB_PID_STATE_INDEX 7
|
||||
#define LDS_IDLE_PID_STATE_INDEX 8
|
||||
#define LDS_ALTERNATOR_PID_STATE_INDEX 9
|
||||
#define LDS_CJ125_PID_STATE_INDEX 10
|
||||
#define LDS_TRIGGER_STATE_STATE_INDEX 11
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#define HW_EVENT_TYPES 6
|
||||
|
||||
struct_no_prefix define_constructor trigger_central_s
|
||||
|
||||
int[HW_EVENT_TYPES iterate] hwEventCounters;
|
||||
|
||||
int vvtCamCounter
|
||||
|
||||
int vvtEventRiseCounter
|
||||
int vvtEventFallCounter
|
||||
|
||||
|
||||
end_struct
|
||||
|
|
@ -1,13 +1,3 @@
|
|||
#define HW_EVENT_TYPES 6
|
||||
|
||||
struct_no_prefix define_constructor trigger_central_s
|
||||
|
||||
int[HW_EVENT_TYPES iterate] hwEventCounters;
|
||||
|
||||
int vvtCamCounter
|
||||
|
||||
int vvtEventRiseCounter
|
||||
int vvtEventFallCounter
|
||||
|
||||
|
||||
end_struct
|
||||
struct_no_prefix trigger_state_s
|
||||
float currentGap;
|
||||
end_struct
|
|
@ -22,9 +22,12 @@ public enum StateDictionary {
|
|||
register(Fields.LDS_ENGINE_STATE_INDEX, EngineState.VALUES); // 3
|
||||
register(Fields.LDS_FUEL_TRIM_STATE_INDEX, EngineState.VALUES);
|
||||
register(Fields.LDS_TPS_TPS_ENEICHMENT_STATE_INDEX, EngineState.VALUES); // 5
|
||||
register(Fields.LDS_TRIGGER_STATE_INDEX, TriggerState.VALUES);
|
||||
register(Fields.LDS_TRIGGER_CENTRAL_STATE_INDEX, TriggerCentral.VALUES);
|
||||
register(Fields.LDS_ETB_PID_STATE_INDEX, PidState.VALUES); // 7
|
||||
register(Fields.LDS_IDLE_PID_STATE_INDEX, PidState.VALUES);
|
||||
// LDS_ALTERNATOR_PID_STATE_INDEX
|
||||
// LDS_CJ125_PID_STATE_INDEX
|
||||
register(Fields.LDS_TRIGGER_STATE_STATE_INDEX, TriggerState.VALUES); // 11
|
||||
}
|
||||
|
||||
private void register(int ldsIndex, Field[] values) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Sep 03 18:55:21 EDT 2019
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Sep 03 19:18:06 EDT 2019
|
||||
|
||||
// by class com.rusefi.output.JavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
@ -875,6 +875,8 @@ public class Fields {
|
|||
public static final int knockNoiseRpmBins_offset = 1852;
|
||||
public static final int knockVThreshold_offset = 1512;
|
||||
public static final int lcdThreadPeriodMs_offset = 720;
|
||||
public static final int LDS_ALTERNATOR_PID_STATE_INDEX = 9;
|
||||
public static final int LDS_CJ125_PID_STATE_INDEX = 10;
|
||||
public static final int LDS_CLT_STATE_INDEX = 0;
|
||||
public static final int LDS_ENGINE_STATE_INDEX = 3;
|
||||
public static final int LDS_ETB_PID_STATE_INDEX = 7;
|
||||
|
@ -883,7 +885,8 @@ public class Fields {
|
|||
public static final int LDS_IDLE_PID_STATE_INDEX = 8;
|
||||
public static final int LDS_SPEED_DENSITY_STATE_INDEX = 2;
|
||||
public static final int LDS_TPS_TPS_ENEICHMENT_STATE_INDEX = 5;
|
||||
public static final int LDS_TRIGGER_STATE_INDEX = 6;
|
||||
public static final int LDS_TRIGGER_CENTRAL_STATE_INDEX = 6;
|
||||
public static final int LDS_TRIGGER_STATE_STATE_INDEX = 11;
|
||||
public static final int LE_COMMAND_LENGTH = 200;
|
||||
public static final int LIS302DLCsPin_offset = 2043;
|
||||
public static final int logFormat_offset = 496;
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Tue Sep 03 19:14:15 EDT 2019
|
||||
|
||||
// by class com.rusefi.output.JavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
||||
public class TriggerCentral {
|
||||
public static final int HW_EVENT_TYPES = 6;
|
||||
public static final Field HWEVENTCOUNTERS1 = Field.create("HWEVENTCOUNTERS1", 0, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS2 = Field.create("HWEVENTCOUNTERS2", 4, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS3 = Field.create("HWEVENTCOUNTERS3", 8, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS4 = Field.create("HWEVENTCOUNTERS4", 12, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS5 = Field.create("HWEVENTCOUNTERS5", 16, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS6 = Field.create("HWEVENTCOUNTERS6", 20, FieldType.INT);
|
||||
public static final Field VVTCAMCOUNTER = Field.create("VVTCAMCOUNTER", 24, FieldType.INT);
|
||||
public static final Field VVTEVENTRISECOUNTER = Field.create("VVTEVENTRISECOUNTER", 28, FieldType.INT);
|
||||
public static final Field VVTEVENTFALLCOUNTER = Field.create("VVTEVENTFALLCOUNTER", 32, FieldType.INT);
|
||||
public static final Field[] VALUES = {
|
||||
HWEVENTCOUNTERS1,
|
||||
HWEVENTCOUNTERS2,
|
||||
HWEVENTCOUNTERS3,
|
||||
HWEVENTCOUNTERS4,
|
||||
HWEVENTCOUNTERS5,
|
||||
HWEVENTCOUNTERS6,
|
||||
VVTCAMCOUNTER,
|
||||
VVTEVENTRISECOUNTER,
|
||||
VVTEVENTFALLCOUNTER,
|
||||
};
|
||||
}
|
|
@ -1,30 +1,13 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_state.txt Mon Sep 02 20:41:37 EDT 2019
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_state.txt Tue Sep 03 19:14:16 EDT 2019
|
||||
|
||||
// by class com.rusefi.output.JavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
||||
public class TriggerState {
|
||||
public static final int HW_EVENT_TYPES = 6;
|
||||
public static final Field HWEVENTCOUNTERS1 = Field.create("HWEVENTCOUNTERS1", 0, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS2 = Field.create("HWEVENTCOUNTERS2", 4, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS3 = Field.create("HWEVENTCOUNTERS3", 8, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS4 = Field.create("HWEVENTCOUNTERS4", 12, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS5 = Field.create("HWEVENTCOUNTERS5", 16, FieldType.INT);
|
||||
public static final Field HWEVENTCOUNTERS6 = Field.create("HWEVENTCOUNTERS6", 20, FieldType.INT);
|
||||
public static final Field VVTCAMCOUNTER = Field.create("VVTCAMCOUNTER", 24, FieldType.INT);
|
||||
public static final Field VVTEVENTRISECOUNTER = Field.create("VVTEVENTRISECOUNTER", 28, FieldType.INT);
|
||||
public static final Field VVTEVENTFALLCOUNTER = Field.create("VVTEVENTFALLCOUNTER", 32, FieldType.INT);
|
||||
public static final Field CURRENTGAP = Field.create("CURRENTGAP", 0, FieldType.FLOAT);
|
||||
public static final Field[] VALUES = {
|
||||
HWEVENTCOUNTERS1,
|
||||
HWEVENTCOUNTERS2,
|
||||
HWEVENTCOUNTERS3,
|
||||
HWEVENTCOUNTERS4,
|
||||
HWEVENTCOUNTERS5,
|
||||
HWEVENTCOUNTERS6,
|
||||
VVTCAMCOUNTER,
|
||||
VVTEVENTRISECOUNTER,
|
||||
VVTEVENTFALLCOUNTER,
|
||||
CURRENTGAP,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20190901;
|
||||
public static final int CONSOLE_VERSION = 20190903;
|
||||
public static final String INI_FILE_PATH = System.getProperty("ini_file_path", "..");
|
||||
public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", "..");
|
||||
public static final String TOOLS_PATH = System.getProperty("tools_path", ".");
|
||||
|
|
|
@ -4,22 +4,25 @@ import com.rusefi.ldmp.*;
|
|||
|
||||
public class TriggerDecoderMeta {
|
||||
public static final Request[] CONTENT = new Request[]{
|
||||
new TextRequest("Current_Gap"),
|
||||
new FieldRequest("Trigger_State", "currentGap"),
|
||||
new TextRequest("EOL"),
|
||||
new ConfigRequest("TRIGGERINPUTPINS1"),
|
||||
new TextRequest("Trigger_1_Fall"),
|
||||
new FieldRequest("Trigger", "HWEVENTCOUNTERS1"),
|
||||
new FieldRequest("Trigger_Central", "HWEVENTCOUNTERS1"),
|
||||
new TextRequest("Rise"),
|
||||
new FieldRequest("Trigger", "HWEVENTCOUNTERS2"),
|
||||
new FieldRequest("Trigger_Central", "HWEVENTCOUNTERS2"),
|
||||
new TextRequest("EOL"),
|
||||
new ConfigRequest("TRIGGERINPUTPINS2"),
|
||||
new TextRequest("Trigger_2_Fall"),
|
||||
new FieldRequest("Trigger", "HWEVENTCOUNTERS3"),
|
||||
new FieldRequest("Trigger_Central", "HWEVENTCOUNTERS3"),
|
||||
new TextRequest("Rise"),
|
||||
new FieldRequest("Trigger", "HWEVENTCOUNTERS4"),
|
||||
new FieldRequest("Trigger_Central", "HWEVENTCOUNTERS4"),
|
||||
new TextRequest("EOL"),
|
||||
new TextRequest("VVT_1"),
|
||||
new ConfigRequest("CAMINPUTS1"),
|
||||
new FieldRequest("Trigger", "vvtEventRiseCounter"),
|
||||
new FieldRequest("Trigger", "vvtEventFallCounter"),
|
||||
new FieldRequest("Trigger", "vvtCamCounter"),
|
||||
new FieldRequest("Trigger_Central", "vvtEventRiseCounter"),
|
||||
new FieldRequest("Trigger_Central", "vvtEventFallCounter"),
|
||||
new FieldRequest("Trigger_Central", "vvtCamCounter"),
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue