diff --git a/firmware/config/engines/sachs.cpp b/firmware/config/engines/sachs.cpp index 3e7a528671..ed3ab4a753 100644 --- a/firmware/config/engines/sachs.cpp +++ b/firmware/config/engines/sachs.cpp @@ -23,14 +23,15 @@ void setSachs(engine_configuration_s *engineConfiguration) { * We treat the trigger as 1/0 toothed wheel */ engineConfiguration->trigger.type = TT_TOOTHED_WHEEL; - engineConfiguration->trigger.customTotalToothCount = 1; - engineConfiguration->trigger.customSkippedToothCount = 0; + engineConfiguration->trigger.customTotalToothCount = 50; + engineConfiguration->trigger.customSkippedToothCount = 2; engineConfiguration->hasIatSensor = false; engineConfiguration->hasMapSensor = false; engineConfiguration->hasBaroSensor = false; engineConfiguration->hasAfrSensor = false; engineConfiguration->hasCltSensor = false; + boardConfiguration->useSerialPort = false; // Frankenstein analog input #1: PA1 adc1 // Frankenstein analog input #2: PA3 adc3 TPS @@ -70,5 +71,8 @@ void setSachs(engine_configuration_s *engineConfiguration) { boardConfiguration->triggerInputPins[0] = GPIOA_5; boardConfiguration->triggerInputPins[1] = GPIOC_6; + + boardConfiguration->injectionPins[0] = GPIOC_15; + } diff --git a/firmware/console/binary/tunerstudio_io.cpp b/firmware/console/binary/tunerstudio_io.cpp index fa3cf60a0b..21d65b505d 100644 --- a/firmware/console/binary/tunerstudio_io.cpp +++ b/firmware/console/binary/tunerstudio_io.cpp @@ -32,7 +32,7 @@ void startTsPort(void) { * This method contains a long delay, that's the reason why this is not done on the main thread */ usb_serial_start(); - } else { + } else if (boardConfiguration->useSerialPort) { print("TunerStudio over USART"); mySetPadMode("tunerstudio rx", TS_SERIAL_RX_PORT, TS_SERIAL_RX_PIN, PAL_MODE_ALTERNATE(TS_SERIAL_AF)); diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 19bbcc66ea..d93779ddd1 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -494,6 +494,7 @@ static void setTriggerType(int value) { } static void setToothedWheel(int total, int skipped) { + scheduleMsg(&logger, "toothed: total=%d/skipped=%d", total, skipped); setToothedWheelConfiguration(&engine->triggerShape, total, skipped, engineConfiguration); // initializeTriggerShape(&logger, engineConfiguration, engineConfiguration2); incrementGlobalConfigurationVersion(); diff --git a/firmware/svnversion.h b/firmware/svnversion.h index e61aa20cce..9294bf2df3 100644 --- a/firmware/svnversion.h +++ b/firmware/svnversion.h @@ -1,5 +1,5 @@ // This file was generated by Version2Header -// Sat Mar 14 21:30:36 EDT 2015 +// Sun Mar 22 11:16:21 EDT 2015 #ifndef VCS_VERSION -#define VCS_VERSION "7427" +#define VCS_VERSION "7501" #endif diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index ac70170f33..84f12ec590 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -1185,7 +1185,8 @@ fileVersion = { 20150314 } ; Tuning->General dialog = generalSettings, "General" - field = "tunerStudioSerialSpeed", tunerStudioSerialSpeed + field = "tunerStudioSerialSpeed", tunerStudioSerialSpeed + field = "Use PC10/PC11 serial?", useSerialPort field = "RPM Hard Limit", rpmHardLimit field = "" field = "Fuel Algorithm", algorithm diff --git a/java_console/autotest/src/com/rusefi/TestingUtils.java b/java_console/autotest/src/com/rusefi/TestingUtils.java index 168e3e2063..e2daca5834 100644 --- a/java_console/autotest/src/com/rusefi/TestingUtils.java +++ b/java_console/autotest/src/com/rusefi/TestingUtils.java @@ -113,7 +113,6 @@ public class TestingUtils { // todo: improve this logic, compare times IoUtil.sendCommand("reset_wave_chart"); getWaveChart(); - getWaveChart(); // we want to wait for the 2nd chart to see same same RPM across the whole chart String result = getWaveChart(); FileLog.MAIN.logLine("current chart: " + result); diff --git a/unit_tests/test_trigger_decoder.cpp b/unit_tests/test_trigger_decoder.cpp index 8735db3afd..c9734b4962 100644 --- a/unit_tests/test_trigger_decoder.cpp +++ b/unit_tests/test_trigger_decoder.cpp @@ -516,7 +516,7 @@ void testTriggerDecoder(void) { testTriggerDecoder3("citroen", CITROEN_TU3JP, 0, 0.4833, 0.0, 2.9994); testTriggerDecoder3("neon NGC", DODGE_NEON_2003, 0, 0.4786, 0.0, CHRYSLER_NGC_GAP); - testTriggerDecoder2("sachs", SACHS, 0, 0.5000, 0.000); + testTriggerDecoder2("sachs", SACHS, 0, 0.4800, 0.000); testMazda323();