mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
92e9c1d86d
commit
32003658be
|
@ -101,6 +101,11 @@ int TriggerCentral::getHwEventCounter(int index) {
|
||||||
return hwEventCounters[index];
|
return hwEventCounters[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TriggerCentral::resetCounters() {
|
||||||
|
memset(hwEventCounters, 0, sizeof(hwEventCounters));
|
||||||
|
triggerState.resetRunningCounters();
|
||||||
|
}
|
||||||
|
|
||||||
static char shaft_signal_msg_index[15];
|
static char shaft_signal_msg_index[15];
|
||||||
|
|
||||||
static ALWAYS_INLINE void reportEventToWaveChart(trigger_event_e ckpSignalType, int index) {
|
static ALWAYS_INLINE void reportEventToWaveChart(trigger_event_e ckpSignalType, int index) {
|
||||||
|
@ -298,7 +303,8 @@ float getTriggerDutyCycle(int index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void resetRunningTriggerCounters() {
|
static void resetRunningTriggerCounters() {
|
||||||
triggerCentral.triggerState.resetRunningCounters();
|
triggerCentral.resetCounters();
|
||||||
|
triggerInfo(engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void initTriggerCentral(Logging *sharedLogger, Engine *engine) {
|
void initTriggerCentral(Logging *sharedLogger, Engine *engine) {
|
||||||
|
|
|
@ -26,6 +26,7 @@ public:
|
||||||
void addEventListener(ShaftPositionListener handler, const char *name, Engine *engine);
|
void addEventListener(ShaftPositionListener handler, const char *name, Engine *engine);
|
||||||
void handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PARAMETER_S);
|
void handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PARAMETER_S);
|
||||||
int getHwEventCounter(int index);
|
int getHwEventCounter(int index);
|
||||||
|
void resetCounters();
|
||||||
TriggerState triggerState;
|
TriggerState triggerState;
|
||||||
uint64_t nowNt;
|
uint64_t nowNt;
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -227,24 +227,24 @@ void chDbgStackOverflowPanic(Thread *otp) {
|
||||||
extern engine_pins_s enginePins;
|
extern engine_pins_s enginePins;
|
||||||
|
|
||||||
// todo: why is this method here and not in error_handling.c ?
|
// todo: why is this method here and not in error_handling.c ?
|
||||||
void firmwareError(const char *fmt, ...) {
|
void firmwareError(const char *errorMsg, ...) {
|
||||||
if (hasFirmwareErrorFlag)
|
if (hasFirmwareErrorFlag)
|
||||||
return;
|
return;
|
||||||
enginePins.errorLedPin.setValue(1);
|
enginePins.errorLedPin.setValue(1);
|
||||||
turnAllPinsOff();
|
turnAllPinsOff();
|
||||||
hasFirmwareErrorFlag = TRUE;
|
hasFirmwareErrorFlag = TRUE;
|
||||||
if (indexOf(fmt, '%') == -1) {
|
if (indexOf(errorMsg, '%') == -1) {
|
||||||
/**
|
/**
|
||||||
* in case of simple error message let's reduce stack usage
|
* in case of simple error message let's reduce stack usage
|
||||||
* because chvprintf might be causing an error
|
* because chvprintf might be causing an error
|
||||||
*/
|
*/
|
||||||
strcpy((char*) errorMessageBuffer, fmt);
|
strcpy((char*) errorMessageBuffer, errorMsg);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
firmwareErrorMessageStream.eos = 0; // reset
|
firmwareErrorMessageStream.eos = 0; // reset
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, errorMsg);
|
||||||
chvprintf((BaseSequentialStream *) &firmwareErrorMessageStream, fmt, ap);
|
chvprintf((BaseSequentialStream *) &firmwareErrorMessageStream, errorMsg, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
firmwareErrorMessageStream.buffer[firmwareErrorMessageStream.eos] = 0; // need to terminate explicitly
|
firmwareErrorMessageStream.buffer[firmwareErrorMessageStream.eos] = 0; // need to terminate explicitly
|
||||||
|
@ -260,5 +260,5 @@ int getRusEfiVersion(void) {
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
if (UNUSED_CCM_SIZE == 0)
|
if (UNUSED_CCM_SIZE == 0)
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
return 20150201;
|
return 20150202;
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,9 +243,9 @@ float injectionAngle;this is about deciding when the injector starts it's squirt
|
||||||
float diffLoadEnrichmentCoef;
|
float diffLoadEnrichmentCoef;
|
||||||
|
|
||||||
air_pressure_sensor_config_s baroSensor;@see hasBaroSensor
|
air_pressure_sensor_config_s baroSensor;@see hasBaroSensor
|
||||||
float[FUEL_LOAD_COUNT] veLoadBins;;1, 0.0, 0, 300.0, 2
|
float[FUEL_LOAD_COUNT] veLoadBins;;"%", 1, 0.0, 0, 300.0, 2
|
||||||
float[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
|
float[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
|
||||||
float[FUEL_LOAD_COUNT] afrLoadBins;;1, 0.0, 0, 300.0, 2
|
float[FUEL_LOAD_COUNT] afrLoadBins;;"%", 1, 0.0, 0, 300.0, 2
|
||||||
float[FUEL_RPM_COUNT] afrRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
|
float[FUEL_RPM_COUNT] afrRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
|
||||||
|
|
||||||
fuel_table_t fuelTable;
|
fuel_table_t fuelTable;
|
||||||
|
|
|
@ -151,9 +151,9 @@ enable2ndByteCanID = false
|
||||||
baroSensor_valueAt5 = scalar, F32, 1112, "kpa", 1, 0, 0, 450, 2
|
baroSensor_valueAt5 = scalar, F32, 1112, "kpa", 1, 0, 0, 450, 2
|
||||||
baroSensor_type = bits, U32, 1116, [0:1] "Custom", "DENSO183", "MPX4250", "INVALID"
|
baroSensor_type = bits, U32, 1116, [0:1] "Custom", "DENSO183", "MPX4250", "INVALID"
|
||||||
baroSensor_hwChannel = bits, U32, 1120, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5"
|
baroSensor_hwChannel = bits, U32, 1120, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5"
|
||||||
veLoadBins = array, F32, 1124, [16], 1, 0.0, 0, 300.0, 2
|
veLoadBins = array, F32, 1124, [16], "%", 1, 0.0, 0, 300.0, 2
|
||||||
veRpmBins = array, F32, 1188, [16], "RPM", 1, 0.0, 0, 18000.0, 2
|
veRpmBins = array, F32, 1188, [16], "RPM", 1, 0.0, 0, 18000.0, 2
|
||||||
afrLoadBins = array, F32, 1252, [16], 1, 0.0, 0, 300.0, 2
|
afrLoadBins = array, F32, 1252, [16], "%", 1, 0.0, 0, 300.0, 2
|
||||||
afrRpmBins = array, F32, 1316, [16], "RPM", 1, 0.0, 0, 18000.0, 2
|
afrRpmBins = array, F32, 1316, [16], "RPM", 1, 0.0, 0, 18000.0, 2
|
||||||
fuelTable = array, F32, 1380, [16x16],"ms", 1, 0, 0.0, 300.0, 2
|
fuelTable = array, F32, 1380, [16x16],"ms", 1, 0, 0.0, 300.0, 2
|
||||||
ignitionTable = array, F32, 2404, [16x16],"deg", 1, 0, -360, 360, 2
|
ignitionTable = array, F32, 2404, [16x16],"deg", 1, 0, -360, 360, 2
|
||||||
|
|
|
@ -56,6 +56,8 @@ public class RecentCommands {
|
||||||
add("enable self_stimulation");
|
add("enable self_stimulation");
|
||||||
add("disable self_stimulation");
|
add("disable self_stimulation");
|
||||||
|
|
||||||
|
add("sparkbench 5 400 2");
|
||||||
|
add("fuelbench 5 400 2");
|
||||||
add("fuelpumpbench");
|
add("fuelpumpbench");
|
||||||
add("fanbench");
|
add("fanbench");
|
||||||
add("milbench");
|
add("milbench");
|
||||||
|
|
Loading…
Reference in New Issue