simulator crashes on any TS setting change fix #924
This commit is contained in:
parent
7676261ec6
commit
917676b2da
|
@ -655,6 +655,10 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S
|
||||||
initSensorChart();
|
initSensorChart();
|
||||||
#endif /* EFI_SENSOR_CHART */
|
#endif /* EFI_SENSOR_CHART */
|
||||||
|
|
||||||
|
#if EFI_IDLE_CONTROL
|
||||||
|
startIdleThread(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
#endif /* EFI_IDLE_CONTROL */
|
||||||
|
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||||
// todo: this is a mess, remove code duplication with simulator
|
// todo: this is a mess, remove code duplication with simulator
|
||||||
initSettings();
|
initSettings();
|
||||||
|
@ -679,8 +683,6 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
|
||||||
addConsoleAction("analoginfo", printAnalogInfo);
|
addConsoleAction("analoginfo", printAnalogInfo);
|
||||||
commonInitEngineController(sharedLogger);
|
commonInitEngineController(sharedLogger);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
initPwmGenerator();
|
initPwmGenerator();
|
||||||
#endif
|
#endif
|
||||||
|
@ -770,10 +772,6 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
|
||||||
}
|
}
|
||||||
#endif /* EFI_ENGINE_CONTROL */
|
#endif /* EFI_ENGINE_CONTROL */
|
||||||
|
|
||||||
#if EFI_IDLE_CONTROL
|
|
||||||
startIdleThread(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
|
|
||||||
#endif /* EFI_IDLE_CONTROL */
|
|
||||||
|
|
||||||
if (engineConfiguration->externalKnockSenseAdc != EFI_ADC_NONE) {
|
if (engineConfiguration->externalKnockSenseAdc != EFI_ADC_NONE) {
|
||||||
addConsoleAction("knockinfo", getKnockInfo);
|
addConsoleAction("knockinfo", getKnockInfo);
|
||||||
}
|
}
|
||||||
|
@ -816,6 +814,6 @@ int getRusEfiVersion(void) {
|
||||||
if (initBootloader() != 0)
|
if (initBootloader() != 0)
|
||||||
return 123;
|
return 123;
|
||||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||||
return 20190905;
|
return 20190909;
|
||||||
}
|
}
|
||||||
#endif /* EFI_UNIT_TEST */
|
#endif /* EFI_UNIT_TEST */
|
||||||
|
|
|
@ -29,6 +29,8 @@ void Pid::initPidClass(pid_s *parameters) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Pid::isSame(pid_s *parameters) const {
|
bool Pid::isSame(pid_s *parameters) const {
|
||||||
|
efiAssert(OBD_PCM_Processor_Fault, this->parameters != NULL, "PID::isSame invalid", false);
|
||||||
|
efiAssert(OBD_PCM_Processor_Fault, parameters != NULL, "PID::isSame NULL", false);
|
||||||
return this->parameters->pFactor == parameters->pFactor
|
return this->parameters->pFactor == parameters->pFactor
|
||||||
&& this->parameters->iFactor == parameters->iFactor
|
&& this->parameters->iFactor == parameters->iFactor
|
||||||
&& this->parameters->dFactor == parameters->dFactor
|
&& this->parameters->dFactor == parameters->dFactor
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package com.rusefi;
|
package com.rusefi;
|
||||||
|
|
||||||
|
|
||||||
|
import com.opensr5.Logger;
|
||||||
|
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||||
|
import com.rusefi.binaryprotocol.BinaryProtocolHolder;
|
||||||
import com.rusefi.config.generated.Fields;
|
import com.rusefi.config.generated.Fields;
|
||||||
import com.rusefi.core.MessagesCentral;
|
import com.rusefi.core.MessagesCentral;
|
||||||
import com.rusefi.core.Sensor;
|
import com.rusefi.core.Sensor;
|
||||||
|
@ -10,7 +13,6 @@ import com.rusefi.io.ConnectionStatus;
|
||||||
import com.rusefi.waves.EngineChart;
|
import com.rusefi.waves.EngineChart;
|
||||||
import com.rusefi.waves.EngineReport;
|
import com.rusefi.waves.EngineReport;
|
||||||
|
|
||||||
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.config.generated.Fields.MOCK_MAF_COMMAND;
|
import static com.rusefi.config.generated.Fields.MOCK_MAF_COMMAND;
|
||||||
|
@ -30,7 +32,7 @@ public class AutoTest {
|
||||||
static int currentEngineType;
|
static int currentEngineType;
|
||||||
private static String fatalError;
|
private static String fatalError;
|
||||||
|
|
||||||
static void mainTestBody() {
|
static void mainTestBody() throws Exception {
|
||||||
MessagesCentral.getInstance().addListener(new MessagesCentral.MessageListener() {
|
MessagesCentral.getInstance().addListener(new MessagesCentral.MessageListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(Class clazz, String message) {
|
public void onMessage(Class clazz, String message) {
|
||||||
|
@ -39,6 +41,10 @@ public class AutoTest {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
BinaryProtocol bp = BinaryProtocolHolder.getInstance().get();
|
||||||
|
// let's make sure 'burn' command works since sometimes it does not
|
||||||
|
bp.burn(Logger.CONSOLE);
|
||||||
|
|
||||||
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));
|
sendCommand(disableCommand(Fields.CMD_TRIGGER_HW_INPUT));
|
||||||
testCustomEngine();
|
testCustomEngine();
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.rusefi;
|
||||||
|
|
||||||
import com.rusefi.io.LinkManager;
|
import com.rusefi.io.LinkManager;
|
||||||
|
|
||||||
import static com.rusefi.AutoTest.*;
|
import static com.rusefi.AutoTest.mainTestBody;
|
||||||
import static com.rusefi.Timeouts.SECOND;
|
import static com.rusefi.Timeouts.SECOND;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,7 +57,7 @@ public class RealHwTest {
|
||||||
return port;
|
return port;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void runRealHardwareTest(String port) {
|
private static void runRealHardwareTest(String port) throws Exception {
|
||||||
IoUtil.realHardwareConnect(port);
|
IoUtil.realHardwareConnect(port);
|
||||||
mainTestBody();
|
mainTestBody();
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,7 +298,7 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void burn(Logger logger) throws InterruptedException, EOFException, SerialPortException {
|
public void burn(Logger logger) throws InterruptedException, EOFException, SerialPortException {
|
||||||
if (!isBurnPending)
|
if (!isBurnPending)
|
||||||
return;
|
return;
|
||||||
logger.info("Need to burn");
|
logger.info("Need to burn");
|
||||||
|
|
|
@ -48,7 +48,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||||
* @see EngineSnifferPanel
|
* @see EngineSnifferPanel
|
||||||
*/
|
*/
|
||||||
public class Launcher {
|
public class Launcher {
|
||||||
public static final int CONSOLE_VERSION = 20190903;
|
public static final int CONSOLE_VERSION = 20190909;
|
||||||
public static final String INI_FILE_PATH = System.getProperty("ini_file_path", "..");
|
public static final String INI_FILE_PATH = System.getProperty("ini_file_path", "..");
|
||||||
public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", "..");
|
public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", "..");
|
||||||
public static final String TOOLS_PATH = System.getProperty("tools_path", ".");
|
public static final String TOOLS_PATH = System.getProperty("tools_path", ".");
|
||||||
|
|
Loading…
Reference in New Issue