mirror of https://github.com/rusefi/rusefi-1.git
use limp mgr for trigger disable (#2145)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
parent
ff4ce2fb1f
commit
19bf208cde
|
@ -276,6 +276,11 @@ uint32_t triggerMaxDuration = 0;
|
||||||
void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) {
|
void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) {
|
||||||
ScopePerf perf(PE::HandleShaftSignal);
|
ScopePerf perf(PE::HandleShaftSignal);
|
||||||
|
|
||||||
|
// Don't accept trigger input in case of some problems
|
||||||
|
if (!engine->limpManager.allowTriggerInput()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#if VR_HW_CHECK_MODE
|
#if VR_HW_CHECK_MODE
|
||||||
// some boards do not have hardware VR input LEDs which makes such boards harder to validate
|
// some boards do not have hardware VR input LEDs which makes such boards harder to validate
|
||||||
// from experience we know that assembly mistakes happen and quality control is required
|
// from experience we know that assembly mistakes happen and quality control is required
|
||||||
|
|
|
@ -37,8 +37,6 @@ static void shaft_callback(void *arg) {
|
||||||
|
|
||||||
// todo: support for 3rd trigger input channel
|
// todo: support for 3rd trigger input channel
|
||||||
// todo: start using real event time from HW event, not just software timer?
|
// todo: start using real event time from HW event, not just software timer?
|
||||||
if (hasFirmwareErrorFlag)
|
|
||||||
return;
|
|
||||||
|
|
||||||
bool isPrimary = pal_line == primary_line;
|
bool isPrimary = pal_line == primary_line;
|
||||||
if (!isPrimary && !TRIGGER_WAVEFORM(needSecondTriggerInput)) {
|
if (!isPrimary && !TRIGGER_WAVEFORM(needSecondTriggerInput)) {
|
||||||
|
|
|
@ -65,8 +65,7 @@ static void shaftRisingCallback(bool isPrimary) {
|
||||||
}
|
}
|
||||||
icuRisingCallbackCounter++;
|
icuRisingCallbackCounter++;
|
||||||
// todo: support for 3rd trigger input channel
|
// todo: support for 3rd trigger input channel
|
||||||
if (hasFirmwareErrorFlag)
|
|
||||||
return;
|
|
||||||
if (!isPrimary && !TRIGGER_WAVEFORM(needSecondTriggerInput)) {
|
if (!isPrimary && !TRIGGER_WAVEFORM(needSecondTriggerInput)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -86,8 +85,6 @@ static void shaftFallingCallback(bool isPrimary) {
|
||||||
|
|
||||||
icuFallingCallbackCounter++;
|
icuFallingCallbackCounter++;
|
||||||
|
|
||||||
if (hasFirmwareErrorFlag)
|
|
||||||
return;
|
|
||||||
if (!isPrimary && !TRIGGER_WAVEFORM(needSecondTriggerInput)) {
|
if (!isPrimary && !TRIGGER_WAVEFORM(needSecondTriggerInput)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,8 +71,6 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
extern bool hasFirmwareErrorFlag;
|
|
||||||
|
|
||||||
#if HAL_USE_SPI
|
#if HAL_USE_SPI
|
||||||
extern bool isSpiInitialized[5];
|
extern bool isSpiInitialized[5];
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,6 @@ extern "C" void toggleLed(int led, int mode);
|
||||||
#define BOARD_MOD1_PORT GPIOD
|
#define BOARD_MOD1_PORT GPIOD
|
||||||
#define BOARD_MOD1_PIN 5
|
#define BOARD_MOD1_PIN 5
|
||||||
|
|
||||||
|
|
||||||
extern bool hasFirmwareErrorFlag;
|
|
||||||
|
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
static Logging *logger;
|
static Logging *logger;
|
||||||
|
@ -116,8 +113,6 @@ static void onTriggerChanged(efitick_t stamp, bool isPrimary, bool isRising) {
|
||||||
#if 1
|
#if 1
|
||||||
// todo: support for 3rd trigger input channel
|
// todo: support for 3rd trigger input channel
|
||||||
// todo: start using real event time from HW event, not just software timer?
|
// todo: start using real event time from HW event, not just software timer?
|
||||||
if (hasFirmwareErrorFlag)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!isPrimary && !TRIGGER_WAVEFORM(needSecondTriggerInput)) {
|
if (!isPrimary && !TRIGGER_WAVEFORM(needSecondTriggerInput)) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue