VR_HW_CHECK_MODE
This commit is contained in:
parent
f3b71d0ab8
commit
c0cbc2a31f
|
@ -122,6 +122,8 @@ static void setupDefaultSensorInputs() {
|
|||
// set_trigger_input_pin 0 PE7
|
||||
// GPIOE_7: "VR 1"
|
||||
engineConfiguration->triggerInputPins[0] = GPIOE_7;
|
||||
// GPIOE_8: "VR 2"
|
||||
engineConfiguration->camInputs[0] = GPIOE_8;
|
||||
#else
|
||||
// Digital channel 1 as default - others not set
|
||||
engineConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||
|
|
|
@ -94,6 +94,20 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_
|
|||
tc->vvtEventFallCounter++;
|
||||
}
|
||||
|
||||
#if VR_HW_CHECK_MODE
|
||||
// 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
|
||||
extern ioportid_t criticalErrorLedPort;
|
||||
extern ioportmask_t criticalErrorLedPin;
|
||||
|
||||
for (int i = 0 ; i < 100 ; i++) {
|
||||
// turning pin ON and busy-waiting a bit
|
||||
palWritePad(criticalErrorLedPort, criticalErrorLedPin, 1);
|
||||
}
|
||||
|
||||
palWritePad(criticalErrorLedPort, criticalErrorLedPin, 0);
|
||||
#endif // VR_HW_CHECK_MODE
|
||||
|
||||
if (!CONFIG(displayLogicLevelsInEngineSniffer)) {
|
||||
addEngineSnifferEvent(PROTOCOL_VVT_NAME, front == TV_RISE ? PROTOCOL_ES_UP : PROTOCOL_ES_DOWN);
|
||||
|
||||
|
|
Loading…
Reference in New Issue