auto-sync
This commit is contained in:
parent
d6027a30d3
commit
443a8c7ea5
|
@ -149,39 +149,17 @@ static void fuelbench2(const char *delayStr, const char *indexStr, const char *
|
||||||
}
|
}
|
||||||
|
|
||||||
void fanBench(void) {
|
void fanBench(void) {
|
||||||
brainPin = boardConfiguration->fanPin;
|
pinbench("0", "3000", "0", "1", &enginePins.fanRelay, boardConfiguration->fanPin);
|
||||||
pinX = &enginePins.fanRelay;
|
|
||||||
|
|
||||||
delayMs = 0;
|
|
||||||
onTime = 3000;
|
|
||||||
offTime = 0;
|
|
||||||
count = 1;
|
|
||||||
|
|
||||||
needToRunBench = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern OutputPin checkEnginePin;
|
||||||
|
|
||||||
void milBench(void) {
|
void milBench(void) {
|
||||||
// brainPin = boardConfiguration->malfunctionIndicatorPin;
|
pinbench("0", "3000", "0", "1", &checkEnginePin, boardConfiguration->malfunctionIndicatorPin);
|
||||||
// pinX = C;
|
|
||||||
//
|
|
||||||
// delayMs = 0;
|
|
||||||
// onTime = 3000;
|
|
||||||
// offTime = 0;
|
|
||||||
// count = 1;
|
|
||||||
//
|
|
||||||
// needToRunBench = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void fuelPumpBench(void) {
|
void fuelPumpBench(void) {
|
||||||
brainPin = boardConfiguration->fuelPumpPin;
|
pinbench("0", "3000", "0", "1", &enginePins.fuelPumpRelay, boardConfiguration->fuelPumpPin);
|
||||||
pinX = &enginePins.fuelPumpRelay;
|
|
||||||
|
|
||||||
delayMs = 0;
|
|
||||||
onTime = 3000;
|
|
||||||
offTime = 0;
|
|
||||||
count = 1;
|
|
||||||
|
|
||||||
needToRunBench = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fuelbench 5 1000 2
|
// fuelbench 5 1000 2
|
||||||
|
@ -244,7 +222,7 @@ void initInjectorCentral(Engine *engine) {
|
||||||
outputPinRegisterExt2(output->name, output, boardConfiguration->injectionPins[i],
|
outputPinRegisterExt2(output->name, output, boardConfiguration->injectionPins[i],
|
||||||
&boardConfiguration->injectionPinMode);
|
&boardConfiguration->injectionPinMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
printStatus();
|
printStatus();
|
||||||
addConsoleActionII("injector", setInjectorEnabled);
|
addConsoleActionII("injector", setInjectorEnabled);
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ static int DigitLength(int digit) {
|
||||||
static void DisplayErrorCode(int length, int code) {
|
static void DisplayErrorCode(int length, int code) {
|
||||||
// todo: I suggest we use 'itoa' method to simplify this logic
|
// todo: I suggest we use 'itoa' method to simplify this logic
|
||||||
for (int iter = length - 1; iter >= 0; iter--) {
|
for (int iter = length - 1; iter >= 0; iter--) {
|
||||||
int ourDigit = (int)efiPow10(iter); // 10^0 = 1, 10^1 = 10, 10^2=100, 10^3 = 1000, ....
|
int ourDigit = (int) efiPow10(iter); // 10^0 = 1, 10^1 = 10, 10^2=100, 10^3 = 1000, ....
|
||||||
int digit = 1; // as we remember "0" we show as one blink
|
int digit = 1; // as we remember "0" we show as one blink
|
||||||
while (code >= ourDigit) {
|
while (code >= ourDigit) {
|
||||||
code = code - ourDigit;
|
code = code - ourDigit;
|
||||||
|
@ -80,11 +80,11 @@ static void DisplayErrorCode(int length, int code) {
|
||||||
|
|
||||||
// our main thread for show check engine error
|
// our main thread for show check engine error
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
__attribute__((noreturn)) static msg_t mfiThread(void)
|
__attribute__((noreturn)) static msg_t mfiThread(void)
|
||||||
#else
|
#else
|
||||||
static msg_t mfiThread(void)
|
static msg_t mfiThread(void)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
chRegSetThreadName("MFIndicator");
|
chRegSetThreadName("MFIndicator");
|
||||||
error_codes_set_s localErrorCopy;
|
error_codes_set_s localErrorCopy;
|
||||||
|
|
||||||
|
@ -100,12 +100,17 @@ static msg_t mfiThread(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void initMalfunctionIndicator(Engine *engine) {
|
static void testMil(void) {
|
||||||
// create static thread
|
|
||||||
chThdCreateStatic(mfiThreadStack, sizeof(mfiThreadStack), LOWPRIO, (tfunc_t) mfiThread, NULL);
|
|
||||||
// only for debug
|
|
||||||
addError(OBD_Engine_Coolant_Temperature_Circuit_Malfunction);
|
addError(OBD_Engine_Coolant_Temperature_Circuit_Malfunction);
|
||||||
addError(OBD_Intake_Air_Temperature_Circuit_Malfunction);
|
addError(OBD_Intake_Air_Temperature_Circuit_Malfunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void initMalfunctionIndicator(Engine *engine) {
|
||||||
|
// create static thread
|
||||||
|
chThdCreateStatic(mfiThreadStack, sizeof(mfiThreadStack), LOWPRIO, (tfunc_t) mfiThread, NULL);
|
||||||
|
|
||||||
|
addConsoleAction("testmil", testMil);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* EFI_MALFUNCTION_INDICATOR */
|
#endif /* EFI_MALFUNCTION_INDICATOR */
|
||||||
|
|
Loading…
Reference in New Issue