auto-sync
This commit is contained in:
parent
4ccf1df3b9
commit
947712a8f9
|
@ -41,24 +41,6 @@ extern WaveChart waveChart;
|
||||||
|
|
||||||
#include "efiGpio.h"
|
#include "efiGpio.h"
|
||||||
|
|
||||||
extern engine_pins_s enginePins;
|
|
||||||
|
|
||||||
static const char *sparkNames[IGNITION_PIN_COUNT] = { "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8",
|
|
||||||
"c9", "cA", "cB", "cD"};
|
|
||||||
|
|
||||||
static const char *injectorNames[INJECTION_PIN_COUNT] = { "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8",
|
|
||||||
"j9", "iA", "iB", "iC"};
|
|
||||||
|
|
||||||
void initEnginePinsNames(void) {
|
|
||||||
// todo: make engine_pins_s a class and move this to constructor?
|
|
||||||
for (int i = 0; i < IGNITION_PIN_COUNT;i++) {
|
|
||||||
enginePins.coils[i].name = sparkNames[i];
|
|
||||||
}
|
|
||||||
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
|
|
||||||
enginePins.injectors[i].name = injectorNames[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
OutputSignalPair::OutputSignalPair() {
|
OutputSignalPair::OutputSignalPair() {
|
||||||
isScheduled = false;
|
isScheduled = false;
|
||||||
output = NULL;
|
output = NULL;
|
||||||
|
@ -66,7 +48,6 @@ OutputSignalPair::OutputSignalPair() {
|
||||||
|
|
||||||
void initSignalExecutor(void) {
|
void initSignalExecutor(void) {
|
||||||
initSignalExecutorImpl();
|
initSignalExecutorImpl();
|
||||||
initEnginePinsNames();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void turnPinHigh(NamedOutputPin *output) {
|
void turnPinHigh(NamedOutputPin *output) {
|
||||||
|
|
|
@ -55,7 +55,6 @@ struct OutputSignal_struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
void initSignalExecutor(void);
|
void initSignalExecutor(void);
|
||||||
void initEnginePinsNames(void);
|
|
||||||
|
|
||||||
void initSignalExecutorImpl(void);
|
void initSignalExecutorImpl(void);
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,6 @@ static bool isRunningBench = false;
|
||||||
|
|
||||||
static int is_injector_enabled[INJECTION_PIN_COUNT];
|
static int is_injector_enabled[INJECTION_PIN_COUNT];
|
||||||
|
|
||||||
extern engine_pins_s enginePins;
|
|
||||||
|
|
||||||
bool isRunningBenchTest(void) {
|
bool isRunningBenchTest(void) {
|
||||||
return isRunningBench;
|
return isRunningBench;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,23 @@ InjectorOutputPin::InjectorOutputPin() : NamedOutputPin() {
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *sparkNames[IGNITION_PIN_COUNT] = { "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8",
|
||||||
|
"c9", "cA", "cB", "cD"};
|
||||||
|
|
||||||
|
static const char *injectorNames[INJECTION_PIN_COUNT] = { "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8",
|
||||||
|
"j9", "iA", "iB", "iC"};
|
||||||
|
|
||||||
|
|
||||||
engine_pins_s::engine_pins_s() {
|
engine_pins_s::engine_pins_s() {
|
||||||
dizzyOutput.name = DIZZY_NAME;
|
dizzyOutput.name = DIZZY_NAME;
|
||||||
tachOut.name = TACH_NAME;
|
tachOut.name = TACH_NAME;
|
||||||
|
|
||||||
|
for (int i = 0; i < IGNITION_PIN_COUNT;i++) {
|
||||||
|
enginePins.coils[i].name = sparkNames[i];
|
||||||
|
}
|
||||||
|
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
|
||||||
|
enginePins.injectors[i].name = injectorNames[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InjectorOutputPin::reset() {
|
void InjectorOutputPin::reset() {
|
||||||
|
|
|
@ -20,7 +20,6 @@ extern engine_pins_s enginePins;
|
||||||
EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persistentConfig) {
|
EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persistentConfig) {
|
||||||
ec = &persistentConfig.engineConfiguration;
|
ec = &persistentConfig.engineConfiguration;
|
||||||
|
|
||||||
initEnginePinsNames();
|
|
||||||
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
|
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
|
||||||
enginePins.injectors[i].reset();
|
enginePins.injectors[i].reset();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue