better class name
This commit is contained in:
parent
bdf977a511
commit
d8f7b61d63
|
@ -259,7 +259,7 @@ public:
|
||||||
void reset();
|
void reset();
|
||||||
injection_mode_e getCurrentInjectionMode(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
injection_mode_e getCurrentInjectionMode(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
OutputSignalPair fuelActuators[INJECTION_PIN_COUNT];
|
InjectionSignalPair fuelActuators[INJECTION_PIN_COUNT];
|
||||||
IgnitionEventList ignitionEvents;
|
IgnitionEventList ignitionEvents;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ extern WaveChart waveChart;
|
||||||
|
|
||||||
#include "efiGpio.h"
|
#include "efiGpio.h"
|
||||||
|
|
||||||
OutputSignalPair::OutputSignalPair() {
|
InjectionSignalPair::InjectionSignalPair() {
|
||||||
isScheduled = false;
|
isScheduled = false;
|
||||||
memset(outputs, 0, sizeof(outputs));
|
memset(outputs, 0, sizeof(outputs));
|
||||||
event = NULL;
|
event = NULL;
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
|
|
||||||
class InjectionEvent;
|
class InjectionEvent;
|
||||||
|
|
||||||
class OutputSignalPair {
|
class InjectionSignalPair {
|
||||||
public:
|
public:
|
||||||
OutputSignalPair();
|
InjectionSignalPair();
|
||||||
scheduling_s signalTimerUp;
|
scheduling_s signalTimerUp;
|
||||||
scheduling_s signalTimerDown;
|
scheduling_s signalTimerDown;
|
||||||
|
|
||||||
|
@ -45,6 +45,8 @@ public:
|
||||||
InjectorOutputPin *outputs[MAX_WIRES_COUNT];
|
InjectorOutputPin *outputs[MAX_WIRES_COUNT];
|
||||||
|
|
||||||
InjectionEvent *event;
|
InjectionEvent *event;
|
||||||
|
turnPinHigh();
|
||||||
|
turnPinLow();
|
||||||
};
|
};
|
||||||
|
|
||||||
void initSignalExecutor(void);
|
void initSignalExecutor(void);
|
||||||
|
|
|
@ -133,7 +133,7 @@ static void tempTurnPinHigh(InjectorOutputPin *output) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: make these macro? kind of a penny optimization if compiler is not smart to inline
|
// todo: make these macro? kind of a penny optimization if compiler is not smart to inline
|
||||||
void seTurnPinHigh(OutputSignalPair *pair) {
|
void seTurnPinHigh(InjectionSignalPair *pair) {
|
||||||
for (int i = 0;i<MAX_WIRES_COUNT;i++) {
|
for (int i = 0;i<MAX_WIRES_COUNT;i++) {
|
||||||
InjectorOutputPin *output = pair->outputs[i];
|
InjectorOutputPin *output = pair->outputs[i];
|
||||||
if (output != NULL) {
|
if (output != NULL) {
|
||||||
|
@ -181,7 +181,7 @@ static void tempTurnPinLow(InjectorOutputPin *output) {
|
||||||
output->setLow();
|
output->setLow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void seTurnPinLow(OutputSignalPair *pair) {
|
void seTurnPinLow(InjectionSignalPair *pair) {
|
||||||
pair->isScheduled = false;
|
pair->isScheduled = false;
|
||||||
for (int i = 0;i<MAX_WIRES_COUNT;i++) {
|
for (int i = 0;i<MAX_WIRES_COUNT;i++) {
|
||||||
InjectorOutputPin *output = pair->outputs[i];
|
InjectorOutputPin *output = pair->outputs[i];
|
||||||
|
@ -197,7 +197,7 @@ void seTurnPinLow(OutputSignalPair *pair) {
|
||||||
engine->injectionEvents.addFuelEventsForCylinder(pair->event->ownIndex PASS_ENGINE_PARAMETER_SUFFIX);
|
engine->injectionEvents.addFuelEventsForCylinder(pair->event->ownIndex PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void seScheduleByTime(scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, OutputSignalPair *pair) {
|
static void seScheduleByTime(scheduling_s *scheduling, efitimeus_t time, schfunc_t callback, InjectionSignalPair *pair) {
|
||||||
#if FUEL_MATH_EXTREME_LOGGING || defined(__DOXYGEN__)
|
#if FUEL_MATH_EXTREME_LOGGING || defined(__DOXYGEN__)
|
||||||
InjectorOutputPin *param = pair->outputs[0];
|
InjectorOutputPin *param = pair->outputs[0];
|
||||||
// scheduleMsg(&sharedLogger, "schX %s %x %d", prefix, scheduling, time);
|
// scheduleMsg(&sharedLogger, "schX %s %x %d", prefix, scheduling, time);
|
||||||
|
@ -210,7 +210,7 @@ static void seScheduleByTime(scheduling_s *scheduling, efitimeus_t time, schfunc
|
||||||
scheduleByTime(scheduling, time, callback, pair);
|
scheduleByTime(scheduling, time, callback, pair);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void scheduleFuelInjection(OutputSignalPair *pair, efitimeus_t nowUs, floatus_t delayUs, floatus_t durationUs, InjectionEvent *event DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
static void scheduleFuelInjection(InjectionSignalPair *pair, efitimeus_t nowUs, floatus_t delayUs, floatus_t durationUs, InjectionEvent *event DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
if (durationUs < 0) {
|
if (durationUs < 0) {
|
||||||
warning(CUSTOM_NEGATIVE_DURATION, "duration cannot be negative: %d", durationUs);
|
warning(CUSTOM_NEGATIVE_DURATION, "duration cannot be negative: %d", durationUs);
|
||||||
return;
|
return;
|
||||||
|
@ -230,7 +230,7 @@ static void scheduleFuelInjection(OutputSignalPair *pair, efitimeus_t nowUs, flo
|
||||||
#if EFI_UNIT_TEST || EFI_SIMULATOR || defined(__DOXYGEN__)
|
#if EFI_UNIT_TEST || EFI_SIMULATOR || defined(__DOXYGEN__)
|
||||||
printf("still used1 %s %d\r\n", output->name, (int)getTimeNowUs());
|
printf("still used1 %s %d\r\n", output->name, (int)getTimeNowUs());
|
||||||
#endif /* EFI_UNIT_TEST || EFI_SIMULATOR */
|
#endif /* EFI_UNIT_TEST || EFI_SIMULATOR */
|
||||||
return; // this OutputSignalPair is still needed for an extremely long injection scheduled previously
|
return; // this InjectionSignalPair is still needed for an extremely long injection scheduled previously
|
||||||
}
|
}
|
||||||
pair->outputs[0] = output;
|
pair->outputs[0] = output;
|
||||||
pair->outputs[1] = event->outputs[1];
|
pair->outputs[1] = event->outputs[1];
|
||||||
|
@ -303,7 +303,7 @@ static ALWAYS_INLINE void handleFuelInjectionEvent(int injEventIndex, InjectionE
|
||||||
getRevolutionCounter());
|
getRevolutionCounter());
|
||||||
#endif /* EFI_DEFAILED_LOGGING */
|
#endif /* EFI_DEFAILED_LOGGING */
|
||||||
|
|
||||||
OutputSignalPair *pair = &ENGINE(fuelActuators[injEventIndex]);
|
InjectionSignalPair *pair = &ENGINE(fuelActuators[injEventIndex]);
|
||||||
|
|
||||||
if (event->isSimultanious) {
|
if (event->isSimultanious) {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -22,8 +22,8 @@ int isIgnitionTimingError(void);
|
||||||
|
|
||||||
void showMainHistogram(void);
|
void showMainHistogram(void);
|
||||||
|
|
||||||
void seTurnPinHigh(OutputSignalPair *pair);
|
void seTurnPinHigh(InjectionSignalPair *pair);
|
||||||
void seTurnPinLow(OutputSignalPair *pair);
|
void seTurnPinLow(InjectionSignalPair *pair);
|
||||||
|
|
||||||
float getFuel(int rpm, float key);
|
float getFuel(int rpm, float key);
|
||||||
#endif /* MAIN_LOOP_H_ */
|
#endif /* MAIN_LOOP_H_ */
|
||||||
|
|
|
@ -596,7 +596,7 @@ void assertEvent(const char *msg, int index, void *callback, efitime_t start, ef
|
||||||
scheduling_s *ev = schedulingQueue.getForUnitText(index);
|
scheduling_s *ev = schedulingQueue.getForUnitText(index);
|
||||||
assertEqualsM4(msg, "up/down", (void*)ev->callback == (void*) callback, 1);
|
assertEqualsM4(msg, "up/down", (void*)ev->callback == (void*) callback, 1);
|
||||||
assertEqualsM(msg, momentX, ev->momentX - start);
|
assertEqualsM(msg, momentX, ev->momentX - start);
|
||||||
OutputSignalPair *pair = (OutputSignalPair *)ev->param;
|
InjectionSignalPair *pair = (InjectionSignalPair *)ev->param;
|
||||||
assertEqualsLM(msg, param, (long)pair->outputs[0]);
|
assertEqualsLM(msg, param, (long)pair->outputs[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue