auto-sync
This commit is contained in:
parent
9d109a6ff7
commit
e0fb25e958
|
@ -35,6 +35,11 @@
|
|||
#include "trigger_structure.h"
|
||||
#include "efiGpio.h"
|
||||
#include "engine.h"
|
||||
#include "engine_math.h"
|
||||
|
||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
||||
#include "sensor_chart.h"
|
||||
#endif
|
||||
|
||||
static OutputPin triggerDecoderErrorPin;
|
||||
|
||||
|
@ -121,6 +126,28 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|
|||
prevSignal = curSignal;
|
||||
curSignal = signal;
|
||||
|
||||
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
|
||||
if (boardConfiguration->sensorChartMode == SC_RPM_ACCEL) {
|
||||
angle_t currentAngle = TRIGGER_SHAPE(eventAngles[currentCycle.current_index]);
|
||||
// todo: make this '90' depend on cylinder count?
|
||||
angle_t prevAngle = currentAngle - 90;
|
||||
fixAngle(prevAngle);
|
||||
int prevIndex = TRIGGER_SHAPE(triggerIndexByAngle[(int)prevAngle]);
|
||||
// now let's get precise angle for that event
|
||||
prevAngle = TRIGGER_SHAPE(eventAngles[prevIndex]);
|
||||
uint32_t time = nowNt - timeOfLastEvent[prevIndex];
|
||||
angle_t angleDiff = currentAngle - prevAngle;
|
||||
// todo: angle diff should be pre-calculated
|
||||
fixAngle(angleDiff);
|
||||
|
||||
float r = (angleDiff / 360.0) / (NT2US(time) / 60000000.0);
|
||||
|
||||
scAddData(currentAngle, r);
|
||||
instantRpmValue[currentCycle.current_index] = r;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
timeOfLastEvent[currentCycle.current_index] = nowNt;
|
||||
|
||||
currentCycle.eventCount[triggerWheel]++;
|
||||
|
|
|
@ -1934,6 +1934,12 @@
|
|||
<file>
|
||||
<name>$PROJ_DIR$\..\config\engines\custom_engine.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\config\engines\daihatsu.cpp</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\config\engines\daihatsu.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\config\engines\dodge_neon.cpp</name>
|
||||
</file>
|
||||
|
@ -2477,6 +2483,12 @@
|
|||
<file>
|
||||
<name>$PROJ_DIR$\..\controllers\trigger\trigger_structure.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\controllers\trigger\trigger_subaru.cpp</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\controllers\trigger\trigger_subaru.h</name>
|
||||
</file>
|
||||
</group>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\controllers\alternatorController.cpp</name>
|
||||
|
|
|
@ -32,7 +32,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see com.rusefi.StartupFrame
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20150907;
|
||||
public static final int CONSOLE_VERSION = 20150912;
|
||||
public static final boolean SHOW_STIMULATOR = false;
|
||||
private static final String TAB_INDEX = "main_tab";
|
||||
protected static final String PORT_KEY = "port";
|
||||
|
|
Loading…
Reference in New Issue