parent
c3dd2d6c3a
commit
d897a96c05
|
@ -224,12 +224,6 @@ static Logging logicAnalyzerLogger("logic analyzer", logicAnalyzerBuffer, sizeof
|
||||||
* todo: is this mostly dead code?
|
* todo: is this mostly dead code?
|
||||||
*/
|
*/
|
||||||
void updateDevConsoleState() {
|
void updateDevConsoleState() {
|
||||||
// todo: make SWO work
|
|
||||||
// char *msg = "hello\r\n";
|
|
||||||
// for(int i=0;i<strlen(msg);i++) {
|
|
||||||
// ITM_SendChar(msg[i]);
|
|
||||||
// }
|
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
// todo: unify with simulator!
|
// todo: unify with simulator!
|
||||||
if (hasFirmwareError()) {
|
if (hasFirmwareError()) {
|
||||||
|
@ -362,7 +356,7 @@ extern int totalLoggedBytes;
|
||||||
//#endif // HW_CHECK_MODE
|
//#endif // HW_CHECK_MODE
|
||||||
|
|
||||||
#if EFI_ENGINE_CONTROL
|
#if EFI_ENGINE_CONTROL
|
||||||
if (lowVBatt || isTriggerErrorNow() || isIgnitionTimingError()) {
|
if (lowVBatt || isTriggerErrorNow()) {
|
||||||
// todo: at the moment warning codes do not affect warning LED?!
|
// todo: at the moment warning codes do not affect warning LED?!
|
||||||
enginePins.warningLedPin.setValue(1);
|
enginePins.warningLedPin.setValue(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,14 +30,8 @@ extern bool verboseMode;
|
||||||
extern bool printFuelDebug;
|
extern bool printFuelDebug;
|
||||||
#endif // EFI_PRINTF_FUEL_DETAILS
|
#endif // EFI_PRINTF_FUEL_DETAILS
|
||||||
|
|
||||||
static cyclic_buffer<int> ignitionErrorDetection;
|
|
||||||
|
|
||||||
static const char *prevSparkName = nullptr;
|
static const char *prevSparkName = nullptr;
|
||||||
|
|
||||||
int isIgnitionTimingError(void) {
|
|
||||||
return ignitionErrorDetection.sum(6) > 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void fireSparkBySettingPinLow(IgnitionEvent *event, IgnitionOutputPin *output) {
|
static void fireSparkBySettingPinLow(IgnitionEvent *event, IgnitionOutputPin *output) {
|
||||||
#if SPARK_EXTREME_LOGGING
|
#if SPARK_EXTREME_LOGGING
|
||||||
efiPrintf("spark goes low %d %s %d current=%d cnt=%d id=%d", getRevolutionCounter(), output->name, (int)getTimeNowUs(),
|
efiPrintf("spark goes low %d %s %d current=%d cnt=%d id=%d", getRevolutionCounter(), output->name, (int)getTimeNowUs(),
|
||||||
|
|
|
@ -13,5 +13,3 @@ void fireSparkAndPrepareNextSchedule(IgnitionEvent *event);
|
||||||
int getNumberOfSparks(ignition_mode_e mode);
|
int getNumberOfSparks(ignition_mode_e mode);
|
||||||
percent_t getCoilDutyCycle(int rpm);
|
percent_t getCoilDutyCycle(int rpm);
|
||||||
void initializeIgnitionActions();
|
void initializeIgnitionActions();
|
||||||
|
|
||||||
int isIgnitionTimingError(void);
|
|
||||||
|
|
Loading…
Reference in New Issue