mirror of https://github.com/rusefi/rusefi.git
Usability: critical error in case of unneeded second channel #6419
This commit is contained in:
parent
083c519f1e
commit
d8eaa79dce
|
@ -87,5 +87,5 @@ void setFordInline6() {
|
|||
engineConfiguration->mafAdcChannel = EFI_ADC_1;
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A8;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::A5;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
}
|
||||
|
|
|
@ -771,6 +771,14 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio
|
|||
warning(ObdCode::CUSTOM_ERR_NO_SHAPE, "initializeTriggerWaveform() not implemented: %d", triggerType.type);
|
||||
}
|
||||
|
||||
if (!needSecondTriggerInput &&
|
||||
#if EFI_UNIT_TEST
|
||||
engineConfiguration != nullptr &&
|
||||
#endif
|
||||
engineConfiguration->triggerInputPins[1] != Gpio::Unassigned) {
|
||||
criticalError("Single-channel trigger %s selected while two inputs were configured", getTrigger_type_e(triggerType.type));
|
||||
}
|
||||
|
||||
/**
|
||||
* Feb 2019 suggestion: it would be an improvement to remove 'expectedEventCount' logic from 'addEvent'
|
||||
* and move it here, after all events were added.
|
||||
|
|
|
@ -20,6 +20,7 @@ GTEST_API_ int main(int argc, char **argv) {
|
|||
* See TEST_FROM_TRIGGER_ID to limit test just for last trigger
|
||||
*/
|
||||
// setVerboseTrigger(true);
|
||||
// --gtest_filter=*TEST_NAME*
|
||||
//::testing::GTEST_FLAG(filter) = "*AllTriggersFixture*";
|
||||
int result = RUN_ALL_TESTS();
|
||||
// windows ERRORLEVEL in Jenkins batch file seems to want negative value to detect failure
|
||||
|
|
|
@ -79,6 +79,7 @@ TEST(trigger, testNoisyInput) {
|
|||
TEST(trigger, testCamInput) {
|
||||
// setting some weird engine
|
||||
EngineTestHelper eth(engine_type_e::FORD_ESCORT_GT);
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
|
||||
// changing to 'ONE TOOTH' trigger on CRANK with CAM/VVT
|
||||
setCrankOperationMode();
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
TEST(trigger, testQuadCamInput) {
|
||||
// setting some weird engine
|
||||
EngineTestHelper eth(engine_type_e::FORD_ESCORT_GT);
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->isFasterEngineSpinUpEnabled = false;
|
||||
engineConfiguration->alwaysInstantRpm = true;
|
||||
|
||||
|
|
|
@ -174,6 +174,7 @@ extern bool debugSignalExecutor;
|
|||
|
||||
TEST(misc, testRpmCalculator) {
|
||||
EngineTestHelper eth(engine_type_e::FORD_INLINE_6_1995);
|
||||
efiAssertVoid(ObdCode::CUSTOM_ERR_6670, engineConfiguration!=NULL, "null config in engine");
|
||||
|
||||
setTable(config->injectionPhase, -180.0f);
|
||||
|
||||
|
@ -190,8 +191,6 @@ TEST(misc, testRpmCalculator) {
|
|||
|
||||
ASSERT_EQ( 720, engine->engineState.engineCycle) << "engineCycle";
|
||||
|
||||
efiAssertVoid(ObdCode::CUSTOM_ERR_6670, engineConfiguration!=NULL, "null config in engine");
|
||||
|
||||
engineConfiguration->minimumIgnitionTiming = -15;
|
||||
float timingAdvance = -13;
|
||||
setWholeTimingTable(timingAdvance);
|
||||
|
|
|
@ -44,6 +44,7 @@ static auto makeTriggerShape(operation_mode_e mode, const TriggerConfiguration&
|
|||
TEST(TriggerDecoder, FindsFirstSyncPoint) {
|
||||
MockTriggerConfiguration cfg({trigger_type_e::TT_TOOTHED_WHEEL, 4, 1});
|
||||
cfg.update();
|
||||
engineConfiguration = nullptr;
|
||||
|
||||
auto shape = makeTriggerShape(FOUR_STROKE_CAM_SENSOR, cfg);
|
||||
|
||||
|
|
Loading…
Reference in New Issue