only:dead HW QC

This commit is contained in:
rusefillc 2024-10-11 18:42:11 -04:00
parent 43d6a4c452
commit 0882e723e1
7 changed files with 0 additions and 85 deletions

View File

@ -116,11 +116,6 @@ static void setupDefaultSensorInputs() {
setCommonNTCSensor(&engineConfiguration->auxTempSensor1, MRE_DEFAULT_AT_PULLUP);
setCommonNTCSensor(&engineConfiguration->auxTempSensor2, MRE_DEFAULT_AT_PULLUP);
#endif // EFI_BOOTLOADER
#if HW_CHECK_MODE
engineConfiguration->auxTempSensor1.adcChannel = EFI_ADC_2;
engineConfiguration->auxTempSensor2.adcChannel = EFI_ADC_3;
#endif // HW_CHECK_MODE
}
void setBoardConfigOverrides() {

View File

@ -102,15 +102,9 @@ static void setupEtb() {
static void setupDefaultSensorInputs() {
// trigger inputs
#if VR_HW_CHECK_MODE
// set_trigger_input_pin 0 PE7
engineConfiguration->triggerInputPins[0] = PROTEUS_VR_1;
engineConfiguration->camInputs[0] = PROTEUS_VR_2;
#else
// Digital channel 1 as default - others not set
engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_1;
engineConfiguration->camInputs[0] = Gpio::Unassigned;
#endif
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;

View File

@ -277,12 +277,6 @@ class CommunicationBlinkingTask : public PeriodicTimerController {
setAllLeds(0);
} else if (counter % 2 == 0) {
enginePins.communicationLedPin.setValue(0, /*force*/true);
#if HW_CHECK_SD
extern int totalLoggedBytes;
if (totalLoggedBytes > 2000) {
enginePins.communicationLedPin.setValue(1);
}
#endif // HW_CHECK_SD
enginePins.warningLedPin.setValue(0);
} else {
@ -311,11 +305,6 @@ extern int totalLoggedBytes;
}
enginePins.communicationLedPin.setValue(1, /*force*/true);
//#if HW_CHECK_MODE
// // we have to do anything possible to help users notice FACTORY MODE
// enginePins.errorLedPin.setValue(0);
// enginePins.runningLedPin.setValue(0);
//#endif // HW_CHECK_MODE
#if EFI_ENGINE_CONTROL
if (isTriggerErrorNow()) {

View File

@ -137,14 +137,6 @@ void Engine::updateTriggerWaveform() {
#endif /* EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT */
}
#if ANALOG_HW_CHECK_MODE
static void assertCloseTo(const char* msg, float actual, float expected) {
if (actual < 0.95f * expected || actual > 1.05f * expected) {
criticalError("%s validation failed actual=%f vs expected=%f", msg, actual, expected);
}
}
#endif // ANALOG_HW_CHECK_MODE
void Engine::periodicSlowCallback() {
ScopePerf perf(PE::EnginePeriodicSlowCallback);
@ -191,10 +183,6 @@ void Engine::periodicSlowCallback() {
criticalAssertVoid(isAdcChannelValid(engineConfiguration->clt.adcChannel), "No CLT setting");
efitimesec_t secondsNow = getTimeNowS();
#if ! HW_CHECK_ALWAYS_STIMULATE
fail("HW_CHECK_ALWAYS_STIMULATE required to have self-stimulation")
#endif
int hwCheckRpm = 204;
if (secondsNow > 2 && secondsNow < 180) {
assertCloseTo("RPM", Sensor::get(SensorType::Rpm).Value, hwCheckRpm);

View File

@ -705,11 +705,6 @@ void commonEarlyInit() {
startCanConsole();
#endif /* EFI_CAN_SERIAL */
#if HW_CHECK_ALWAYS_STIMULATE
// we need a special binary for final assembly check. We cannot afford to require too much software or too many steps
// to be executed at the place of assembly
enableTriggerStimulator(/*incGlobalConfiguration*/false);
#endif // HW_CHECK_ALWAYS_STIMULATE
}
// one-time start-up

View File

@ -321,21 +321,7 @@ static FlashState readConfiguration() {
}
void readFromFlash() {
#if HW_CHECK_MODE
/*
* getFlashAddr does device validation, we want validation to be invoked even while we are
* HW_CHECK_MODE mode where we would not need actual address
* todo: rename method to emphasis the fact of validation check?
*/
getFlashAddrFirstCopy();
getFlashAddrSecondCopy();
resetConfigurationExt(DEFAULT_ENGINE_TYPE);
FlashState result = FlashState::Ok;
#else
FlashState result = readConfiguration();
#endif
switch (result) {
case FlashState::CrcFailed:

View File

@ -296,20 +296,6 @@ void handleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index) {
warning(ObdCode::CUSTOM_VVT_MODE_NOT_SELECTED, "VVT: event on %d but no mode", camIndex);
}
#ifdef 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
const auto& vvtShape = tc->vvtShape[camIndex];
bool isVvtWithRealDecoder = vvtWithRealDecoder(engineConfiguration->vvtMode[camIndex]);
@ -452,24 +438,6 @@ uint32_t triggerMaxDuration = 0;
void hwHandleShaftSignal(int signalIndex, bool isRising, efitick_t timestamp) {
TriggerCentral *tc = getTriggerCentral();
ScopePerf perf(PE::HandleShaftSignal);
#ifdef 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;
#if HW_CHECK_ALWAYS_STIMULATE
disableTriggerStimulator();
#endif // HW_CHECK_ALWAYS_STIMULATE
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 (tc->directSelfStimulation || !tc->hwTriggerInputEnabled) {
// sensor noise + self-stim = loss of trigger sync