auto-sync
This commit is contained in:
parent
3991db4f01
commit
b3c7602e67
|
@ -115,7 +115,7 @@
|
|||
|
||||
#define EFI_WAVE_CHART TRUE
|
||||
|
||||
#define EFI_HISTOGRAMS TRUE
|
||||
#define EFI_HISTOGRAMS FAPSE
|
||||
#define EFI_ANALOG_CHART TRUE
|
||||
|
||||
#if defined __GNUC__
|
||||
|
|
|
@ -16,22 +16,10 @@
|
|||
#include "event_registry.h"
|
||||
#include "trigger_structure.h"
|
||||
|
||||
/**
|
||||
* @brief Here we store information about which injector or spark should be fired when.
|
||||
*/
|
||||
typedef struct {
|
||||
ActuatorEventList crankingInjectionEvents;
|
||||
ActuatorEventList injectionEvents;
|
||||
/**
|
||||
* We are alternating two event lists in order to avoid a potential issue around revolution boundary
|
||||
* when an event is scheduled within the next revolution.
|
||||
*/
|
||||
IgnitionEventList ignitionEvents[2];
|
||||
} EventHandlerConfiguration;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
class FuelSchedule {
|
||||
public:
|
||||
ActuatorEventList events;
|
||||
};
|
||||
|
||||
/**
|
||||
* this part of the structure is separate just because so far
|
||||
|
@ -47,7 +35,14 @@ public:
|
|||
|
||||
trigger_shape_s triggerShape;
|
||||
|
||||
EventHandlerConfiguration engineEventConfiguration;
|
||||
FuelSchedule crankingInjectionEvents;
|
||||
FuelSchedule injectionEvents;
|
||||
|
||||
/**
|
||||
* We are alternating two event lists in order to avoid a potential issue around revolution boundary
|
||||
* when an event is scheduled within the next revolution.
|
||||
*/
|
||||
IgnitionEventList ignitionEvents[2];
|
||||
};
|
||||
|
||||
void initializeIgnitionActions(float advance, float dwellAngle, engine_configuration_s *engineConfiguration,
|
||||
|
@ -55,14 +50,10 @@ void initializeIgnitionActions(float advance, float dwellAngle, engine_configura
|
|||
void addFuelEvents(engine_configuration_s const *e, engine_configuration2_s *engineConfiguration2,
|
||||
ActuatorEventList *list, injection_mode_e mode);
|
||||
|
||||
void registerActuatorEventExt(engine_configuration_s const *engineConfiguration, trigger_shape_s * s, ActuatorEvent *e,
|
||||
OutputSignal *actuator, float angleOffset);
|
||||
|
||||
void setDefaultNonPersistentConfiguration(engine_configuration2_s *engineConfiguration2);
|
||||
void printConfiguration(engine_configuration_s *engineConfiguration, engine_configuration2_s *engineConfiguration2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
void registerActuatorEventExt(engine_configuration_s const *engineConfiguration, trigger_shape_s * s, ActuatorEvent *e,
|
||||
OutputSignal *actuator, float angleOffset);
|
||||
|
||||
#endif /* EC2_H_ */
|
||||
|
|
|
@ -579,7 +579,7 @@ void applyNonPersistentConfiguration(Logging * logger, Engine *engine) {
|
|||
prepareOutputSignals(engine);
|
||||
// todo: looks like this is here only for unit tests. todo: remove
|
||||
initializeIgnitionActions(0, 0, engineConfiguration, engineConfiguration2,
|
||||
&engineConfiguration2->engineEventConfiguration.ignitionEvents[0]);
|
||||
&engineConfiguration2->ignitionEvents[0]);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#define CHART_DELIMETER "!"
|
||||
|
||||
#if EFI_HISTOGRAMS
|
||||
#if EFI_HISTOGRAMS || defined(__DOXYGEN__)
|
||||
#include "rfiutil.h"
|
||||
#include "histogram.h"
|
||||
static histogram_s waveChartHisto;
|
||||
|
@ -208,7 +208,7 @@ void WaveChart::addWaveChartEvent3(const char *name, const char * msg, const cha
|
|||
}
|
||||
|
||||
void showWaveChartHistogram(void) {
|
||||
#if EFI_PROD_CODE
|
||||
#if (EFI_HISTOGRAMS && EFI_PROD_CODE) || defined(__DOXYGEN__)
|
||||
printHistogram(&logger, &waveChartHisto);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -25,6 +25,9 @@ extern int main_loop_started;
|
|||
const char *dbg_panic_file;
|
||||
int dbg_panic_line;
|
||||
|
||||
static void turnAllPinsOff(void) {
|
||||
}
|
||||
|
||||
void chDbgPanic3(const char *msg, const char * file, int line) {
|
||||
if (hasFatalError())
|
||||
return;
|
||||
|
@ -41,6 +44,8 @@ void chDbgPanic3(const char *msg, const char * file, int line) {
|
|||
#if EFI_HD44780_LCD
|
||||
lcdShowFatalMessage((char *) msg);
|
||||
#endif /* EFI_HD44780_LCD */
|
||||
turnAllPinsOff();
|
||||
|
||||
if (!main_loop_started) {
|
||||
print("fatal %s %s:%d\r\n", msg, file, line);
|
||||
chThdSleepSeconds(1);
|
||||
|
|
|
@ -352,10 +352,9 @@ engine_configuration2_s *engineConfiguration2 = engine->engineConfiguration2;
|
|||
engineConfiguration2->triggerShape.calculateTriggerSynchPoint(engineConfiguration, &engineConfiguration->triggerConfig);
|
||||
|
||||
injectonSignals.clear();
|
||||
EventHandlerConfiguration *config = &engineConfiguration2->engineEventConfiguration;
|
||||
addFuelEvents(engineConfiguration, engineConfiguration2, &config->crankingInjectionEvents,
|
||||
addFuelEvents(engineConfiguration, engineConfiguration2, &engineConfiguration2->crankingInjectionEvents.events,
|
||||
engineConfiguration->crankingInjectionMode);
|
||||
addFuelEvents(engineConfiguration, engineConfiguration2, &config->injectionEvents,
|
||||
addFuelEvents(engineConfiguration, engineConfiguration2, &engineConfiguration2->injectionEvents.events,
|
||||
engineConfiguration->injectionMode);
|
||||
}
|
||||
|
||||
|
|
|
@ -114,8 +114,8 @@ static void handleFuel(Engine *engine, MainTriggerCallback *mainTriggerCallback,
|
|||
*/
|
||||
ActuatorEventList *source =
|
||||
isCrankingR(rpm) ?
|
||||
&mainTriggerCallback->engineConfiguration2->engineEventConfiguration.crankingInjectionEvents :
|
||||
&mainTriggerCallback->engineConfiguration2->engineEventConfiguration.injectionEvents;
|
||||
&mainTriggerCallback->engineConfiguration2->crankingInjectionEvents.events :
|
||||
&mainTriggerCallback->engineConfiguration2->injectionEvents.events;
|
||||
|
||||
for (int i = 0; i < source->size; i++) {
|
||||
ActuatorEvent *event = &source->events[i];
|
||||
|
@ -299,14 +299,14 @@ void onTriggerEvent(trigger_event_e ckpSignalType, uint32_t eventIndex, MainTrig
|
|||
|
||||
initializeIgnitionActions(advance, dwellAngle, mainTriggerCallback->engineConfiguration,
|
||||
mainTriggerCallback->engineConfiguration2,
|
||||
&mainTriggerCallback->engineConfiguration2->engineEventConfiguration.ignitionEvents[revolutionIndex]);
|
||||
&mainTriggerCallback->engineConfiguration2->ignitionEvents[revolutionIndex]);
|
||||
}
|
||||
|
||||
triggerEventsQueue.executeAll(getCrankEventCounter());
|
||||
|
||||
handleFuel(&engine, mainTriggerCallback, eventIndex, rpm);
|
||||
handleSpark(mainTriggerCallback, eventIndex, rpm,
|
||||
&mainTriggerCallback->engineConfiguration2->engineEventConfiguration.ignitionEvents[revolutionIndex]);
|
||||
&mainTriggerCallback->engineConfiguration2->ignitionEvents[revolutionIndex]);
|
||||
#if EFI_HISTOGRAMS && EFI_PROD_CODE
|
||||
int diff = hal_lld_get_counter_value() - beforeCallback;
|
||||
if (diff > 0)
|
||||
|
|
|
@ -249,5 +249,5 @@ void firmwareError(const char *fmt, ...) {
|
|||
}
|
||||
|
||||
int getRusEfiVersion(void) {
|
||||
return 20141106;
|
||||
return 20141107;
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ static void test1995FordInline6TriggerDecoder(void) {
|
|||
assertTriggerPosition(&position, 6, 0);
|
||||
|
||||
|
||||
IgnitionEventList *ecl = ð.ec2.engineEventConfiguration.ignitionEvents[0];
|
||||
IgnitionEventList *ecl = ð.ec2.ignitionEvents[0];
|
||||
assertEqualsM("ignition events size", 6, ecl->size);
|
||||
assertEqualsM("event index", 0, ecl->events[0].dwellPosition.eventIndex);
|
||||
assertEquals(0, ecl->events[0].dwellPosition.angleOffset);
|
||||
|
|
Loading…
Reference in New Issue