diff --git a/firmware/config/engines/mazda_626.cpp b/firmware/config/engines/mazda_626.cpp
index a72f581aca..a6710b4dee 100644
--- a/firmware/config/engines/mazda_626.cpp
+++ b/firmware/config/engines/mazda_626.cpp
@@ -38,18 +38,18 @@ void setMazda626EngineConfiguration(engine_configuration_s *engineConfiguration)
setCommonNTCSensor(&engineConfiguration->clt);
engineConfiguration->clt.bias_resistor = 2700;
-// setCommonNTCSensor(&engineConfiguration->iat);
-// engineConfiguration->iat.bias_resistor = 2700;
-//
+ setCommonNTCSensor(&engineConfiguration->iat);
+ engineConfiguration->iat.bias_resistor = 2700;
+
commonFrankensoAnalogInputs(engineConfiguration);
-// engineConfiguration->hasTpsSensor = false;
-// engineConfiguration->tpsAdcChannel = EFI_ADC_NONE;
-//// engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
-// engineConfiguration->mafAdcChannel = EFI_ADC_0;
-// engineConfiguration->cltAdcChannel = EFI_ADC_12;
-// engineConfiguration->iatAdcChannel = EFI_ADC_11;
-//
-// // todo: 8.2 or 10k?
-// engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
+ engineConfiguration->hasTpsSensor = false;
+ engineConfiguration->tpsAdcChannel = EFI_ADC_NONE;
+// engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
+ engineConfiguration->mafAdcChannel = EFI_ADC_0;
+ engineConfiguration->cltAdcChannel = EFI_ADC_12;
+ engineConfiguration->iatAdcChannel = EFI_ADC_11;
+
+ // todo: 8.2 or 10k?
+ engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
}
diff --git a/firmware/controllers/sensors/tps.cpp b/firmware/controllers/sensors/tps.cpp
index c07e9f53ab..9648007951 100644
--- a/firmware/controllers/sensors/tps.cpp
+++ b/firmware/controllers/sensors/tps.cpp
@@ -83,6 +83,8 @@ int getTPS10bitAdc(DECLARE_ENGINE_PARAMETER_F) {
if (mockTps != MOCK_UNDEFINED)
return mockTps;
#endif
+ if(engineConfiguration->tpsAdcChannel==EFI_ADC_NONE)
+ return -1;
int adc = getAdcValue(engineConfiguration->tpsAdcChannel);
return (int) adc / 4; // Only for TunerStudio compatibility. Max TS adc value in 1023
}
diff --git a/firmware/hw_layer/adc_external.h b/firmware/hw_layer/adc_external.h
index b9932b2191..a4122c9ae5 100644
--- a/firmware/hw_layer/adc_external.h
+++ b/firmware/hw_layer/adc_external.h
@@ -13,6 +13,6 @@
#define getAdcValue(channel) getMcp3208adc(channel)
#define adcToVoltsDivided(adc) (5.0f / 4095 * adc)
-#define getVoltageDivided(channel) adcToVoltsDivided(getAdcValue(channel))
+#define getVoltageDivided(channel) (channel == EFI_ADC_NONE ? 66.66 : adcToVoltsDivided(getAdcValue(channel)))
#endif /* ADC_EXTERNAL_H_ */
diff --git a/firmware/hw_layer/adc_inputs.cpp b/firmware/hw_layer/adc_inputs.cpp
index a50000d294..794b75ee10 100644
--- a/firmware/hw_layer/adc_inputs.cpp
+++ b/firmware/hw_layer/adc_inputs.cpp
@@ -115,7 +115,7 @@ ADC_TwoSamplingDelay_5Cycles, // cr1
ADC_CR2_SWSTART, // cr2
0, // sample times for channels 10...18
- // todo: IS SOMETHING MISSING HERE?
+ // todo: IS SOMETHING MISSING HERE?
ADC_SMPR2_SMP_AN0(MY_SAMPLING_FAST), // In this field must be specified the sample times for channels 0...9
0, // Conversion group sequence 13...16 + sequence length
@@ -181,6 +181,11 @@ static void pwmpcb_fast(PWMDriver *pwmp) {
}
int getInternalAdcValue(adc_channel_e hwChannel) {
+ if (hwChannel == EFI_ADC_NONE) {
+ firmwareError("should not be asking for NONE");
+ return -1;
+ }
+
if (boardConfiguration->adcHwChannelEnabled[hwChannel] == ADC_FAST) {
int internalIndex = fastAdc.internalAdcIndexByHardwareIndex[hwChannel];
return fastAdc.samples[internalIndex];
diff --git a/firmware/svnversion.h b/firmware/svnversion.h
index a9ba7c628b..daa86e0576 100644
--- a/firmware/svnversion.h
+++ b/firmware/svnversion.h
@@ -1,5 +1,5 @@
// This file was generated by Version2Header
-// Thu Feb 19 07:53:56 EST 2015
+// Sun Feb 22 23:12:26 EST 2015
#ifndef VCS_VERSION
-#define VCS_VERSION "6949"
+#define VCS_VERSION "6979"
#endif
diff --git a/java_console/.idea/runConfigurations/CmdLine.xml b/java_console/.idea/runConfigurations/CmdLine.xml
new file mode 100644
index 0000000000..3715c572ad
--- /dev/null
+++ b/java_console/.idea/runConfigurations/CmdLine.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/java_console/autotest/src/com/rusefi/ExecHelper.java b/java_console/autotest/src/com/rusefi/ExecHelper.java
index 3b64ba072c..c2e6539b27 100644
--- a/java_console/autotest/src/com/rusefi/ExecHelper.java
+++ b/java_console/autotest/src/com/rusefi/ExecHelper.java
@@ -1,7 +1,5 @@
package com.rusefi;
-import com.rusefi.FileLog;
-
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
diff --git a/java_console/autotest/src/com/rusefi/RealHwTest.java b/java_console/autotest/src/com/rusefi/RealHwTest.java
new file mode 100644
index 0000000000..102e46e90b
--- /dev/null
+++ b/java_console/autotest/src/com/rusefi/RealHwTest.java
@@ -0,0 +1,12 @@
+package com.rusefi;
+
+/**
+ * this test connects to real hardware via serial port
+ * (c) Andrey Belomutskiy 2013-2015
+ * 2/22/2015
+ */
+public class RealHwTest {
+ public static void main(String[] args) {
+
+ }
+}
diff --git a/java_console/models/src/com/rusefi/core/EngineState.java b/java_console/models/src/com/rusefi/core/EngineState.java
index 7ee5f45529..68b319c8ee 100644
--- a/java_console/models/src/com/rusefi/core/EngineState.java
+++ b/java_console/models/src/com/rusefi/core/EngineState.java
@@ -23,6 +23,7 @@ public class EngineState {
};
public static final String PACKING_DELIMITER = ":";
public static final String RUS_EFI_VERSION_TAG = "rusEfiVersion";
+ public static final String OUTPIN_TAG = "outpin";
/**
* If we get this tag we have probably connected to the wrong port
*/
diff --git a/java_console/ui/src/com/rusefi/CmdLine.java b/java_console/ui/src/com/rusefi/CmdLine.java
index c5b0e76de6..68acecaef2 100644
--- a/java_console/ui/src/com/rusefi/CmdLine.java
+++ b/java_console/ui/src/com/rusefi/CmdLine.java
@@ -35,6 +35,7 @@ public class CmdLine {
LinkManager.start(port);
LinkManager.open();
LinkManager.engineState.registerStringValueAction(EngineState.RUS_EFI_VERSION_TAG, (EngineState.ValueCallback) EngineState.ValueCallback.VOID);
+ LinkManager.engineState.registerStringValueAction(EngineState.OUTPIN_TAG, (EngineState.ValueCallback) EngineState.ValueCallback.VOID);
IoUtil.sendCommand(command);
System.out.println("Done!");
diff --git a/java_console/ui/src/com/rusefi/ui/engine/EngineSnifferPanel.java b/java_console/ui/src/com/rusefi/ui/engine/EngineSnifferPanel.java
index 73b552c082..4ad03724b4 100644
--- a/java_console/ui/src/com/rusefi/ui/engine/EngineSnifferPanel.java
+++ b/java_console/ui/src/com/rusefi/ui/engine/EngineSnifferPanel.java
@@ -71,7 +71,7 @@ public class EngineSnifferPanel {
private boolean isPaused;
public EngineSnifferPanel(Node config) {
- LinkManager.engineState.registerStringValueAction("outpin", new EngineState.ValueCallback() {
+ LinkManager.engineState.registerStringValueAction(EngineState.OUTPIN_TAG, new EngineState.ValueCallback() {
@Override
public void onUpdate(String value) {
String pinInfo[] = value.split("@");