mirror of https://github.com/FOME-Tech/fome-fw.git
auto-sync
This commit is contained in:
parent
0cad2b2607
commit
d4f5e6b6e6
|
@ -316,8 +316,10 @@ static systime_t timeOfPreviousPrintVersion = (systime_t) -1;
|
||||||
|
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
static void printOutPin(const char *pinName, brain_pin_e hwPin) {
|
static void printOutPin(const char *pinName, brain_pin_e hwPin) {
|
||||||
|
if (hwPin != GPIO_UNASSIGNED) {
|
||||||
appendPrintf(&logger, "outpin%s%s@%s%s", DELIMETER, pinName, hwPortname(hwPin), DELIMETER);
|
appendPrintf(&logger, "outpin%s%s@%s%s", DELIMETER, pinName, hwPortname(hwPin), DELIMETER);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
static void printInfo(systime_t nowSeconds) {
|
static void printInfo(systime_t nowSeconds) {
|
||||||
|
@ -338,6 +340,9 @@ static void printInfo(systime_t nowSeconds) {
|
||||||
printOutPin(CRANK1, boardConfiguration->triggerInputPins[0]);
|
printOutPin(CRANK1, boardConfiguration->triggerInputPins[0]);
|
||||||
printOutPin(CRANK2, boardConfiguration->triggerInputPins[1]);
|
printOutPin(CRANK2, boardConfiguration->triggerInputPins[1]);
|
||||||
printOutPin(VVT_NAME, engineConfiguration->camInput);
|
printOutPin(VVT_NAME, engineConfiguration->camInput);
|
||||||
|
printOutPin(HIP_NAME, boardConfiguration->hip9011IntHoldPin);
|
||||||
|
printOutPin(TACH_NAME, boardConfiguration->tachOutputPin);
|
||||||
|
printOutPin(DIZZY_NAME, engineConfiguration->dizzySparkOutputPin);
|
||||||
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
|
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
|
||||||
printOutPin(WA_CHANNEL_1, boardConfiguration->logicAnalyzerPins[0]);
|
printOutPin(WA_CHANNEL_1, boardConfiguration->logicAnalyzerPins[0]);
|
||||||
printOutPin(WA_CHANNEL_2, boardConfiguration->logicAnalyzerPins[1]);
|
printOutPin(WA_CHANNEL_2, boardConfiguration->logicAnalyzerPins[1]);
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
#include "firing_order.h"
|
#include "firing_order.h"
|
||||||
#include "efifeatures.h"
|
#include "efifeatures.h"
|
||||||
|
|
||||||
|
#define HIP_NAME "HIP"
|
||||||
|
#define TACH_NAME "tach"
|
||||||
|
#define DIZZY_NAME "dizzy"
|
||||||
|
|
||||||
#define ENUM_16_BITS 20000
|
#define ENUM_16_BITS 20000
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,9 @@
|
||||||
#define FAST_MAP_CHART_SKIP_FACTOR 16
|
#define FAST_MAP_CHART_SKIP_FACTOR 16
|
||||||
|
|
||||||
static Logging *logger;
|
static Logging *logger;
|
||||||
|
/**
|
||||||
|
* this instance does not have a real physical pin - it's only used for engine sniffer
|
||||||
|
*/
|
||||||
static NamedOutputPin mapAveragingPin("map");
|
static NamedOutputPin mapAveragingPin("map");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,6 +30,10 @@ InjectorOutputPin::InjectorOutputPin() : NamedOutputPin() {
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
engine_pins_s::engine_pins_s() {
|
||||||
|
dizzyOutput.name = DIZZY_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
void InjectorOutputPin::reset() {
|
void InjectorOutputPin::reset() {
|
||||||
overlappingScheduleOffTime = 0;
|
overlappingScheduleOffTime = 0;
|
||||||
cancelNextTurningInjectorOff = false;
|
cancelNextTurningInjectorOff = false;
|
||||||
|
|
|
@ -55,7 +55,9 @@ public:
|
||||||
bool cancelNextTurningInjectorOff;
|
bool cancelNextTurningInjectorOff;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
class engine_pins_s {
|
||||||
|
public:
|
||||||
|
engine_pins_s();
|
||||||
OutputPin mainRelay;
|
OutputPin mainRelay;
|
||||||
OutputPin fanRelay;
|
OutputPin fanRelay;
|
||||||
OutputPin acRelay;
|
OutputPin acRelay;
|
||||||
|
@ -66,8 +68,8 @@ typedef struct {
|
||||||
|
|
||||||
InjectorOutputPin injectors[INJECTION_PIN_COUNT];
|
InjectorOutputPin injectors[INJECTION_PIN_COUNT];
|
||||||
NamedOutputPin coils[IGNITION_PIN_COUNT];
|
NamedOutputPin coils[IGNITION_PIN_COUNT];
|
||||||
OutputPin dizzyOutput;
|
NamedOutputPin dizzyOutput;
|
||||||
} engine_pins_s;
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* it's a macro to be sure that stack is not used
|
* it's a macro to be sure that stack is not used
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
static OutputPin tachOut;
|
static NamedOutputPin tachOut(TACH_NAME);
|
||||||
static scheduling_s tachTurnSignalOff;
|
static scheduling_s tachTurnSignalOff;
|
||||||
|
|
||||||
static void turnTachPinLow(void) {
|
static void turnTachPinLow(void) {
|
||||||
tachOut.setValue(false);
|
turnPinLow(&tachOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tachSignalCallback(trigger_event_e ckpSignalType,
|
static void tachSignalCallback(trigger_event_e ckpSignalType,
|
||||||
|
@ -27,7 +27,7 @@ static void tachSignalCallback(trigger_event_e ckpSignalType,
|
||||||
if (index != engineConfiguration->tachPulseTriggerIndex) {
|
if (index != engineConfiguration->tachPulseTriggerIndex) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tachOut.setValue(true);
|
turnPinHigh(&tachOut);
|
||||||
scheduleTask("tach off", &tachTurnSignalOff, (int)MS2US(engineConfiguration->tachPulseDuractionMs), (schfunc_t) &turnTachPinLow, NULL);
|
scheduleTask("tach off", &tachTurnSignalOff, (int)MS2US(engineConfiguration->tachPulseDuractionMs), (schfunc_t) &turnTachPinLow, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -295,18 +295,18 @@ void turnSparkPinLow(NamedOutputPin *output) {
|
||||||
turnPinLow(output);
|
turnPinLow(output);
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
if (CONFIG(dizzySparkOutputPin) != GPIO_UNASSIGNED) {
|
if (CONFIG(dizzySparkOutputPin) != GPIO_UNASSIGNED) {
|
||||||
doSetOutputPinValue2(&enginePins.dizzyOutput, false);
|
turnPinLow(&enginePins.dizzyOutput);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* EFI_PROD_CODE */
|
||||||
}
|
}
|
||||||
|
|
||||||
void turnSparkPinHigh(NamedOutputPin *output) {
|
void turnSparkPinHigh(NamedOutputPin *output) {
|
||||||
turnPinHigh(output);
|
turnPinHigh(output);
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
if (CONFIG(dizzySparkOutputPin) != GPIO_UNASSIGNED) {
|
if (CONFIG(dizzySparkOutputPin) != GPIO_UNASSIGNED) {
|
||||||
doSetOutputPinValue2(&enginePins.dizzyOutput, true);
|
turnPinHigh(&enginePins.dizzyOutput);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* EFI_PROD_CODE */
|
||||||
}
|
}
|
||||||
|
|
||||||
static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventIndex, IgnitionEvent *iEvent,
|
static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventIndex, IgnitionEvent *iEvent,
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
||||||
|
|
||||||
static NamedOutputPin intHold("HIP");
|
static NamedOutputPin intHold(HIP_NAME);
|
||||||
static OutputPin hipCs;
|
static OutputPin hipCs;
|
||||||
|
|
||||||
extern uint32_t lastExecutionCount;
|
extern uint32_t lastExecutionCount;
|
||||||
|
|
|
@ -309,5 +309,5 @@ int getRusEfiVersion(void) {
|
||||||
return 123; // this is here to make the compiler happy about the unused array
|
return 123; // this is here to make the compiler happy about the unused array
|
||||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||||
return 3211; // this is here to make the compiler happy about the unused array
|
return 3211; // this is here to make the compiler happy about the unused array
|
||||||
return 20160903;
|
return 20160906;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue