gcc 2019 q3 fails integration testing #886

kind of guessing potential problem
This commit is contained in:
rusefi 2019-07-14 15:47:08 -04:00
parent 56a6cdd329
commit 1769fdb770
8 changed files with 33 additions and 6 deletions

View File

@ -364,6 +364,9 @@
#define clutchUpPinInverted_offset_hex 3d0 #define clutchUpPinInverted_offset_hex 3d0
#define clutchUpPinMode_offset 971 #define clutchUpPinMode_offset 971
#define clutchUpPinMode_offset_hex 3cb #define clutchUpPinMode_offset_hex 3cb
#define CMD_DISABLE "disable"
#define CMD_ENABLE "enable"
#define CMD_TRIGGER_HW_INPUT "trigger_hw_input"
#define CMD_TRIGGERINFO "triggerinfo" #define CMD_TRIGGERINFO "triggerinfo"
#define CMD_WRITECONFIG "writeconfig" #define CMD_WRITECONFIG "writeconfig"
#define coastingFuelCutClt_offset 3154 #define coastingFuelCutClt_offset 3154

View File

@ -869,9 +869,13 @@ static void setSpiMode(int index, bool mode) {
printSpiState(&logger, boardConfiguration); printSpiState(&logger, boardConfiguration);
} }
extern bool hwTriggerInputEnabled;
static void enableOrDisable(const char *param, bool isEnabled) { static void enableOrDisable(const char *param, bool isEnabled) {
if (strEqualCaseInsensitive(param, "fastadc")) { if (strEqualCaseInsensitive(param, "fastadc")) {
boardConfiguration->isFastAdcEnabled = isEnabled; boardConfiguration->isFastAdcEnabled = isEnabled;
} else if (strEqualCaseInsensitive(param, CMD_TRIGGER_HW_INPUT)) {
hwTriggerInputEnabled = isEnabled;
} else if (strEqualCaseInsensitive(param, "etb_auto")) { } else if (strEqualCaseInsensitive(param, "etb_auto")) {
engine->etbAutoTune = isEnabled; engine->etbAutoTune = isEnabled;
} else if (strEqualCaseInsensitive(param, "cranking_constant_dwell")) { } else if (strEqualCaseInsensitive(param, "cranking_constant_dwell")) {
@ -1376,8 +1380,8 @@ void initSettings(void) {
addConsoleActionI("enable_spi", enableSpi); addConsoleActionI("enable_spi", enableSpi);
addConsoleActionI("disable_spi", disableSpi); addConsoleActionI("disable_spi", disableSpi);
addConsoleActionS("enable", enable); addConsoleActionS(CMD_ENABLE, enable);
addConsoleActionS("disable", disable); addConsoleActionS(CMD_DISABLE, disable);
addConsoleActionII("set_toothed_wheel", setToothedWheel); addConsoleActionII("set_toothed_wheel", setToothedWheel);

View File

@ -20,6 +20,7 @@
volatile int icuWidthCallbackCounter = 0; volatile int icuWidthCallbackCounter = 0;
volatile int icuWidthPeriodCounter = 0; volatile int icuWidthPeriodCounter = 0;
bool hwTriggerInputEnabled = true; // this is useful at least for real hardware integration testing
#if EFI_SHAFT_POSITION_INPUT && (HAL_TRIGGER_USE_PAL == TRUE || HAL_USE_ICU == TRUE) && (HAL_USE_COMP == FALSE) #if EFI_SHAFT_POSITION_INPUT && (HAL_TRIGGER_USE_PAL == TRUE || HAL_USE_ICU == TRUE) && (HAL_USE_COMP == FALSE)
@ -132,6 +133,9 @@ static void cam_icu_period_callback(ICUDriver *icup) {
* 'width' events happens before the 'period' event * 'width' events happens before the 'period' event
*/ */
static void shaft_icu_width_callback(ICUDriver *icup) { static void shaft_icu_width_callback(ICUDriver *icup) {
if (!hwTriggerInputEnabled) {
return;
}
icuWidthCallbackCounter++; icuWidthCallbackCounter++;
// 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?
@ -149,6 +153,9 @@ static void shaft_icu_width_callback(ICUDriver *icup) {
} }
static void shaft_icu_period_callback(ICUDriver *icup) { static void shaft_icu_period_callback(ICUDriver *icup) {
if (!hwTriggerInputEnabled) {
return;
}
icuWidthPeriodCounter++; icuWidthPeriodCounter++;
if (hasFirmwareErrorFlag) if (hasFirmwareErrorFlag)
return; return;

View File

@ -1227,6 +1227,9 @@ end_struct
#define CMD_TRIGGERINFO "triggerinfo" #define CMD_TRIGGERINFO "triggerinfo"
#define CMD_WRITECONFIG "writeconfig" #define CMD_WRITECONFIG "writeconfig"
#define CMD_ENABLE "enable"
#define CMD_DISABLE "disable"
#define CMD_TRIGGER_HW_INPUT "trigger_hw_input"
#define PROTOCOL_ANALOG_CHART "analog_chart" #define PROTOCOL_ANALOG_CHART "analog_chart"
#define PROTOCOL_ENGINE_SNIFFER "wave_chart" #define PROTOCOL_ENGINE_SNIFFER "wave_chart"

View File

@ -13,6 +13,7 @@ import com.rusefi.waves.EngineReport;
import static com.rusefi.TestingUtils.nextChart; import static com.rusefi.TestingUtils.nextChart;
import static com.rusefi.IoUtil.sleep; import static com.rusefi.IoUtil.sleep;
import static com.rusefi.TestingUtils.*; import static com.rusefi.TestingUtils.*;
import static com.rusefi.io.CommandQueue.disableCommand;
import static com.rusefi.waves.EngineReport.isCloseEnough; import static com.rusefi.waves.EngineReport.isCloseEnough;
/** /**
@ -38,6 +39,7 @@ public class AutoTest {
}); });
sendCommand("fl 1"); // just in case it was disabled sendCommand("fl 1"); // just in case it was disabled
sendCommand(disableCommand(Fields.CMD_TRIGGER_HW_INPUT));
testCustomEngine(); testCustomEngine();
testMazdaMiata2003(); testMazdaMiata2003();
test2003DodgeNeon(); test2003DodgeNeon();

View File

@ -1,6 +1,7 @@
package com.rusefi.io; package com.rusefi.io;
import com.rusefi.FileLog; import com.rusefi.FileLog;
import com.rusefi.config.generated.Fields;
import com.rusefi.core.MessagesCentral; import com.rusefi.core.MessagesCentral;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -209,4 +210,8 @@ public class CommandQueue {
public interface CommandQueueListener { public interface CommandQueueListener {
void onCommand(String command); void onCommand(String command);
} }
public static String disableCommand(String command) {
return Fields.CMD_DISABLE + " " + command;
}
} }

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated; package com.rusefi.config.generated;
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Jul 14 15:12:56 EDT 2019 // this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Jul 14 15:33:42 EDT 2019
import com.rusefi.config.*; import com.rusefi.config.*;
@ -233,6 +233,9 @@ public class Fields {
public static final int clutchUpPin_offset = 969; public static final int clutchUpPin_offset = 969;
public static final int clutchUpPinInverted_offset = 976; public static final int clutchUpPinInverted_offset = 976;
public static final int clutchUpPinMode_offset = 971; public static final int clutchUpPinMode_offset = 971;
public static final String CMD_DISABLE = "disable";
public static final String CMD_ENABLE = "enable";
public static final String CMD_TRIGGER_HW_INPUT = "trigger_hw_input";
public static final String CMD_TRIGGERINFO = "triggerinfo"; public static final String CMD_TRIGGERINFO = "triggerinfo";
public static final String CMD_WRITECONFIG = "writeconfig"; public static final String CMD_WRITECONFIG = "writeconfig";
public static final int coastingFuelCutClt_offset = 3154; public static final int coastingFuelCutClt_offset = 3154;

View File

@ -1,6 +1,5 @@
package com.rusefi.ui; package com.rusefi.ui;
import com.rusefi.AverageAngles;
import com.rusefi.AverageAnglesUtil; import com.rusefi.AverageAnglesUtil;
import com.rusefi.FileLog; import com.rusefi.FileLog;
import com.rusefi.config.generated.Fields; import com.rusefi.config.generated.Fields;
@ -20,6 +19,7 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import static com.rusefi.config.generated.Fields.CMD_TRIGGERINFO; import static com.rusefi.config.generated.Fields.CMD_TRIGGERINFO;
import static com.rusefi.io.CommandQueue.disableCommand;
import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
/** /**
@ -127,9 +127,9 @@ public class RecentCommands {
add(Fields.CMD_WRITECONFIG); add(Fields.CMD_WRITECONFIG);
add("rewriteconfig"); add("rewriteconfig");
add("enable injection"); add("enable injection");
add("disable injection"); add(disableCommand("injection"));
add("enable ignition"); add("enable ignition");
add("disable ignition"); add(disableCommand("ignition"));
add("enable self_stimulation"); add("enable self_stimulation");
add("disable self_stimulation"); add("disable self_stimulation");