auto-sync
This commit is contained in:
parent
f209d30f13
commit
473c0bda3a
|
@ -114,7 +114,7 @@ static void vappendPrintfI(Logging *logging, const char *fmt, va_list arg) {
|
|||
}
|
||||
|
||||
void vappendPrintf(Logging *logging, const char *fmt, va_list arg) {
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 16, "stack#5b");
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 64, "lowstck#5b");
|
||||
if (!intermediateLoggingBufferInited) {
|
||||
firmwareError("intermediateLoggingBufferInited not inited!");
|
||||
return;
|
||||
|
@ -141,7 +141,7 @@ void vappendPrintf(Logging *logging, const char *fmt, va_list arg) {
|
|||
}
|
||||
|
||||
void appendPrintf(Logging *logging, const char *fmt, ...) {
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 16, "stack#4");
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 32, "lowstck#4");
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vappendPrintf(logging, fmt, ap);
|
||||
|
|
|
@ -176,7 +176,7 @@ void WaveChart::addWaveChartEvent3(const char *name, const char * msg, const cha
|
|||
* at least that's 32 bit division now
|
||||
*/
|
||||
uint32_t diffNt = nowNt - startTimeNt;
|
||||
uint32_t time100 = diffNt / 10 / 168;
|
||||
uint32_t time100 = NT2US(diffNt / 10);
|
||||
|
||||
|
||||
if (remainingSize(&logging) > 30) {
|
||||
|
|
|
@ -180,7 +180,18 @@ void FuelSchedule::registerInjectionEvent(engine_configuration_s const *e, trigg
|
|||
warning(OBD_PCM_Processor_Fault, "pin not assigned for injector #%d", (int) pin - (int) INJECTOR_1_OUTPUT + 1);
|
||||
}
|
||||
|
||||
registerActuatorEventExt(e, s, list->getNextActuatorEvent(), injectonSignals.add(pin), angle);
|
||||
ActuatorEvent *ev = list->getNextActuatorEvent();
|
||||
OutputSignal *actuator = injectonSignals.add(pin);
|
||||
|
||||
efiAssertVoid(s->getSize() > 0, "uninitialized trigger_shape_s");
|
||||
|
||||
if (ev == NULL) {
|
||||
// error already reported
|
||||
return;
|
||||
}
|
||||
ev->actuator = actuator;
|
||||
|
||||
registerActuatorEventExt(e, s, ev, actuator, angle);
|
||||
}
|
||||
|
||||
void FuelSchedule::addFuelEvents(engine_configuration_s const *e, trigger_shape_s *s,
|
||||
|
@ -304,17 +315,11 @@ void findTriggerPosition(engine_configuration_s const *engineConfiguration, trig
|
|||
position->angleOffset = angleOffset - eventAngle;
|
||||
}
|
||||
|
||||
void registerActuatorEventExt(engine_configuration_s const *engineConfiguration, trigger_shape_s * s, ActuatorEvent *e,
|
||||
OutputSignal *actuator, float angleOffset) {
|
||||
efiAssertVoid(s->getSize() > 0, "uninitialized trigger_shape_s");
|
||||
void registerActuatorEventExt(engine_configuration_s const *e, trigger_shape_s * s, ActuatorEvent *ev,
|
||||
OutputSignal *actuator, float angle) {
|
||||
|
||||
if (e == NULL) {
|
||||
// error already reported
|
||||
return;
|
||||
}
|
||||
e->actuator = actuator;
|
||||
|
||||
findTriggerPosition(engineConfiguration, s, &e->position, angleOffset);
|
||||
findTriggerPosition(e, s, &ev->position, angle);
|
||||
}
|
||||
|
||||
static int order_1_THEN_3_THEN_4_THEN2[] = { 1, 3, 4, 2 };
|
||||
|
|
|
@ -104,7 +104,7 @@ static void handleFuelInjectionEvent(MainTriggerCallback *mainTriggerCallback, A
|
|||
static void handleFuel(Engine *engine, MainTriggerCallback *mainTriggerCallback, uint32_t eventIndex, int rpm) {
|
||||
if (!isInjectionEnabled(mainTriggerCallback->engineConfiguration))
|
||||
return;
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 16, "stack#3");
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 64, "lowstck#3");
|
||||
efiAssertVoid(eventIndex < mainTriggerCallback->engineConfiguration2->triggerShape.getLength(), "event index");
|
||||
|
||||
engine_configuration_s *engineConfiguration = engine->engineConfiguration;
|
||||
|
@ -112,10 +112,12 @@ static void handleFuel(Engine *engine, MainTriggerCallback *mainTriggerCallback,
|
|||
* Ignition events are defined by addFuelEvents() according to selected
|
||||
* fueling strategy
|
||||
*/
|
||||
ActuatorEventList *source =
|
||||
FuelSchedule *fs =
|
||||
isCrankingR(rpm) ?
|
||||
&mainTriggerCallback->engineConfiguration2->crankingInjectionEvents.events :
|
||||
&mainTriggerCallback->engineConfiguration2->injectionEvents.events;
|
||||
&mainTriggerCallback->engineConfiguration2->crankingInjectionEvents :
|
||||
&mainTriggerCallback->engineConfiguration2->injectionEvents;
|
||||
|
||||
ActuatorEventList *source = &fs->events;
|
||||
|
||||
for (int i = 0; i < source->size; i++) {
|
||||
ActuatorEvent *event = &source->events[i];
|
||||
|
@ -244,7 +246,7 @@ void onTriggerEvent(trigger_event_e ckpSignalType, uint32_t eventIndex, MainTrig
|
|||
(void) ckpSignalType;
|
||||
efiAssertVoid(eventIndex < 2 * mainTriggerCallback->engineConfiguration2->triggerShape.shaftPositionEventCount,
|
||||
"event index");
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 16, "stack#3");
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#2");
|
||||
|
||||
// todo int rpm = getRpmE(mainTriggerCallback->engine);
|
||||
int rpm = getRpmE(&engine);
|
||||
|
|
|
@ -61,6 +61,7 @@ void addTriggerEventListener(ShaftPositionListener listener, const char *name, v
|
|||
extern Engine engine;
|
||||
|
||||
void hwHandleShaftSignal(trigger_event_e signal) {
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#8");
|
||||
triggerCentral.handleShaftSignal(&engine, signal);
|
||||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
|
Loading…
Reference in New Issue