mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
8e082ebe7f
commit
a870ed7a07
|
@ -68,8 +68,7 @@ static Logging logger("ADC", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
|||
// todo: move this flag to Engine god object
|
||||
static int adcDebugReporting = false;
|
||||
|
||||
extern engine_configuration_s *engineConfiguration;
|
||||
extern board_configuration_s *boardConfiguration;
|
||||
EXTERN_ENGINE;
|
||||
|
||||
static adcsample_t getAvgAdcValue(int index, adcsample_t *samples, int bufDepth, int numChannels) {
|
||||
adcsample_t result = 0;
|
||||
|
@ -197,6 +196,12 @@ int getInternalAdcValue(const char *msg, adc_channel_e hwChannel) {
|
|||
warning(OBD_PCM_Processor_Fault, "ADC: %s input is not configured", msg);
|
||||
return -1;
|
||||
}
|
||||
#if EFI_ENABLE_MOCK_ADC || EFI_SIMULATOR
|
||||
if (engine->engineState.mockAdcState.hasMockAdc[hwChannel])
|
||||
return engine->engineState.mockAdcState.getMockAdcValue(hwChannel);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
if (adcHwChannelEnabled[hwChannel] == ADC_FAST) {
|
||||
int internalIndex = fastAdc.internalAdcIndexByHardwareIndex[hwChannel];
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</extension>
|
||||
<option name="MAIN_CLASS_NAME" value="com.rusefi.RealHwTest" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="COM56" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="" />
|
||||
|
|
|
@ -107,10 +107,8 @@ public class AutoTest {
|
|||
setEngineType(23);
|
||||
sendCommand("set suckedOffCoef 0");
|
||||
sendCommand("set addedToWallCoef 0");
|
||||
if (!TestingUtils.isRealHardware) {
|
||||
sendCommand("set_mock_map_voltage 1");
|
||||
sendCommand("set_mock_vbatt_voltage 1.20");
|
||||
}
|
||||
sendCommand("set_mock_map_voltage 1");
|
||||
sendCommand("set_mock_vbatt_voltage 1.20");
|
||||
EngineChart chart;
|
||||
String msg = "2003 Neon cranking ";
|
||||
IoUtil.changeRpm(200);
|
||||
|
@ -208,8 +206,7 @@ public class AutoTest {
|
|||
assertWave(msg, chart, EngineChart.SPARK_3, 0.13333, x + 360);
|
||||
|
||||
// switching to Speed Density
|
||||
if (!TestingUtils.isRealHardware)
|
||||
sendCommand("set_mock_map_voltage 1");
|
||||
sendCommand("set_mock_map_voltage 1");
|
||||
sendComplexCommand("set_algorithm 3");
|
||||
chart = nextChart();
|
||||
x = -70;
|
||||
|
@ -315,8 +312,7 @@ public class AutoTest {
|
|||
sendCommand("set_fuel_map 2200 4.2 15.66");
|
||||
sendCommand("set_fuel_map 2000 4.2 15.66");
|
||||
// mock 2 means 4 on the gauge because of the divider. should we simplify this?
|
||||
if (!TestingUtils.isRealHardware)
|
||||
sendCommand("set_mock_maf_voltage 2");
|
||||
sendCommand("set_mock_maf_voltage 2");
|
||||
sendComplexCommand("set_global_trigger_offset_angle 175");
|
||||
chart = nextChart();
|
||||
|
||||
|
@ -347,8 +343,7 @@ public class AutoTest {
|
|||
assertWave(chart, EngineChart.SPARK_2, 0.133, x);
|
||||
|
||||
// switching to Speed Density
|
||||
if (!TestingUtils.isRealHardware)
|
||||
sendCommand("set_mock_maf_voltage 2");
|
||||
sendCommand("set_mock_maf_voltage 2");
|
||||
sendCommand("set_mock_map_voltage 1");
|
||||
sendComplexCommand("set_algorithm 3");
|
||||
nextChart();
|
||||
|
|
Loading…
Reference in New Issue