auto-sync

This commit is contained in:
rusEfi 2016-09-27 11:01:57 -04:00
parent 4ccf1df3b9
commit 947712a8f9
5 changed files with 14 additions and 23 deletions

View File

@ -41,24 +41,6 @@ extern WaveChart waveChart;
#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() {
isScheduled = false;
output = NULL;
@ -66,7 +48,6 @@ OutputSignalPair::OutputSignalPair() {
void initSignalExecutor(void) {
initSignalExecutorImpl();
initEnginePinsNames();
}
void turnPinHigh(NamedOutputPin *output) {

View File

@ -55,7 +55,6 @@ struct OutputSignal_struct {
};
void initSignalExecutor(void);
void initEnginePinsNames(void);
void initSignalExecutorImpl(void);

View File

@ -41,8 +41,6 @@ static bool isRunningBench = false;
static int is_injector_enabled[INJECTION_PIN_COUNT];
extern engine_pins_s enginePins;
bool isRunningBenchTest(void) {
return isRunningBench;
}

View File

@ -30,9 +30,23 @@ InjectorOutputPin::InjectorOutputPin() : NamedOutputPin() {
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() {
dizzyOutput.name = DIZZY_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() {

View File

@ -20,7 +20,6 @@ extern engine_pins_s enginePins;
EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persistentConfig) {
ec = &persistentConfig.engineConfiguration;
initEnginePinsNames();
for (int i = 0; i < INJECTION_PIN_COUNT;i++) {
enginePins.injectors[i].reset();
}