auto-sync

This commit is contained in:
rusEfi 2015-01-25 21:04:53 -06:00
parent d6027a30d3
commit 443a8c7ea5
2 changed files with 19 additions and 36 deletions

View File

@ -149,39 +149,17 @@ static void fuelbench2(const char *delayStr, const char *indexStr, const char *
}
void fanBench(void) {
brainPin = boardConfiguration->fanPin;
pinX = &enginePins.fanRelay;
delayMs = 0;
onTime = 3000;
offTime = 0;
count = 1;
needToRunBench = true;
pinbench("0", "3000", "0", "1", &enginePins.fanRelay, boardConfiguration->fanPin);
}
extern OutputPin checkEnginePin;
void milBench(void) {
// brainPin = boardConfiguration->malfunctionIndicatorPin;
// pinX = C;
//
// delayMs = 0;
// onTime = 3000;
// offTime = 0;
// count = 1;
//
// needToRunBench = true;
pinbench("0", "3000", "0", "1", &checkEnginePin, boardConfiguration->malfunctionIndicatorPin);
}
void fuelPumpBench(void) {
brainPin = boardConfiguration->fuelPumpPin;
pinX = &enginePins.fuelPumpRelay;
delayMs = 0;
onTime = 3000;
offTime = 0;
count = 1;
needToRunBench = true;
pinbench("0", "3000", "0", "1", &enginePins.fuelPumpRelay, boardConfiguration->fuelPumpPin);
}
// fuelbench 5 1000 2
@ -244,7 +222,7 @@ void initInjectorCentral(Engine *engine) {
outputPinRegisterExt2(output->name, output, boardConfiguration->injectionPins[i],
&boardConfiguration->injectionPinMode);
}
printStatus();
addConsoleActionII("injector", setInjectorEnabled);

View File

@ -65,7 +65,7 @@ static int DigitLength(int digit) {
static void DisplayErrorCode(int length, int code) {
// todo: I suggest we use 'itoa' method to simplify this logic
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
while (code >= ourDigit) {
code = code - ourDigit;
@ -80,11 +80,11 @@ static void DisplayErrorCode(int length, int code) {
// our main thread for show check engine error
#if defined __GNUC__
__attribute__((noreturn)) static msg_t mfiThread(void)
__attribute__((noreturn)) static msg_t mfiThread(void)
#else
static msg_t mfiThread(void)
static msg_t mfiThread(void)
#endif
{
{
chRegSetThreadName("MFIndicator");
error_codes_set_s localErrorCopy;
@ -100,12 +100,17 @@ static msg_t mfiThread(void)
}
}
void initMalfunctionIndicator(Engine *engine) {
// create static thread
chThdCreateStatic(mfiThreadStack, sizeof(mfiThreadStack), LOWPRIO, (tfunc_t) mfiThread, NULL);
// only for debug
static void testMil(void) {
addError(OBD_Engine_Coolant_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 */