This commit is contained in:
Andrey B 2014-04-30 11:21:31 -05:00
parent 3fcd366ef8
commit 7dc4d26e1c
43 changed files with 20348 additions and 23 deletions

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Launcher &quot;log viewer&quot;" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.irnems.Launcher" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="&quot;log viewer&quot; " />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="ui" />
<envs />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@ -11,46 +11,58 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* This frame is used on startup to select the port we would be using
*
* @author Andrey Belomutskiy
* 2/14/14
* @author Andrey Belomutskiy 2/14/14
*/
public class PortLookupFrame {
public static void chooseSerialPort() {
java.util.List<String> ports = new ArrayList<String>();
List<String> ports = new ArrayList<String>();
ports.addAll(Arrays.asList(SerialPortList.getPortNames()));
ports.addAll(TcpConnector.getAvailablePorts());
ports.add(LinkManager.LOG_VIEWER);
if (ports.size() == 0) {
JOptionPane.showMessageDialog(null, "No suitable ports found");
System.exit(-1);
}
final JFrame frame = new JFrame("Serial port selection");
JPanel panel = new JPanel(new FlowLayout());
final JPanel panel = new JPanel(new FlowLayout());
for (final String port : ports) {
JButton button = new JButton("Use " + port);
if (!ports.isEmpty())
addPortSelection(ports, frame, panel);
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
frame.dispose();
new Launcher(port);
}
});
panel.add(button);
}
final JButton buttonLogViewer = new JButton();
buttonLogViewer.setText("Use " + LinkManager.LOG_VIEWER);
buttonLogViewer.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
frame.dispose();
new Launcher(LinkManager.LOG_VIEWER);
}
});
panel.add(buttonLogViewer);
frame.add(panel);
frame.pack();
frame.setVisible(true);
}
}
private static void addPortSelection(List<String> ports, final JFrame frame, JPanel panel) {
final JComboBox<String> comboPorts = new JComboBox<String>();
for (final String port : ports)
comboPorts.addItem(port);
panel.add(comboPorts);
final JButton buttonUsePort = new JButton("Use this port");
panel.add(buttonUsePort);
buttonUsePort.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
frame.dispose();
new Launcher(comboPorts.getSelectedItem().toString());
}
});
}
}

Binary file not shown.

View File

@ -0,0 +1 @@
version2header

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>

View File

@ -0,0 +1,5 @@
<component name="CopyrightManager">
<settings default="">
<module2copyright />
</settings>
</component>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="SvnBranchConfigurationManager">
<option name="mySupportsUserInfoFilter" value="true" />
</component>
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/version2header.iml" filepath="$PROJECT_DIR$/version2header.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,5 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="svn" />
</component>
</project>

View File

@ -0,0 +1,24 @@
<project default="jar">
<target name="clean">
<delete dir="build"/>
</target>
<target name="compile">
<mkdir dir="build/classes"/>
<javac destdir="build/classes" classpath="lib/junit.jar:lib/annotations.jar">
<src path="src"/>
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="build/jar"/>
<jar destfile="../version2header.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="com.rusefi.Version2Header"/>
</manifest>
<zipfileset dir="build/classes" includes="**/*.class"/>
</jar>
</target>
</project>

View File

@ -0,0 +1,46 @@
package com.rusefi;
import java.io.*;
/**
* Andrey Belomutskiy (c) 2014
*/
public class Version2Header {
private static final String COMMAND = "svn info";
private static final String VERSION_MARKER = "Last Changed Rev: ";
private static final String HEADER_TAG = "SVN_VERSION";
public static void main(String[] args) throws IOException {
Process simulatorProcess = null;
try {
simulatorProcess = Runtime.getRuntime().exec(COMMAND);
BufferedReader input =
new BufferedReader(new InputStreamReader(simulatorProcess.getInputStream()));
String line;
while ((line = input.readLine()) != null) {
System.out.println("from " + COMMAND + ": " + line);
if (line.startsWith(VERSION_MARKER)) {
String ver = line.substring(VERSION_MARKER.length());
System.out.println("Version [" + ver + "]");
int version = Integer.parseInt(ver);
writeFile(version);
}
}
} finally {
if (simulatorProcess != null)
simulatorProcess.destroy();
}
}
private static void writeFile(int version) throws IOException {
BufferedWriter bw = new BufferedWriter(new FileWriter("svnversion.h"));
bw.write("// This file was generated by Version2Header\r\n");
bw.write("#ifndef " + HEADER_TAG + "\r\n");
bw.write("#define " + HEADER_TAG + " " + version + "\r\n");
bw.write("#endif\r\n");
bw.close();
}
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1 @@
st-link_cli -c SWD ur -P rusefi.hex -Rst -Run

View File

@ -0,0 +1,3 @@
@echo off
ST-LINK_CLI.exe -c SWD HOTPLUG -P %1 -Rst
pause

View File

@ -0,0 +1,3 @@
While we keep SOME version of the firmware in this folder, this folder is updated manually and this does not happen that often.
For the most fresh version please refer to http://rusefi.com/build_server/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,440 @@
; this is TunerStudio project for www.rusefi.com DIY engine management system
[TunerStudio]
queryCommand = "H"
signature = "MShift v0.01" ; signature is expected to be 7 or more characters.
[Constants]
endianness = little
nPages = 1
pageReadCommand = "C"
burnCommand = "B"
pageSize = 3204
pageValueWrite = "W%2o%v"
;comms settings - you may need to tweak these for USB serial
;e.g. put writeblocks off and add an interwrite delay
pageActivationDelay = 50
writeBlocks = on
interWriteDelay = 10
;end USB settings
page = 1
; name = bits, type, offset, bits
; name = array, type, offset, shape, units, scale, translate, lo, hi, digits
; name = scalar, type, offset, units, scale, translate, lo, hi, digits
injectorLag = scalar, F32, 0, "msec", 1, 0, -10, 25.50, 2; size 4
injectorFlow = scalar, F32, 4, "cm3/min", 1, 0, 0, 1000, 2; size 4
battInjectorLagCorrBins = array, F32, 8, [8], "V", 1, 0, 0.0, 20.0, 2; size 32
battInjectorLagCorr = array, F32, 40, [8], "ms/V", 1, 0, 0.0, 50.0, 2; size 32
cltFuelCorrBins = array, F32, 72, [16], "C", 1, 0, 0.0, 120.0, 2; size 64
cltFuelCorr = array, F32, 136, [16], "%", 100, 0, 0.0, 500.0, 2; size 64
iatFuelCorrBins = array, F32, 200, [16], "C", 1, 0, 0.0, 50.0, 2; size 64
iatFuelCorr = array, F32, 264, [16], "%", 100, 0, 0.0, 500.0, 2; size 64
rpmHardLimit = scalar, S16, 328, "RPM", 1, 0, 0, 25000, 1; size 2
tpsMin = scalar, S16, 330, "ADC", 1, 0, 0, 1023, 0 ; * ( 2 bytes)
tpsMax = scalar, S16, 332, "ADC", 1, 0, 0, 1023, 0 ; * ( 2 bytes)
analogChartMode = scalar, S16, 334, "int", 1, 0, 0, 1023, 0 ; * ( 2 bytes)
CrankingCoolantTempMin = scalar, F32, 336, "°C", 1, 0, -40, 200, 1; size 4
CrankingCoolantTempMax = scalar, F32, 340, "°C", 1, 0, -40, 200, 1; size 4
CrankingMinTempPW = scalar, F32, 344, "ms", 1, 0, 0, 20, 1; size 4
CrankingMaxTempPW = scalar, F32, 348, "ms", 1, 0, 0, 20, 1; size 4
crankingRpm = scalar, S16, 352, "RPM", 1, 0, 0, 3000, 0 ; * ( 2 bytes)
mapSamplingAngleBins = array, F32, 356, [8], "RPM", 1, 0, 0.0, 18000, 2; size 64
mapSamplingAngle = array, F32, 388, [8], "deg", 1, 0, 0.0, 90, 2; size 64
mapSamplingWindowBins = array, F32, 420, [8], "RPM", 1, 0, 0.0, 18000, 2; size 64
mapSamplingWindow = array, F32, 452, [8], "deg", 1, 0, 0.0, 90, 2; size 64
mapMin = scalar, F32, 484, "kpa", 1, 0, 0, 450, 2; size 4
mapMax = scalar, F32, 488, "kpa", 1, 0, 0, 450, 2; size 4
;mapRange
;channel
clt_t1 = scalar, F32, 500, "°C", 1, 0, -40, 200, 1; size 4
clt_t2 = scalar, F32, 504, "°C", 1, 0, -40, 200, 1; size 4
clt_t3 = scalar, F32, 508, "°C", 1, 0, -40, 200, 1; size 4
clt_r1 = scalar, F32, 512, "Ohm", 1, 0, 0, 200000, 1; size 4
clt_r2 = scalar, F32, 516, "Ohm", 1, 0, 0, 200000, 1; size 4
clt_r3 = scalar, F32, 520, "Ohm", 1, 0, 0, 200000, 1; size 4
clt_bias = scalar, F32, 524, "Ohm", 1, 0, 0, 200000, 1; size 4
;clt_a 364 size 4
;clt_b 368 size 4
;clt_c 372 size 4
iat_t1 = scalar, F32, 540, "°C", 1, 0, -40, 200, 1; size 4
iat_t2 = scalar, F32, 544, "°C", 1, 0, -40, 200, 1; size 4
iat_t3 = scalar, F32, 548, "°C", 1, 0, -40, 200, 1; size 4
iat_r1 = scalar, F32, 552, "Ohm", 1, 0, 0, 200000, 1; size 4
iat_r2 = scalar, F32, 556, "Ohm", 1, 0, 0, 200000, 1; size 4
iat_r3 = scalar, F32, 560, "Ohm", 1, 0, 0, 200000, 1; size 4
iat_bias = scalar, F32, 564, "Ohm", 1, 0, 0, 200000, 1; size 4
;iat_a 404 size 4
;iat_b 408 size 4
;iat_c 410 size 4
sparkDwellBins = array, F32, 580, [8], "RPM", 1, 0.0, 0.0, 18000, 2; size 32
sparkDwell = array, F32, 612, [8], "ms", 1, 0.0, 0.0, 30.0, 2; size 32
ignitionTable = array, F32, 644, [16x16],"deg", 1, 0.0, 0, 60.0, 2; size 1024
ignitionKeyBins = array, F32, 1668, [16], "Load", 1, 0.0, 0, 300.0, 2; size 64
ignitionRpmBins = array, F32, 1732, [16], "RPM", 1, 0.0, 0, 18000.0, 2; size 64
ignitonOffset = scalar, U32, 1796, "RPM", 1, 0, 0, 3000.0, 0 ; size 4
crankingChargeAngle = scalar, F32, 1800, "RPM", 1, 0, 0, 3000.0, 0 ; size 4
timingMode = bits, U32, 1804, [0:0], "dynamic", "fixed"
fixedModeTiming = scalar, U32, 1808, "RPM", 1, 0, 0, 3000.0, 0 ; size 4
engineType = bits, U32, 1812, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB"
fuelTable = array, F32, 1816, [16x16],"ms", 1, 0, 0.0, 50.0, 2; size 3036
fuelKeyBins = array, F32, 2840, [16], "V", 1, 0, 0.0, 10.0, 2; size 132
fuelRpmBins = array, F32, 2904, [16], "RPM", 1, 0, 0.0, 25500.0, 2; size 92
injectionPinMode = bits, U32, 2968, [0:1], "default", "default inverted", "open", "open inverted"
ignitionPinMode = bits, U32, 2972, [0:1], "default", "default inverted", "open", "open inverted"
idlePinMode = bits, U32, 2976, [0:1], "default", "default inverted", "open", "open inverted"
fuelPumpPinMode = bits, U32, 2980, [0:1], "default", "default inverted", "open", "open inverted"
malfunctionIndicatorPinMode = bits,U32, 2984, [0:1], "default", "default inverted", "open", "open inverted"
globalTriggerOffsetAngle = scalar, F32, 2988, "RPM", 1, 0, 0, 720, 0 ; size 4
analogInputDividerCoefficient = scalar, F32, 2992, "RPM", 1, 0, 1, 10.0, 2 ; size 4
engineLoadMode = bits, U32, 2996, [0:1], "MAF", "TPS", "MAP", "SPEED DENSITY"
VBattDividerCoefficient = scalar, F32, 3000, "RPM", 1, 0, 1, 10.0, 2 ; size 4
FanONTemperature = scalar, F32, 3004, "°C", 1, 0, 0, 1000.0, 2 ; size 4
FanOffTemperature = scalar, F32, 3008, "°C", 1, 0, 0, 1000.0, 2 ; size 4
CanReadEnabled = bits, U32, 3012, [0:0], "false", "true"
CanWriteEnabled = bits, U32, 3016, [0:0], "false", "true"
CanNbcType = bits, U32, 3020, [0:1], "BMW", "FIAT", "VAG" , invalid
CanSleepPeriod = scalar, F32, 3024, "RPM", 1, 0, 0, 1000.0, 2 ; size 4
CylindersCount = bits, U32, 3028, [0:3], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
IgnitionMode = bits, U32, 3032, [0:0], "One coil", "Individual Coils"
FiringOrder = bits, U32, 3036, [0:2], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", invalid, invalid, invalid
rpmMultiplier = scalar, F32, 3040, "RPM", 1, 0.0, 0, 1000.0, 2 ; size 4
displayMode = bits, U32, 3044, [0:1], "none", "hd44780", "hd44780 over pcf8574", invalid
logFormat = bits, U32, 3048, [0:0], "native", "Mega Log Viewer"
unusedDwellBins = array, F32, 3052, [8], "RPM", 1, 0.0, 0.0, 18000, 2; size 32
nuusedDwell = array, F32, 3084, [8], "RPM", 1, 0.0, 0.0, 18000, 2; size 32
trigger_type = bits, U32, 3116, [0:1], "toothed wheel", "ford aspire", "dodge neon", invalid
isSynchronizationNeeded = bits, U32, 3120, [0:0], "false", "true"
totalToothCount = scalar, F32, 3124, "RPM", 1, 0.0, 0, 1000.0, 2 ; size 4
skippedToothCount = scalar, F32, 3128, "RPM", 1, 0.0, 0, 1000.0, 2 ; size 4
syncRatioFrom = scalar, F32, 3132, "RPM", 1, 0.0, 0, 1000.0, 2 ; size 4
syncRatioTo = scalar, F32, 3136, "RPM", 1, 0.0, 0, 1000.0, 2 ; size 4
useRiseEdge = bits, U32, 3140, [0:0], "false", "true"
needSecondTriggerInput = bits, U32, 3144, [0:0], "false", "true"
injectionPin1 = bits, U32, 3148, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin2 = bits, U32, 3152, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin3 = bits, U32, 3156, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin4 = bits, U32, 3160, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin5 = bits, U32, 3164, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin6 = bits, U32, 3168, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin7 = bits, U32, 3172, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin8 = bits, U32, 3176, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin9 = bits, U32, 3180, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin10 = bits, U32, 3184, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin11 = bits, U32, 3188, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
injectionPin12 = bits, U32, 3192, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
fuelPumpPin = bits, U32, 3196, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
idleValvePin = bits, U32, 3200, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15"
[OutputChannels]
ochGetCommand = "O"
ochBlockSize = 48
; name = class, type, offset, shape, units, scale, translate, lo, hi, digits
rpm = scalar, U32, 0, "RPM", 1, 0.00000, 0.00, 3000.0, 0 ; * ( 4 bytes)
#if CELSIUS
coolant = scalar, F32, 4, "°C", 1, 0.0
#else
coolant = scalar, F32, 4, "°F", { 0.01 * 9/5 }, 3200.00
#endif
#if CELSIUS
intake = scalar, F32, 8, "°C", 1, 0.0
#else
intake = scalar, F32, 8, "°C", 1, 0.0
#endif
TPS = scalar, F32, 12, "%", 1, 0
MAF = scalar, F32, 16, "V", 1, 0
AFR = scalar, F32, 20, "AFR", 1, 0.0, 0.00, 25.5, 1 ;
fuelload = scalar, F32, 24, "%", 1, 0.0 ; Blend of MAP and TPS, depends on algorithm
VBatt = scalar, F32, 28, "V", 1, 0.0, 8, 21;
tpsADC = scalar, U16, 32, "ADC", 1, 0.0;
alignmet = scalar, U16, 34, "al", 1, 0.0;
atmPres = scalar, F32, 36, "pres", 1, 0.0;
MAP = scalar, F32, 40, "MAP", 1, 0.0;
Check_engine = bits, U32, 44, [0:0], "true", "false";
time = { timeNow }
[CurveEditor]
curve = dwellCorrection, "Dwell time RPM based"
columnLabel = "RPM", "Dwell"
xAxis = 0, 8000, 10
yAxis = 0, 30, 10
xBins = sparkDwellBins, rpm
yBins = sparkDwell
gauge = rpm
curve = mapSamplingAngleCurve, "MAP Sampling Angle"
columnLabel = "RPM", "Angle"
xAxis = 0, 8000, 10
yAxis = 0, 180, 10
xBins = mapSamplingAngleBins, rpm
yBins = mapSamplingAngle
gauge = rpm
curve = mapSamplingWindowCurve, "MAP Sampling Window"
columnLabel = "RPM", "Window"
xAxis = 0, 8000, 10
yAxis = 0, 180, 10
xBins = mapSamplingWindowBins, rpm
yBins = mapSamplingWindow
gauge = rpm
curve = injectorsDeadTime, "Injector Dead Time Battery Correction"
columnLabel = "Voltage", "Dead Time"
xAxis = 8, 21, 10
yAxis = -3, 3, 10
xBins = battInjectorLagCorrBins, VBatt
yBins = battInjectorLagCorr
gauge = VBattGauge
curve = iatFuelCorrCurve, "Intake air temp fuel correction"
columnLabel = "Coolant", "Correction"
xAxis = -40, 120, 10
yAxis = -300, 300, 10
xBins = iatFuelCorrBins, intake
yBins = iatFuelCorr
gauge = IATGauge
curve = cltFuelCorrCurve, "Coolant temp fuel correction"
columnLabel = "Coolant", "Correction"
xAxis = -40, 120, 10
yAxis = -300, 300, 10
xBins = cltFuelCorrBins, coolant
yBins = cltFuelCorr
gauge = CLTGauge
[TableEditor]
; table_id, map3d_id, "title", page
table = fuelTableTbl, fuelTableMap, "Fuel Table", 1
; constant, variable
xBins = fuelRpmBins, rpm
yBins = fuelKeyBins, MAF
zBins = fuelTable
gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(RICHER)", "(LEANER)"
table = ignitionTableTbl, ignitionTableMap, "Ignition Table", 1
; constant, variable
xBins = ignitionRpmBins, rpm
yBins = ignitionKeyBins, TPS
zBins = ignitionTable
gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(RICHER)", "(LEANER)"
[GaugeConfigurations]
;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld
tachometer = rpm, "Engine Speed", "RPM", 0, 8000, 200, 500, 6000, 6000, 0, 0
CLTGauge = coolant, "Coolant Temp", "°C", -40, 140, -15, 1, 95, 110, 1, 1
IATGauge = intake, "Intake Air Temp", "°C", -40, 140, -15, 1, 95, 110, 1, 1
throttleGauge = TPS, "Throttle Position", "%", 0, 100, 0, 0, 100, 100, 0, 0
afr1Gauge = AFR, "Air:Fuel Ratio 1", "", 10, 19.4, 12, 13, 15, 16, 2, 2
mafGauge = MAF, "Mass Air Flow", "v", 0, 5, 0, 1, 3, 4, 1, 1
VBattGauge = VBatt, "Battery Voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1
tpsADCGauge = tpsADC, "tps ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0
atmPresCGauge = atmPres, "atmo pressu", "kPa", 0, 1024, 0, 0, 0, 0, 0, 0
mapCGauge = MAP, "MAP", "kPa", 0, 1024, 0, 0, 0, 0, 0, 0
[FrontPage]
; Gauges are numbered left to right, top to bottom.
;
; 1 2 3 4
; 5 6 7 8
; currently a minimum of 6 gauges must be on the dash, this appears to be an old not needed limitation. next release 1 will work.
gauge1 = tachometer
gauge2 = CLTGauge
gauge3 = throttleGauge
gauge4 = mafGauge
gauge5 = afr1Gauge
gauge6 = tpsADCGauge
; gauge7 = IATGauge
; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg
indicator = { Check_engine }, "ok", "Check engine", green, black, red, black
[Datalog]
; Channel Label Type Format
entry = time, "Time", float, "%.3f"
entry = rpm, "RPM", int, "%d"
entry = coolant, "CLT", float, "%.1f"
[Menu]
menu = "&Engine"
subMenu = engineChars, "&Engine Characteristics"
subMenu = boardProp, "&Board properties"
subMenu = injChars, "&injector Characteristicks"
subMenu = injectorsDeadTime, "&Injectors Dead Time"
menu = "&Sensors"
subMenu = clt_thermistor, "&CLT Thermistor"
subMenu = iat_thermistor, "&IAT Thermistor"
subMenu = mapSettings, "MAP sensor settings"
subMenu = mapSamplingAngleCurve, "Map sampling angle"
subMenu = mapSamplingWindowCurve, "Map sampling window"
subMenu = triggerConfiguration, "&Trigger configuration"
menu = "&Settings"
subMenu = generalSettings, "General"
subMenu = fuelTableTbl, "&Fuel Table"
subMenu = ignitionTableTbl, "&Ignition Table"
subMenu = iatFuelCorrCurve, "I&ntake air temp fuel correction"
subMenu = cltFuelCorrCurve, "C&oolant temp fuel correction"
subMenu = dwellCorrection, "Dwell time correction"
menu = "&Tuning"
; subMenu = std_realtime, "&Realtime Display"
; subMenu = std_warmup, "&Warmup Wizard"
subMenu = dwellCorrection, "&Dwell correction"
subMenu = crankingFuel, "&Cranking Fuel"
subMenu = ignitionTableMap, "&Ignition Map"
subMenu = fuelTableMap, "&Fiel Table"
[UserDefined]
dialog = injChars, "Injector Characteristics"
field = "Injector Open Time", injectorLag
field = "Injector Flow", injectorFlow
dialog = generalSettings, "General"
field = "analog chart", analogChartMode
; field = "Cranking RPM limit", crankingRpm
dialog = engineChars, "Engine Characteristics"
;field = "Engine Displacement", engineDisplacement
field = "Engine Type", engineType
field = "RPM Hard Limit", rpmHardLimit
field = "Cranking RPM limit", crankingRpm
field = "injectionPinMode", injectionPinMode
field = "ignitionPinMode", ignitionPinMode
field = "idlePinMode", idlePinMode
field = "fuelPumpPinMode", fuelPumpPinMode
field = "malfunctionIndicatorPinMode", malfunctionIndicatorPinMode
field = "globalTriggerOffsetAngle", globalTriggerOffsetAngle
field = "engineLoadMode", engineLoadMode
field = "timingMode", timingMode
field = "Fan On Temperature", FanONTemperature
field = "Fan Off Temperature", FanOffTemperature
field = "Can Read Enabled", CanReadEnabled
field = "Can Write Enabled", CanWriteEnabled
field = "Can Nbc Type", CanNbcType
field = "Can Sleep Period", CanSleepPeriod
field = "Cylinders Count", CylindersCount
field = "Ignition Mode", IgnitionMode
field = "Firing Order", FiringOrder
field = "rpm Multiplier", rpmMultiplier
field = "display Mode", displayMode
field = "log format", logFormat
dialog = boardProp, "Board properties"
field = "analog Input Divider Coefficient", analogInputDividerCoefficient
field = "Battery voltage Divider Coefficient", VBattDividerCoefficient
field = "Injection Pin 1 ", injectionPin1
field = "Injection Pin 2 ", injectionPin2
field = "Injection Pin 3 ", injectionPin3
field = "Injection Pin 4 ", injectionPin4
field = "Injection Pin 5 ", injectionPin5
field = "Injection Pin 6 ", injectionPin6
field = "Injection Pin 7 ", injectionPin7
field = "Injection Pin 8 ", injectionPin8
field = "Injection Pin 9 ", injectionPin9
field = "Injection Pin 10 ", injectionPin10
field = "Injection Pin 11 ", injectionPin11
field = "Injection Pin 12 ", injectionPin12
field = "Fuel Pump Pin", fuelPumpPin
field = "Idle Valve Pin", idleValvePin
dialog = clt_thermistor, "CLT Thermistor Settings"
field = "Here is three pairs of thermistor temperature and his resistance."
field = "Typical temperatures is -40°C, 0°C and 100°C"
field = ""
field = "Temperature 1", clt_t1
field = "Resistance 1", clt_r1
field = ""
field = "Temperature 2", clt_t2
field = "Resistance 2", clt_r2
field = ""
field = "Temperature 3", clt_t3
field = "Resistance 3", clt_r3
field = ""
field = "Bias Resistor Value", clt_bias
field = ""
dialog = iat_thermistor, "IAT Thermistor Settings"
field = "Here is three pairs of thermistor temperature and his resistance."
field = "Typical temperatures is -40°C, 0°C and 100°C"
field = ""
field = "Temperature 1", iat_t1
field = "Resistance 1", iat_r1
field = ""
field = "Temperature 2", iat_t2
field = "Resistance 2", iat_r2
field = ""
field = "Temperature 3", iat_t3
field = "Resistance 3", iat_r3
field = ""
field = "Bias Resistor Value", iat_bias
field = ""
dialog = mapSettings, "MAP Sensor Settings"
field = "MAP at minimum voltage", mapMin
field = "MAP at maximum voltage", mapMax
dialog = crankingFuel, "Cranking Fuel"
field = "Minimum temp point", CrankingCoolantTempMin
field = "Pulse Width at Minimum temp point", CrankingMinTempPW
field = ""
field = "Maximum temp point", CrankingCoolantTempMax
field = "Pulse Width at Maximum temp point", CrankingMaxTempPW
field = ""
dialog = mapSettings, "MAP Sensor Settings"
field = "MAP at minimum voltage", mapMin
field = "MAP at maximum voltage", mapMax
dialog = triggerConfiguration, "Trigger configuration"
field = "trigger type", trigger_type
field = "Synchronization Needed?", isSynchronizationNeeded
field = "total Tooth Count", totalToothCount
field = "skipped Tooth Count", skippedToothCount
field = "sync Ratio From", syncRatioFrom
field = "sync Ratio To", syncRatioTo
field = "use Rise Edge?", useRiseEdge
field = "needed Second Trigger Input?", needSecondTriggerInput
dialog = crankingFuel, "Cranking Fuel"
field = "Minimum temp point", CrankingCoolantTempMin
field = "Pulse Width at Minimum temp point", CrankingMinTempPW
field = ""
field = "Maximum temp point", CrankingCoolantTempMax
field = "Pulse Width at Maximum temp point", CrankingMaxTempPW

View File

@ -0,0 +1,202 @@
Record{size=9000, name=' build/obj/datalogging.o@ .bss.outputBuffer'}
Record{size=7160, name=' build/obj/histogram.o@bounds'}
Record{size=5000, name=' build/obj/analog_chart.o@ .bss.LOGGING_BUFFER'}
Record{size=4000, name=' build/obj/histogram.o@ .bss.small_bounds_index'}
Record{size=3416, name=' build/obj/tunerstudio_algo.o@ .bss.configWorkingCopy'}
Record{size=2584, name=' build/obj/idle_thread.o@ .bss.idleValve'}
Record{size=2000, name=' build/obj/datalogging.o@ .bss.intermediateLoggingBufferData'}
Record{size=1520, name=' build/obj/wave_analyzer.o@readers'}
Record{size=1440, name=' build/obj/usb_lld.o@USBD1'}
Record{size=1200, name=' build/obj/io_pins.o@outputs'}
Record{size=1152, name=' build/obj/eficonsole_logic.o@ .bss.consoleActions'}
Record{size=1080, name=' build/obj/console_io.o@ .bss.consoleThreadStack'}
Record{size=696, name=' build/obj/wave_analyzer.o@ .bss.waThreadStack'}
Record{size=696, name=' build/obj/tunerstudio.o@ .bss.TS_WORKING_AREA'}
Record{size=696, name=' build/obj/status_loop.o@ .bss.tsThreadStack'}
Record{size=696, name=' build/obj/status_loop.o@ .bss.lcdThreadStack'}
Record{size=696, name=' build/obj/neo6m.o@ .bss.GPS_WORKING_AREA'}
Record{size=696, name=' build/obj/mmc_card.o@ .bss.tp_MMC_Monitor'}
Record{size=696, name=' build/obj/map_multiplier_thread.o@ .bss.maThreadStack'}
Record{size=696, name=' build/obj/malfunction_indicator.o@ .bss.mfiThreadStack'}
Record{size=696, name=' build/obj/io_pins.o@ .bss.errBlinkingStack'}
Record{size=696, name=' build/obj/io_pins.o@ .bss.comBlinkingStack'}
Record{size=696, name=' build/obj/injector_central.o@ .bss.benchThreadStack'}
Record{size=696, name=' build/obj/idle_thread.o@ .bss.ivThreadStack'}
Record{size=696, name=' build/obj/board_test.o@ .bss.btThreadStack'}
Record{size=600, name=' build/obj/usbcfg.o@SDU1'}
Record{size=560, name=' build/obj/mmc_card.o@MMC_FS'}
Record{size=548, name=' build/obj/mmc_card.o@ .bss.FDLogFile'}
Record{size=500, name=' build/obj/status_loop.o@ .bss.LOGGING_BUFFER'}
Record{size=500, name=' build/obj/adc_inputs.o@ .bss.LOGGING_BUFFER'}
Record{size=448, name=' build/obj/pin_repository.o@PIN_USED'}
Record{size=400, name=' build/obj/io_pins.o@ .bss.pinDefaultState'}
Record{size=376, name=' build/obj/chsys.o@ .bss._idle_thread_wa'}
Record{size=268, name=' build/obj/trigger_input.o@ .bss.secondaryCrankInput'}
Record{size=268, name=' build/obj/trigger_input.o@ .bss.primaryCrankInput'}
Record{size=268, name=' build/obj/algo.o@ .bss.waveChart'}
Record{size=260, name=' build/obj/wave_chart.o@logger'}
Record{size=260, name=' build/obj/wave_analyzer.o@logger'}
Record{size=260, name=' build/obj/tunerstudio.o@logger'}
Record{size=260, name=' build/obj/trigger_central.o@logging'}
Record{size=260, name=' build/obj/status_loop.o@logger2'}
Record{size=260, name=' build/obj/status_loop.o@logger'}
Record{size=260, name=' build/obj/status_loop.o@ .bss.fileLogger'}
Record{size=260, name=' build/obj/signal_executor.o@logger'}
Record{size=260, name=' build/obj/rtc_helper.o@logger'}
Record{size=260, name=' build/obj/rpm_calculator.o@logger'}
Record{size=260, name=' build/obj/pwm_generator.o@logger'}
Record{size=260, name=' build/obj/poten.o@logger'}
Record{size=260, name=' build/obj/pin_repository.o@logger'}
Record{size=260, name=' build/obj/neo6m.o@logging'}
Record{size=260, name=' build/obj/mmc_card.o@logger'}
Record{size=260, name=' build/obj/map_multiplier_thread.o@logger'}
Record{size=260, name=' build/obj/map_averaging.o@logger'}
Record{size=260, name=' build/obj/lcd_HD44780.o@logger'}
Record{size=260, name=' build/obj/injector_central.o@logger'}
Record{size=260, name=' build/obj/ignition_central.o@logger'}
Record{size=260, name=' build/obj/idle_thread.o@logger'}
Record{size=260, name=' build/obj/flash_main.o@logger'}
Record{size=260, name=' build/obj/error_handling.o@logger'}
Record{size=260, name=' build/obj/eficonsole_logic.o@logging'}
Record{size=260, name=' build/obj/eficonsole.o@logger'}
Record{size=260, name=' build/obj/analog_chart.o@logging'}
Record{size=260, name=' build/obj/adc_inputs.o@logger'}
Record{size=256, name=' build/obj/neo6m.o@gps_str'}
Record{size=200, name=' build/obj/eficonsole_logic.o@ .bss.confirmation'}
Record{size=200, name=' build/obj/eficonsole.o@ .bss.fatalErrorMessage'}
Record{size=128, name=' build/obj/stm32_dma.o@ .bss.dma_isr_redir'}
Record{size=124, name=' build/obj/trigger_central.o@ .bss.triggerListeneres'}
Record{size=120, name=' build/obj/serial_lld.o@SD3'}
Record{size=120, name=' build/obj/serial_lld.o@SD2'}
Record{size=120, name=' build/obj/serial_lld.o@SD1'}
Record{size=80, name=' build/obj/adc_inputs.o@ .bss.internalAdcIndexByHardwareIndex'}
Record{size=80, name=' build/obj/adc_inputs.o@ .bss.hardwareIndexByIndernalAdcIndex'}
Record{size=72, name=' build/obj/neo6m.o@GPSdata'}
Record{size=64, name=' build/obj/fuel_math.o@ .bss.fuel_ptrs'}
Record{size=64, name=' build/obj/advance_map.o@ .bss.timing_ptrs'}
Record{size=56, name=' build/obj/i2c_lld.o@I2CD1'}
Record{size=56, name=' build/obj/can_lld.o@CAND2'}
Record{size=56, name=' build/obj/can_lld.o@CAND1'}
Record{size=52, name=' build/obj/mmc_card.o@MMCD1'}
Record{size=52, name=' build/obj/adc_lld.o@ADCD2'}
Record{size=52, name=' build/obj/adc_lld.o@ADCD1'}
Record{size=48, name=' build/obj/tunerstudio_algo.o@ .bss.tsOutputChannels'}
Record{size=48, name=' build/obj/spi_lld.o@SPID3'}
Record{size=48, name=' build/obj/injector_central.o@ .bss.is_injector_enabled'}
Record{size=48, name=' build/obj/hardware.o@adcState'}
Record{size=44, name=' build/obj/malfunction_central.o@ .bss.error_codes_set'}
Record{size=40, name=' build/obj/tps.o@states'}
Record{size=40, name=' build/obj/rpm_calculator.o@ .bss.tdcScheduler'}
Record{size=40, name=' build/obj/map_averaging.o@endTimer'}
Record{size=40, name=' build/obj/map_averaging.o@ .bss.startTimer'}
Record{size=36, name=' build/obj/neo6m.o@curTm'}
Record{size=32, name=' build/obj/wave_analyzer_hw.o@ .bss.registeredIcus'}
Record{size=32, name=' build/obj/status_loop.o@ .bss.dateBuffer'}
Record{size=32, name=' build/obj/chheap.o@ .bss.default_heap'}
Record{size=28, name=' build/obj/chschd.o@ *(.bss.rlist)'}
Record{size=28, name=' build/obj/adc_inputs.o@newState'}
Record{size=24, name=' build/obj/icu_lld.o@ICUD9'}
Record{size=24, name=' build/obj/icu_lld.o@ICUD3'}
Record{size=24, name=' build/obj/icu_lld.o@ICUD2'}
Record{size=24, name=' build/obj/icu_lld.o@ICUD1'}
Record{size=24, name=' build/obj/adc_inputs.o@ .bss.slowAdcState'}
Record{size=20, name=' build/obj/tunerstudio_algo.o@tsState'}
Record{size=20, name=' build/obj/pwm_lld.o@PWMD8'}
Record{size=20, name=' build/obj/pwm_lld.o@PWMD4'}
Record{size=20, name=' build/obj/pin_repository.o@ .bss.portNameStream'}
Record{size=20, name=' build/obj/pin_repository.o@ .bss.portNameBuffer'}
Record{size=20, name=' build/obj/idle_thread.o@idle'}
Record{size=20, name=' build/obj/datalogging.o@ .bss.intermediateLoggingBuffer'}
Record{size=16, name=' build/obj/usbcfg.o@ .bss.ep2instate'}
Record{size=16, name=' build/obj/usbcfg.o@ .bss.ep1outstate'}
Record{size=16, name=' build/obj/usbcfg.o@ .bss.ep1instate'}
Record{size=16, name=' build/obj/usb_lld.o@ .bss.ep0_state'}
Record{size=16, name=' build/obj/trigger_central.o@ .bss.triggerState'}
Record{size=16, name=' build/obj/trigger_central.o@ .bss.hwEventCounters'}
Record{size=16, name=' build/obj/rpm_calculator.o@ .bss.shaft_signal_msg_index'}
Record{size=16, name=' build/obj/datalogging.o@header'}
Record{size=16, name=' build/obj/chvt.o@ *(.bss.vtlist)'}
Record{size=12, name=' build/obj/status_loop.o@buffer'}
Record{size=12, name=' build/obj/rpm_calculator.o@rpmState'}
Record{size=12, name=' build/obj/rpm_calculator.o@ .bss.rpmBuffer'}
Record{size=8, name=' build/obj/usb_lld.o@ .bss.ep0setup_buffer'}
Record{size=4, name=' c:/chibistudio/tools/gnu tools arm embedded/4.7 2013q2/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m\libc.a(lib_a-tzvars.o)@ .bss._timezone'}
Record{size=4, name=' c:/chibistudio/tools/gnu tools arm embedded/4.7 2013q2/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m\libc.a(lib_a-tzvars.o)@ .bss._daylight'}
Record{size=4, name=' build/obj/wave_analyzer_hw.o@ .bss.registeredIcuCount'}
Record{size=4, name=' build/obj/wave_analyzer.o@ .bss.waveReaderCount'}
Record{size=4, name=' build/obj/wave_analyzer.o@ .bss.waveBufferReported'}
Record{size=4, name=' build/obj/wave_analyzer.o@ .bss.previousCrankSignalStart'}
Record{size=4, name=' build/obj/wave_analyzer.o@ .bss.ckpPeriod'}
Record{size=4, name=' build/obj/tunerstudio.o@ .bss.writeRequest'}
Record{size=4, name=' build/obj/tunerstudio.o@ .bss.writeCounter'}
Record{size=4, name=' build/obj/tunerstudio.o@ .bss.tsCounter'}
Record{size=4, name=' build/obj/tunerstudio.o@ .bss.previousWriteReport'}
Record{size=4, name=' build/obj/trigger_central.o@ .bss.shaftEventCounter'}
Record{size=4, name=' build/obj/tps.o@ .bss.tpsRocIndex'}
Record{size=4, name=' build/obj/stm32_dma.o@ .bss.dma_streams_mask'}
Record{size=4, name=' build/obj/status_loop.o@ .bss.needToReportStatus'}
Record{size=4, name=' build/obj/signal_temp.o@ .bss.globalCounter'}
Record{size=4, name=' build/obj/rtc_lld.o@RTCD1'}
Record{size=4, name=' build/obj/rtc_helper.o@ .bss.unix_time.9103'}
Record{size=4, name=' build/obj/rtc_helper.o@ .bss.buff.9098'}
Record{size=4, name=' build/obj/pin_repository.o@ .bss.totalPinsUsed'}
Record{size=4, name=' build/obj/pin_repository.o@ .bss.initialized'}
Record{size=4, name=' build/obj/neo6m.o@ .bss.uartErrors'}
Record{size=4, name=' build/obj/neo6m.o@ .bss.gpsMesagesCount'}
Record{size=4, name=' build/obj/mmc_card.o@ .bss.totalLoggedBytes'}
Record{size=4, name=' build/obj/mmc_card.o@ .bss.errorReported'}
Record{size=4, name=' build/obj/mcp3208.o@hack'}
Record{size=4, name=' build/obj/mcp3208.o@ .bss.adcEventCounter'}
Record{size=4, name=' build/obj/mcp3208.o@ .bss.adcErrorCounter'}
Record{size=4, name=' build/obj/map_multiplier_thread.o@ .bss.timeAtNotRunning'}
Record{size=4, name=' build/obj/map_averaging.o@ .bss.v_mapAccumulator'}
Record{size=4, name=' build/obj/map_averaging.o@ .bss.v_averagedMapValue'}
Record{size=4, name=' build/obj/map_averaging.o@ .bss.perRevolutionCounter'}
Record{size=4, name=' build/obj/map_averaging.o@ .bss.perRevolution'}
Record{size=4, name=' build/obj/map_averaging.o@ .bss.mapMeasurementsCounter'}
Record{size=4, name=' build/obj/map_averaging.o@ .bss.currentMaxPressure'}
Record{size=4, name=' build/obj/map_averaging.o@ .bss.atmosphericPressure'}
Record{size=4, name=' build/obj/lcd_HD44780.o@txbuf'}
Record{size=4, name=' build/obj/lcd_HD44780.o@ .bss.currentRow'}
Record{size=4, name=' build/obj/lcd_HD44780.o@ .bss.BUSY_WAIT_DELAY'}
Record{size=4, name=' build/obj/io_pins.o@ .bss.DEFAULT_OUTPUT'}
Record{size=4, name=' build/obj/injector_central.o@onTime'}
Record{size=4, name=' build/obj/injector_central.o@offTime'}
Record{size=4, name=' build/obj/injector_central.o@count'}
Record{size=4, name=' build/obj/injector_central.o@brainPin'}
Record{size=4, name=' build/obj/injector_central.o@ .bss.needToRunBench'}
Record{size=4, name=' build/obj/idle_thread.o@ .bss.isIdleControlActive'}
Record{size=4, name=' build/obj/idle_thread.o@ .bss.idleSwitchState'}
Record{size=4, name=' build/obj/histogram.o@ .bss.initialized'}
Record{size=4, name=' build/obj/hardware.o@txbuf'}
Record{size=4, name=' build/obj/fuel_math.o@ .bss.initialized'}
Record{size=4, name=' build/obj/ff.o@FatFs'}
Record{size=4, name=' build/obj/engine_configuration.o@ .bss.globalConfigurationVersion'}
Record{size=4, name=' build/obj/eficonsole_logic.o@ .bss.consoleActionCount'}
Record{size=4, name=' build/obj/console_io.o@ .bss.console_line_callback'}
Record{size=4, name=' build/obj/chmemcore.o@ *(.bss.nextmem)'}
Record{size=4, name=' build/obj/chmemcore.o@ *(.bss.endmem)'}
Record{size=4, name=' build/obj/chdebug.o@ .bss.dbg_panic_msg'}
Record{size=4, name=' build/obj/chdebug.o@ .bss.dbg_lock_cnt'}
Record{size=4, name=' build/obj/board_test.o@ .bss.stepCoutner'}
Record{size=4, name=' build/obj/board_test.o@ .bss.currentPin'}
Record{size=4, name=' build/obj/board_test.o@ .bss.currentIndex'}
Record{size=4, name=' build/obj/analog_chart.o@ .bss.pendingData'}
Record{size=4, name=' build/obj/analog_chart.o@ .bss.initialized'}
Record{size=4, name=' build/obj/advance_map.o@ .bss.initialized'}
Record{size=4, name=' build/obj/adc_inputs.o@ .bss.samples_fast'}
Record{size=4, name=' build/obj/adc_inputs.o@ .bss.fastAdcValue'}
Record{size=4, name=' build/obj/adc_inputs.o@ .bss.adcDebugReporting'}
Record{size=4, name=' build/obj/adc_inputs.o@ .bss.adcCallbackCounter_slow'}
Record{size=4, name=' 00@ *(.bss.default_heap)'}
Record{size=4, name=' 00@ *(.bss._idle_thread_wa)'}
Record{size=2, name=' build/obj/tunerstudio.o@pageId'}
Record{size=2, name=' build/obj/spi_lld.o@dummytx'}
Record{size=2, name=' build/obj/spi_lld.o@dummyrx'}
Record{size=2, name=' build/obj/ff.o@Fsid'}
Record{size=1, name=' build/obj/thermistors.o@ .bss.initialized'}
Record{size=1, name=' build/obj/mmc_card.o@fs_ready'}
Record{size=1, name=' build/obj/lcd_HD44780.o@ .bss.lcd_HD44780_command'}
Record{size=1, name=' build/obj/injector_central.o@pin'}
Record{size=1, name=' build/obj/datalogging.o@ .bss.intermediateLoggingBufferInited'}
Total size: 63633

View File

@ -0,0 +1 @@
Most recent jar is now available at http://rusefi.com/build_server/

View File

@ -0,0 +1 @@
java -jar rusefi_console.jar

View File

@ -0,0 +1 @@
java -jar rusefi_console.jar COM10

View File

@ -0,0 +1 @@
java -jar rusefi_console.jar COM11

View File

@ -0,0 +1 @@
java -jar rusefi_console.jar COM12

View File

@ -0,0 +1 @@
java -jar rusefi_console.jar COM15

View File

@ -0,0 +1 @@
java -jar rusefi_console.jar COM7

View File

@ -0,0 +1 @@
java -jar rusefi_console.jar COM8

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,58 @@
/*
* test_event_registry.c
*
* Created on: Nov 27, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
*/
#include "event_registry.h"
#include "test_event_registry.h"
#include "main.h"
#include "OutputSignalList.h"
static ActuatorEventList eventList;
static ActuatorEventList result;
int pinDefaultState[IO_PIN_COUNT];
void initOutputSignal(OutputSignal *signal, io_pin_e ioPin) {
signal->io_pin = ioPin;
}
extern int outputSignalCount;
void testEventRegistry(void) {
printf("*************************************** testEventRegistry\r\n");
printf("resetting\r\n");
resetEventList(&eventList);
OutputSignalList list;
printf("registering 0\r\n");
registerActuatorEvent(&eventList, 0, list.add((io_pin_e)10), 0);
registerActuatorEvent(&eventList, 0, list.add((io_pin_e)20), 10);
assertEquals(2, eventList.size);
printf("registering 1\r\n");
registerActuatorEvent(&eventList, 1, list.add((io_pin_e)30), 0);
registerActuatorEvent(&eventList, 1, list.add((io_pin_e)40), 10);
assertEquals(4, eventList.size);
printf("Looking for 0\r\n");
findEvents(0, &eventList, &result);
assertEquals(2, result.size);
assertEquals(4, eventList.size);
printf("Validating pins\r\n");
assertEquals(10, result.events[0].actuator->io_pin);
assertEquals(20, result.events[1].actuator->io_pin);
printf("Looking for 1\r\n");
findEvents(1, &eventList, &result);
assertEquals(2, result.size);
assertEquals(4, eventList.size);
assertEquals(30, result.events[0].actuator->io_pin);
assertEquals(40, result.events[1].actuator->io_pin);
}

View File

@ -0,0 +1,29 @@
/*
* @file test_engine_math.c
*
* Created on: Nov 14, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
*/
#include "test_engine_math.h"
#include "main.h"
#include "engine_math.h"
#include "engine_configuration.h"
#include "ec2.h"
#include "map.h"
extern engine_configuration_s *engineConfiguration;
extern engine_configuration2_s *engineConfiguration2;
void testEngineMath(void) {
printf("*************************************************** testEngineMath\r\n");
engineConfiguration->rpmMultiplier = 0.5;
assertEqualsM("600 RPM", 50, getOneDegreeTimeMs(600) * 180);
assertEqualsM("6000 RPM", 5, getOneDegreeTimeMs(6000) * 180);
}
float getMap(void) {
return 0;
}

View File

@ -0,0 +1,152 @@
/**
* @file test_fuel_map.c
*
* Created on: Nov 6, 2013
* Author: Andrey Belomutskiy, (c) 2012-2013
*/
#include "test_fuel_map.h"
#include "main.h"
#include "engine_configuration.h"
#include "fuel_math.h"
#include "trigger_structure.h"
#include "allsensors.h"
#include "engine_math.h"
#include "OutputSignalList.h"
#include "ec2.h"
extern engine_configuration_s *engineConfiguration;
extern engine_configuration2_s *engineConfiguration2;
void testFuelMap(void) {
chDbgCheck(engineConfiguration!=NULL, "engineConfiguration");
printf("*************************************************** testFuelMap\r\n");
for (int k = 0; k < FUEL_LOAD_COUNT; k++) {
for (int r = 0; r < FUEL_RPM_COUNT; r++) {
engineConfiguration->fuelTable[k][r] = k * 200 + r;
}
}
printf("*************************************************** initThermistors\r\n");
initThermistors();
printf("*** getInjectorLag\r\n");
assertEquals(0, getInjectorLag(12));
for (int i = 0; i < FUEL_LOAD_COUNT; i++)
engineConfiguration->fuelLoadBins[i] = i;
for (int i = 0; i < FUEL_RPM_COUNT; i++)
engineConfiguration->fuelRpmBins[i] = i;
printf("*************************************************** prepareFuelMap\r\n");
prepareFuelMap();
assertEquals(1005, getBaseFuel(5, 5));
engineConfiguration->injectorLag = 0.5;
for (int i = 0; i < VBAT_INJECTOR_CURVE_SIZE; i++) {
engineConfiguration->battInjectorLagCorrBins[i] = i;
engineConfiguration->battInjectorLagCorr[i] = 2 * i;
}
// because all the correction tables are zero
printf("*************************************************** getRunningFuel\r\n");
assertEquals(1005.5, getRunningFuel(5, 5));
printf("*************************************************** setting IAT table\r\n");
for (int i = 0; i < IAT_CURVE_SIZE; i++) {
engineConfiguration->iatFuelCorrBins[i] = i;
engineConfiguration->iatFuelCorr[i] = 2 * i;
}
engineConfiguration->iatFuelCorr[0] = 2;
printf("*************************************************** setting CLT table\r\n");
for (int i = 0; i < CLT_CURVE_SIZE; i++) {
engineConfiguration->cltFuelCorrBins[i] = i;
engineConfiguration->cltFuelCorr[i] = 1;
}
engineConfiguration->injectorLag = 0;
assertEquals(NAN, getIntakeAirTemperature());
float iatCorrection = getIatCorrection(-KELV);
assertEqualsM("IAT", 2, iatCorrection);
float cltCorrection = getCltCorrection(getCoolantTemperature());
assertEqualsM("CLT", 1, cltCorrection);
float injectorLag = getInjectorLag(getVBatt());
assertEquals(0, injectorLag);
// 1005 * 2 for IAT correction
printf("*************************************************** getRunningFuel\r\n");
assertEquals(1005, getRunningFuel(5, 5));
engineConfiguration->crankingSettings.coolantTempMaxC = 65; // 8ms at 65C
engineConfiguration->crankingSettings.fuelAtMaxTempMs = 8;
engineConfiguration->crankingSettings.coolantTempMinC = 0; // 20ms at 0C
engineConfiguration->crankingSettings.fuelAtMinTempMs = 20;
printf("*************************************************** getStartingFuel\r\n");
// NAN in case we have issues with the CLT sensor
// assertEquals(16, getStartingFuel(NAN));
assertEquals(20, getStartingFuel(0));
assertEquals(18.5231, getStartingFuel(8));
assertEquals(8, getStartingFuel(70));
}
static void confgiureFordAspireTriggerShape(trigger_shape_s * s) {
triggerShapeInit(s);
triggerAddEvent(s, 53.747, T_SECONDARY, TV_HIGH);
triggerAddEvent(s, 121.90, T_SECONDARY, TV_LOW);
triggerAddEvent(s, 232.76, T_SECONDARY, TV_HIGH);
triggerAddEvent(s, 300.54, T_SECONDARY, TV_LOW);
triggerAddEvent(s, 360, T_PRIMARY, TV_HIGH);
triggerAddEvent(s, 409.8412, T_SECONDARY, TV_HIGH);
triggerAddEvent(s, 478.6505, T_SECONDARY, TV_LOW);
triggerAddEvent(s, 588.045, T_SECONDARY, TV_HIGH);
triggerAddEvent(s, 657.03, T_SECONDARY, TV_LOW);
triggerAddEvent(s, 720, T_PRIMARY, TV_LOW);
}
static ActuatorEventList ae;
void testAngleResolver(void) {
printf("*************************************************** testAngleResolver\r\n");
engineConfiguration->globalTriggerAngleOffset = 175;
trigger_shape_s * ts = &engineConfiguration2->triggerShape;
confgiureFordAspireTriggerShape(ts);
assertEqualsM("shape size", 10, ts->size);
OutputSignalList list;
resetEventList(&ae);
printf("*************************************************** testAngleResolver 0\r\n");
registerActuatorEventExt(engineConfiguration, &engineConfiguration2->triggerShape, &ae, list.add(INJECTOR_1_OUTPUT), 53 - 175);
assertEqualsM("size", 1, ae.size);
assertEquals(1, list.getSize());
assertEquals(0, ae.events[0].eventIndex);
assertEquals(53, ae.events[0].angleOffset);
printf("*************************************************** testAngleResolver 2\r\n");
resetEventList(&ae);
registerActuatorEventExt(engineConfiguration, &engineConfiguration2->triggerShape, &ae, list.add(INJECTOR_1_OUTPUT), 51 + 180 - 175);
assertEquals(2, ae.events[0].eventIndex);
assertEquals(51.9870, ae.events[0].angleOffset);
}
void testPinHelper(void) {
printf("*************************************************** testPinHelper\r\n");
assertEquals(0, getElectricalValue(0, OM_DEFAULT));
assertEquals(1, getElectricalValue(1, OM_DEFAULT));
assertEquals(0, getElectricalValue(1, OM_INVERTED));
assertEquals(1, getElectricalValue(0, OM_INVERTED));
}

View File

@ -0,0 +1,80 @@
/**
* @file test_signal_executor.c
*
* @date Nov 28, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
*/
#include <time.h>
#include "main.h"
#include "signal_executor.h"
#include "test_signal_executor.h"
#include "io_pins.h"
#include "utlist.h"
#include "event_queue.h"
extern OutputSignal *st_output_list;
static io_pin_e testLastToggledPin;
static int testToggleCounter;
int getRevolutionCounter(void) {
return 0;
}
void setOutputPinValue(io_pin_e pin, int value) {
// this is a test implementation of the method - we use it to see what's going on
testLastToggledPin = pin;
testToggleCounter++;
}
void scheduleTask(scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) {
}
void initSignalExecutorImpl(void) {
}
static EventQueue eq;
static int callbackCounter = 0;
static void callback(void *a) {
callbackCounter++;
}
void testSignalExecutor() {
print("*************************************** testSignalExecutor\r\n");
assertEquals(EMPTY_QUEUE, eq.getNextEventTime(0));
scheduling_s s1;
scheduling_s s2;
eq.insertTask(&s1, 0, 10, callback, NULL);
assertEquals(10, eq.getNextEventTime(0));
eq.executeAll(1);
assertEqualsM("callbacks not expected", 0, callbackCounter);
eq.executeAll(11);
assertEquals(1, callbackCounter);
assertEquals(EMPTY_QUEUE, eq.getNextEventTime(0));
eq.insertTask(&s1, 0, 10, callback, NULL);
eq.insertTask(&s2, 0, 13, callback, NULL);
assertEquals(10, eq.getNextEventTime(0));
eq.executeAll(1);
assertEquals(10, eq.getNextEventTime(0));
eq.clear();
callbackCounter = 0;
// both events are scheduled for the same time
eq.insertTask(&s1, 0, 10, callback, NULL);
eq.insertTask(&s2, 0, 10, callback, NULL);
eq.executeAll(11);
assertEquals(2, callbackCounter);
}

View File

@ -0,0 +1,282 @@
/**
* @file test_trigger_decoder.cpp
*
* @date Dec 24, 2013
* @author Andrey Belomutskiy, (c) 2012-2013
*/
#include "main.h"
#include "test_trigger_decoder.h"
#include "trigger_decoder.h"
#include "engine_math.h"
#include "ford_aspire.h"
#include "dodge_neon.h"
#include "ford_1995_inline_6.h"
#include "mazda_323.h"
extern "C" {
void sendOutConfirmation(char *value, int i);
}
void sendOutConfirmation(char *value, int i) {
// test implementation
}
int getTheAngle(engine_type_e engineType) {
persistent_config_s persistentConfig;
engine_configuration_s *ec = &persistentConfig.engineConfiguration;
engine_configuration2_s ec2;
resetConfigurationExt(engineType, ec, &ec2, &persistentConfig.boardConfiguration);
trigger_shape_s * shape = &ec2.triggerShape;
return findTriggerZeroEventIndex(shape, &ec->triggerConfig);
}
static void testDodgeNeonDecoder(void) {
printf("*************************************************** testDodgeNeonDecoder\r\n");
initTriggerDecoder();
assertEqualsM("trigger zero index", 8, getTheAngle(DODGE_NEON_1995));
persistent_config_s persistentConfig;
engine_configuration_s *ec = &persistentConfig.engineConfiguration;
engine_configuration2_s ec2;
resetConfigurationExt(DODGE_NEON_1995, ec, &ec2, &persistentConfig.boardConfiguration);
trigger_shape_s * shape = &ec2.triggerShape;
trigger_state_s state;
clearTriggerState(&state);
//
// assertFalseM("1 shaft_is_synchronized", state.shaft_is_synchronized);
//
// int r = 0;
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, r + 60);
// assertFalseM("2 shaft_is_synchronized", state.shaft_is_synchronized); // still no synchronization
//
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r + 210);
// assertFalseM("3 shaft_is_synchronized", state.shaft_is_synchronized); // still no synchronization
//
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, r + 420);
// assertFalseM("4 shaft_is_synchronized", state.shaft_is_synchronized); // still no synchronization
//
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r + 630);
// assertFalse(state.shaft_is_synchronized); // still no synchronization
//
// printf("2nd camshaft revolution\r\n");
// r = 720;
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, r + 60);
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r + 210);
// assertTrue(state.shaft_is_synchronized);
// assertEquals(0, state.current_index);
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, r + 420);
// assertEquals(1, state.current_index);
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r + 630);
// assertEquals(2, state.current_index);
//
// printf("3rd camshaft revolution\r\n");
// r = 2 * 720;
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, r + 60);
// assertEqualsM("current index", 3, state.current_index);
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r + 210);
// assertTrue(state.shaft_is_synchronized);
// assertEqualsM("current index", 0, state.current_index);
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, r + 420);
// processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r + 630);
}
static void test1995FordInline6TriggerDecoder(void) {
printf("*************************************************** test1995FordInline6TriggerDecoder\r\n");
assertEqualsM("triggerIndex ", 0, getTheAngle(FORD_INLINE_6_1995));
initTriggerDecoder();
persistent_config_s persistentConfig;
engine_configuration_s *ec = &persistentConfig.engineConfiguration;
engine_configuration2_s ec2;
resetConfigurationExt(FORD_INLINE_6_1995, ec, &ec2, &persistentConfig.boardConfiguration);
ActuatorEventList *ecl = &ec2.engineEventConfiguration.ignitionEvents;
assertEqualsM("ignition events size", 6, ecl->size);
assertEqualsM("event index", 0, ecl->events[0].eventIndex);
assertEquals(0, ecl->events[0].angleOffset);
assertEqualsM("event index", 10, ecl->events[5].eventIndex);
assertEquals(0, ecl->events[5].angleOffset);
trigger_state_s state;
clearTriggerState(&state);
trigger_shape_s * shape = &ec2.triggerShape;
assertFalseM("shaft_is_synchronized", state.shaft_is_synchronized);
int r = 10;
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r);
assertFalseM("shaft_is_synchronized", state.shaft_is_synchronized); // still no synchronization
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, ++r);
assertTrue(state.shaft_is_synchronized); // first signal rise synchronize
assertEquals(0, state.current_index);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r++);
assertEquals(1, state.current_index);
for (int i = 2; i < 10;) {
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, r++);
assertEqualsM("even", i++, state.current_index);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r++);
assertEqualsM("odd", i++, state.current_index);
}
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, r++);
assertEquals(10, state.current_index);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, r++);
assertEquals(11, state.current_index);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, r++);
assertEquals(0, state.current_index); // new revolution
assertEqualsM("running dwell", 0.5, getSparkDwellMsT(ec, 2000));
}
void testFordAspire(void) {
printf("*************************************************** testFordAspire\r\n");
assertEquals(4, getTheAngle(FORD_ASPIRE_1996));
persistent_config_s persistentConfig;
engine_configuration_s *ec = &persistentConfig.engineConfiguration;
engine_configuration2_s ec2;
resetConfigurationExt(FORD_ASPIRE_1996, ec, &ec2, &persistentConfig.boardConfiguration);
assertEquals(800, ec->fuelRpmBins[0]);
assertEquals(7000, ec->fuelRpmBins[15]);
ec->crankingChargeAngle = 65;
ec->crankingTimingAngle = 31;
assertEqualsM("cranking dwell", 54.166670, getSparkDwellMsT(ec, 200));
assertEqualsM("running dwell", 4, getSparkDwellMsT(ec, 2000));
assertEqualsM("higher rpm dwell", 3.25, getSparkDwellMsT(ec, 6000));
}
void testMazda323(void) {
printf("*************************************************** testMazda323\r\n");
persistent_config_s persistentConfig;
engine_configuration_s *ec = &persistentConfig.engineConfiguration;
engine_configuration2_s ec2;
resetConfigurationExt(MAZDA_323, ec, &ec2, &persistentConfig.boardConfiguration);
}
void testMazdaMianaNbDecoder(void) {
printf("*************************************************** testMazdaMianaNbDecoder\r\n");
persistent_config_s persistentConfig;
engine_configuration_s *ec = &persistentConfig.engineConfiguration;
engine_configuration2_s ec2;
resetConfigurationExt(MAZDA_MIATA_NB, ec, &ec2, &persistentConfig.boardConfiguration);
trigger_state_s state;
clearTriggerState(&state);
trigger_shape_s * shape = &ec2.triggerShape;
int a = 0;
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, a + 20);
assertFalseM("0a shaft_is_synchronized", state.shaft_is_synchronized);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, a + 340);
assertFalseM("0b shaft_is_synchronized", state.shaft_is_synchronized);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, a + 360);
assertFalseM("0c shaft_is_synchronized", state.shaft_is_synchronized);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, a + 380);
assertFalseM("0d shaft_is_synchronized", state.shaft_is_synchronized);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, a + 400);
assertTrueM("0e shaft_is_synchronized", state.shaft_is_synchronized);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, a + 720);
assertTrueM("0f shaft_is_synchronized", state.shaft_is_synchronized);
a = 720;
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, a + 20);
assertTrueM("1a shaft_is_synchronized", state.shaft_is_synchronized);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, a + 340);
assertTrueM("1b shaft_is_synchronized", state.shaft_is_synchronized);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, a + 360);
assertTrueM("1c shaft_is_synchronized", state.shaft_is_synchronized);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, a + 380);
assertTrueM("1d shaft_is_synchronized", state.shaft_is_synchronized);
assertEquals(5, state.current_index);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, a + 400);
assertTrueM("1e shaft_is_synchronized", state.shaft_is_synchronized);
assertEquals(0, state.current_index);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, a + 720);
assertTrueM("1f shaft_is_synchronized", state.shaft_is_synchronized);
}
void testFordEscortGt(void) {
printf("*************************************************** testFordEscortGt\r\n");
persistent_config_s persistentConfig;
engine_configuration_s *ec = &persistentConfig.engineConfiguration;
engine_configuration2_s ec2;
resetConfigurationExt(FORD_ESCORT_GT, ec, &ec2, &persistentConfig.boardConfiguration);
}
void testGY6_139QMB(void) {
printf("*************************************************** testGY6_139QMB\r\n");
persistent_config_s persistentConfig;
engine_configuration_s *ec = &persistentConfig.engineConfiguration;
engine_configuration2_s ec2;
resetConfigurationExt(GY6_139QMB, ec, &ec2, &persistentConfig.boardConfiguration);
trigger_state_s state;
clearTriggerState(&state);
assertFalseM("shaft_is_synchronized", state.shaft_is_synchronized);
trigger_shape_s * shape = &ec2.triggerShape;
assertFalseM("shaft_is_synchronized", state.shaft_is_synchronized);
assertEquals(0, state.current_index);
int now = 0;
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_UP, now++);
assertTrueM("shaft_is_synchronized", state.shaft_is_synchronized);
assertEquals(0, state.current_index);
processTriggerEvent(&state, shape, &ec->triggerConfig, SHAFT_PRIMARY_DOWN, now++);
assertTrueM("shaft_is_synchronized", state.shaft_is_synchronized);
assertEquals(1, state.current_index);
}
void testTriggerDecoder(void) {
printf("*************************************************** testTriggerDecoder\r\n");
engine_configuration2_s ec2;
initializeSkippedToothTriggerShapeExt(&ec2, 2, 0);
assertEqualsM("shape size", ec2.triggerShape.size, 4);
assertEquals(ec2.triggerShape.wave.switchTimes[0], 0.25);
assertEquals(ec2.triggerShape.wave.switchTimes[1], 0.5);
assertEquals(ec2.triggerShape.wave.switchTimes[2], 0.75);
assertEquals(ec2.triggerShape.wave.switchTimes[3], 1);
testDodgeNeonDecoder();
testFordAspire();
test1995FordInline6TriggerDecoder();
testMazdaMianaNbDecoder();
testGY6_139QMB();
testFordEscortGt();
// testMazda323();
}

View File

@ -0,0 +1,2 @@
make clean
make 2> err > log

View File

@ -0,0 +1,5 @@
make
cd build
rusefi_simulator.exe

View File

@ -0,0 +1,68 @@
#include <ch.h>
#include <hal.h>
#include <time.h>
#include <math.h>
#include "rusefi_enums.h"
#include "obd_error_codes.h"
#include "error_handling.h"
#include "boards.h"
#include "eficonsole.h"
#include "efilib.h"
#include "datalogging.h"
#include "efitime.h"
#ifndef GLOBAL_FT_H_
#define GLOBAL_FT_H_
#include "eficonsole_logic.h"
#include "rusefi_enums.h"
#define EFI_CUSTOM_PANIC_METHOD 1
// project-wide default thread stack size
#define UTILITY_THREAD_STACK_SIZE 1384
/**
* @brief @p Win32TestStream virtual methods table.
*/
struct Win32TestStreamVMT {
_base_sequential_stream_methods
};
typedef struct {
const struct Win32TestStreamVMT *vmt;
} TestStream;
extern TestStream testStream;
//##define TRUE 1
//#define FALSE 0
#endif /* GLOBAL_FT_H_ */
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
void printToWin32Console(char *p);
int systicks2ms(int systicks);
// todo: move somewhere else?
int lockAnyContext(void);
void unlockAnyContext(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
/**
* number of SysClock ticks in one ms
*/
#define TICKS_IN_MS (CH_FREQUENCY / 1000)
#define hal_lld_get_counter_value() 0

View File

@ -0,0 +1,187 @@
/**
* @file rusEfiFunctionalTest.c
*
* @date Mar 1, 2014
* @author Andrey Belomutskiy, (c) 2012-2013
*/
#include "global.h"
#include "boards.h"
#include "rusEfiFunctionalTest.h"
#include "console_io.h"
#include "eficonsole.h"
#include "engine_configuration.h"
#include "ec2.h"
#include "rusefi_enums.h"
#include "pwm_generator_logic.h"
#include "wave_math.h"
#include "trigger_central.h"
#include "datalogging.h"
#include "algo.h"
#include "rpm_calculator.h"
#include "wave_chart.h"
#include "status_loop.h"
#include "trigger_emulator_algo.h"
#include "main_trigger_callback.h"
#include "allsensors.h"
#include "analog_chart.h"
#include "injector_central.h"
extern WaveChart waveChart;
static persistent_config_s config;
static engine_configuration2_s ec2;
engine_configuration_s * engineConfiguration = &config.engineConfiguration;
board_configuration_s *boardConfiguration = &config.boardConfiguration;
engine_configuration2_s *engineConfiguration2 = &ec2;
void setOutputPinValue(io_pin_e pin, int logicValue) {
}
int isInjectionEnabled(void) {
return TRUE;
}
//void initOutputSignal(OutputSignal *signal, io_pin_e ioPin) {
//
//}
// todo: move this to "idle_controller.h"
extern "C" {
void idleDebug(char *msg, int value);
}
void idleDebug(char *msg, int value) {
}
float getMap(void) {
return 0;
}
static int primaryWheelState = FALSE;
static int secondaryWheelState = FALSE;
static void triggerEmulatorCallback(PwmConfig *state, int stateIndex) {
int newPrimaryWheelState = state->multiWave.waves[0].pinStates[stateIndex];
int newSecondaryWheelState = state->multiWave.waves[1].pinStates[stateIndex];
if (primaryWheelState != newPrimaryWheelState) {
primaryWheelState = newPrimaryWheelState;
hwHandleShaftSignal(primaryWheelState ? SHAFT_PRIMARY_UP : SHAFT_PRIMARY_DOWN);
}
if (secondaryWheelState != newSecondaryWheelState) {
secondaryWheelState = newSecondaryWheelState;
hwHandleShaftSignal(secondaryWheelState ? SHAFT_SECONDARY_UP : SHAFT_SECONDARY_DOWN);
}
// print("hello %d\r\n", chTimeNow());
}
void rusEfiFunctionalTest(void) {
initializeConsole();
initFakeBoard();
initStatusLoop();
resetConfigurationExt(FORD_ASPIRE_1996, engineConfiguration, engineConfiguration2, boardConfiguration);
initThermistors();
initAlgo();
initRpmCalculator();
initAnalogChart();
initTriggerEmulatorLogic(triggerEmulatorCallback);
initMainEventListener();
initTriggerCentral();
}
void printPendingMessages(void) {
printPending();
if (getFullLog()) {
printState(getCrankEventCounter());
finishStatusLine();
publishChartIfFull(&waveChart);
}
}
static size_t wt_writes(void *ip, const uint8_t *bp, size_t n) {
printToWin32Console((char*)bp);
return DELEGATE->vmt->write(DELEGATE, bp, n);
}
static size_t wt_reads(void *ip, uint8_t *bp, size_t n) {
return DELEGATE->vmt->read(DELEGATE, bp, n);
}
static char putMessageBuffer[2];
static msg_t wt_put(void *ip, uint8_t b) {
putMessageBuffer[0] = b;
putMessageBuffer[1] = 0;
printToWin32Console((char*)putMessageBuffer);
// cputs("wt_put");
return DELEGATE->vmt->put(DELEGATE, b);
}
static msg_t wt_get(void *ip) {
// cputs("wt_get");
//return 0;
return DELEGATE->vmt->get(DELEGATE);
}
static const struct Win32TestStreamVMT vmt = { wt_writes, wt_reads, wt_put, wt_get };
void initTestStream(TestStream *ts) {
ts->vmt = &vmt;
}
int isSerialOverTcpReady;
int is_serial_ready(void) {
return isSerialOverTcpReady;
}
void onFatalError(const char *msg, const char * file, int line) {
printf("onFatalError %s %s%d", msg, file, line);
exit(-1);
}
int warning(obd_code_e code, const char *fmt, ...) {
printf("Warning: %s\r\n", fmt);
return 0;
}
void firmwareError(const char *fmt, ...) {
fatal3((char*)fmt, __FILE__, __LINE__);
}
int hasFatalError(void) {
return false;
}
void chDbgPanic3(const char *msg, const char * file, int line) {
onFatalError(msg, file, line);
}
uint64_t getTimeNowUs(void) {
return chTimeNow() * (1000000 / CH_FREQUENCY);
}
efitimems_t currentTimeMillis(void) {
return getTimeNowUs() * 1000;
}
int getRusEfiVersion(void) {
return 239;
}

View File

@ -0,0 +1,6 @@
// this is less important for simulator
#ifndef SVN_VERSION
#define SVN_VERSION 0
#endif