• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

PJSC(Pump Jet Solenoid Controller)はArduinoを使用したバイク用燃料噴射コントローラです。このプロジェクトは、オープンソースECUプロジェクト『Speeduino』をベースにしています。


Commit MetaInfo

Revision23 (tree)
Time2018-09-05 21:10:51
Authormaharu

Log Message

Speeduino Aug.2018 version.

Change Summary

Incremental Difference

--- branches/Speeduino/README.md (revision 22)
+++ branches/Speeduino/README.md (revision 23)
@@ -1,19 +1,23 @@
1+
2+| | |
3+| --- | --- |
4+| **Dev Status** | ![Unstable](https://img.shields.io/badge/Status-Unstable--Use%20Release-red.svg) |
5+| **Build** | [![Build status](https://img.shields.io/travis/noisymime/speeduino.svg)](https://travis-ci.org/noisymime/speeduino/) |
6+| **Feature Bounties** | [![Bountysource](https://img.shields.io/bountysource/team/speeduino/activity.svg)](https://www.bountysource.com/teams/speeduino)
7+
18 Speeduino
29 =========
310
11+The Speeduino project is a flexible, fully featured Engine Management Systems (EMS aka ECU) based on the low cost and open source Arduino platform. It provides all standard engine management functions and is constantly growing to support more features and with wider engine compatibility.
12+
413 FAQ:
514 =========
615
7-Q: Speeduino, didn't you used to be called something else?
8-
9-A: Initial aim was for a simple DIY ECU for go-karts and the original project title was kartduino. As it became apparent that we wanted to extend support to larger vehicles, the name became a bit misleading.
10-The important ideas though remain the same and the priority is still SIMPLICITY! The code is written with simplicity above all else in mind and all areas are well commented. The project can be loaded directly into the Arduino IDE and compiled with only a single additional library needing to be added. Where code is complex or low level, a high level pseudo code example is given to explain what is being performed.
11-
1216 ========================================================================
1317
1418 Q: Arduino ECU,pffft, heard THAT before. Does this one actually work?
1519
16-A: Yep! 1, 2, 4, 6 and 8 cylinder engines have all run, fuel and ignition, off Speeduino.
20+A: Yep! 1, 2, 3, 4, 5, 6 and 8 cylinder engines have all run using Speeduino. At last count over 300 engines were running on this platform, but this figure is growing all the time.
1721
1822 ========================================================================
1923
@@ -39,4 +43,4 @@
3943
4044 A: Come and visit the forum : http://speeduino.com/forum
4145
42-If you still need some more info, feel free to drop me a line: noisymime (AT) gmail (dot) com
46+If you still need some more info, feel free to jump on our Slack team: http://slack.speeduino.com:3000/
--- branches/Speeduino/reference/speeduino.ini (revision 22)
+++ branches/Speeduino/reference/speeduino.ini (revision 23)
@@ -6,7 +6,7 @@
66 MTversion = 2.25
77
88 queryCommand = "Q"
9- signature = "speeduino 201806"
9+ signature = "speeduino 201808"
1010 versionInfo = "S" ;This info is what is displayed to user
1111
1212 [TunerStudio]
@@ -61,6 +61,22 @@
6161
6262 fuelLoadMax = scalar, U08, "", 1, 0, 0, 511, 0
6363 ignLoadMax = scalar, U08, "", 1, 0, 0, 511, 0
64+ AUXin00Alias = string, ASCII, 20
65+ AUXin01Alias = string, ASCII, 20
66+ AUXin02Alias = string, ASCII, 20
67+ AUXin03Alias = string, ASCII, 20
68+ AUXin04Alias = string, ASCII, 20
69+ AUXin05Alias = string, ASCII, 20
70+ AUXin06Alias = string, ASCII, 20
71+ AUXin07Alias = string, ASCII, 20
72+ AUXin08Alias = string, ASCII, 20
73+ AUXin09Alias = string, ASCII, 20
74+ AUXin10Alias = string, ASCII, 20
75+ AUXin11Alias = string, ASCII, 20
76+ AUXin12Alias = string, ASCII, 20
77+ AUXin13Alias = string, ASCII, 20
78+ AUXin14Alias = string, ASCII, 20
79+ AUXin15Alias = string, ASCII, 20
6480
6581
6682 [Constants]
@@ -116,7 +132,7 @@
116132
117133 endianness = little
118134 nPages = 10
119- pageSize = 288, 128, 288, 128, 288, 128, 240, 192, 128, 192
135+ pageSize = 288, 128, 288, 128, 288, 128, 240, 192, 192, 192
120136
121137 ;burnCommand = "B"
122138 ;pageActivate = "P\001", "P\002", "P\003", "P\004", "P\005", "P\006", "P\007", "P\010", "P\011", "P\012", "P\013"
@@ -124,10 +140,10 @@
124140 ;pageValueWrite = "W%2o%v", "W%o%v", "W%2o%v", "W%o%v", "W%2o%v", "W%o%v", "W%o%v", "W%o%v", "W%o%v", "W%o%v", "W%o%v"
125141
126142 ; New commands
127- ;pageSize = 288, 128, 288, 128, 288, 128, 128, 160, 192, 128, 192
143+ ;pageSize = 288, 128, 288, 128, 288, 128, 128, 160, 192, 192, 192
128144 pageIdentifier = "\$tsCanId\x01", "\$tsCanId\x02", "\$tsCanId\x03", "\$tsCanId\x04", "\$tsCanId\x05", "\$tsCanId\x06", "\$tsCanId\x07", "\$tsCanId\x08", "\$tsCanId\x09", "\$tsCanId\x0A"
129145 burnCommand = "b%2i", "b%2i", "b%2i", "b%2i", "b%2i", "b%2i", "b%2i", "b%2i", "b%2i", "b%2i"
130- pageReadCommand = "p%2i%2o%2c%v", "p%2i%2o%2c%v", "p%2i%2o%2c%v", "p%2i%2o%2c%v", "p%2i%2o%2c%v", "p%2i%2o%2c%v", "p%2i%2o%2c%v", "p%2i%2o%2c%v", "p%2i%2o%2c%v", "p%2i%2o%2c%v"
146+ pageReadCommand = "p%2i%2o%2c", "p%2i%2o%2c", "p%2i%2o%2c", "p%2i%2o%2c", "p%2i%2o%2c", "p%2i%2o%2c", "p%2i%2o%2c", "p%2i%2o%2c", "p%2i%2o%2c", "p%2i%2o%2c"
131147 pageValueWrite = "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v"
132148 pageChunkWrite = "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v", "w%2i%2o%2c%v"
133149
@@ -144,8 +160,12 @@
144160
145161 #define PIN_OUT10inv = "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
146162 #define PIN_OUT16inv = "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
147-
148- #define tsCanId_list = "CAN ID 0", "CAN ID 1", "CAN ID 2", "CAN ID 3", "CAN ID 4", "CAN ID 5", "CAN ID 6", "CAN ID 7", "CAN ID 8", "CAN ID 9", "CAN ID 10","CAN ID 11","CAN ID 12","CAN ID 13","CAN ID 14","INVALID"
163+ #define PIN_16inv = "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
164+
165+ #define ANALOG_PIN = "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A8", "A10", "A11", "A12", "A13", "A14", "A15", $PIN_16inv, $PIN_16inv, $PIN_16inv
166+ #define DIGITAL_PIN = "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
167+ #define ANALOG_DIG_PIN_LIST = $DIGITAL_PIN, $ANALOG_PIN
168+ #define tsCanId_list = "CAN ID 0", "CAN ID 1", "CAN ID 2", "CAN ID 3", "CAN ID 4", "CAN ID 5", "CAN ID 6", "CAN ID 7", "CAN ID 8", "CAN ID 9", "CAN ID 10","CAN ID 11","CAN ID 12","CAN ID 13","CAN ID 14","INVALID"
149169 #define CAN_ADDRESS_HEX_inv255 = $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT16inv, $PIN_OUT10inv, "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
150170 #define CAN_ADDRESS_HEX_00XX = "INVALID", "0x001", "0x002", "0x003", "0x004", "0x005", "0x006", "0x007", "0x008", "0x009", "0x00A", "0x00B", "0x00C", "0x00D", "0x00E", "0x00F", "0x010", "0x011", "0x012", "0x013", "0x014", "0x015", "0x016", "0x017", "0x018", "0x019", "0x01A", "0x01B", "0x01C", "0x01D", "0x01E", "0x01F", "0x020", "0x021", "0x022", "0x023", "0x024", "0x025", "0x026", "0x027", "0x028", "0x029", "0x02A", "0x02B", "0x02C", "0x02D", "0x02E", "0x02F", "0x030", "0x031", "0x032", "0x033", "0x034", "0x035", "0x036", "0x037", "0x038", "0x039", "0x03A", "0x03B", "0x03C", "0x03D", "0x03E", "0x03F", "0x040", "0x041", "0x042", "0x043", "0x044", "0x045", "0x046", "0x047", "0x048", "0x049", "0x04A", "0x04B", "0x04C", "0x04D", "0x04E", "0x04F", "0x050", "0x051", "0x052", "0x053", "0x054", "0x055", "0x056", "0x057", "0x058", "0x059", "0x05A", "0x05B", "0x05C", "0x05D", "0x05E", "0x05F" ,"0x060", "0x061", "0x062", "0x063", "0x064", "0x065", "0x066", "0x067", "0x068", "0x069", "0x06A", "0x06B", "0x06C", "0x06D", "0x06E", "0x06F", "0x070", "0x071", "0x072", "0x073", "0x074", "0x075", "0x076", "0x077", "0x078", "0x079", "0x07A", "0x07B", "0x07C", "0x07D", "0x07E", "0x07F", "0x080", "0x081", "0x082", "0x083", "0x084", "0x085", "0x086", "0x087", "0x088", "0x089", "0x08A", "0x08B", "0x08C", "0x08D", "0x08E", "0x08F" ,"0x090", "0x091", "0x092", "0x093", "0x094", "0x095", "0x096", "0x097", "0x098", "0x099", "0x09A", "0x09B", "0x09C", "0x09D", "0x09E", "0x09F", "0x0A0", "0x0A1", "0x0A2", "0x0A3", "0x0A4", "0x0A5", "0x0A6", "0x0A7", "0x0A8", "0x0A9", "0x0AA", "0x0AB", "0x0AC", "0x0AD", "0x0AE", "0x0AF", "0x0B0", "0x0B1", "0x0B2", "0x0B3", "0x0B4", "0x0B5", "0x0B6", "0x0B7", "0x0B8", "0x0B9", "0x0BA", "0x0BB", "0x0BC", "0x0BD", "0x0BE", "0x0BF" ,"0x0C0", "0x0C1", "0x0C2", "0x0C3", "0x0C4", "0x0C5", "0x0C6", "0x0C7", "0x0C8", "0x0C9", "0x0CA", "0x0CB", "0x0CC", "0x0CD", "0x0CE", "0x0CF", "0x0D0", "0x0D1", "0x0D2", "0x0D3", "0x0D4", "0x0D5", "0x0D6", "0x0D7", "0x0D8", "0x0D9", "0x0DA", "0x0DB", "0x0DC", "0x0DD", "0x0DE", "0x0DF", "0x0E0", "0x0E1", "0x0E2", "0x0E3", "0x0E4", "0x0E5", "0x0E6", "0x0E7", "0x0E8", "0x0E9", "0x0EA", "0x0EB", "0x0EC", "0x0ED", "0x0EE", "0x0EF" ,"0x0F0", "0x0F1", "0x0F2", "0x0F3", "0x0F4", "0x0F5", "0x0F6", "0x0F7", "0x0F8", "0x0F9", "0x0FA", "0x0FB", "0x0FC", "0x0FD", "0x0FE", "0x0FF"
151171 #define CAN_ADDRESS_HEX_01XX = "0x100", "0x101", "0x102", "0x103", "0x104", "0x105", "0x106", "0x107", "0x108", "0x109", "0x10A", "0x10B", "0x10C", "0x10D", "0x10E", "0x10F", "0x110", "0x111", "0x112", "0x113", "0x114", "0x115", "0x116", "0x117", "0x118", "0x119", "0x11A", "0x11B", "0x11C", "0x11D", "0x11E", "0x11F", "0x120", "0x121", "0x122", "0x123", "0x124", "0x125", "0x126", "0x127", "0x128", "0x129", "0x12A", "0x12B", "0x12C", "0x12D", "0x12E", "0x12F", "0x130", "0x131", "0x132", "0x133", "0x134", "0x135", "0x136", "0x137", "0x138", "0x139", "0x13A", "0x13B", "0x13C", "0x13D", "0x13E", "0x13F", "0x140", "0x141", "0x142", "0x143", "0x144", "0x145", "0x146", "0x147", "0x148", "0x149", "0x14A", "0x14B", "0x14C", "0x14D", "0x14E", "0x14F", "0x150", "0x151", "0x152", "0x153", "0x154", "0x155", "0x156", "0x157", "0x158", "0x159", "0x15A", "0x15B", "0x15C", "0x15D", "0x15E", "0x15F" ,"0x160", "0x161", "0x162", "0x163", "0x164", "0x165", "0x166", "0x167", "0x168", "0x169", "0x16A", "0x16B", "0x16C", "0x16D", "0x16E", "0x16F", "0x170", "0x171", "0x172", "0x173", "0x174", "0x175", "0x176", "0x177", "0x178", "0x179", "0x17A", "0x17B", "0x17C", "0x17D", "0x17E", "0x17F", "0x180", "0x181", "0x182", "0x183", "0x184", "0x185", "0x186", "0x187", "0x188", "0x189", "0x18A", "0x18B", "0x18C", "0x18D", "0x18E", "0x18F" ,"0x190", "0x191", "0x192", "0x193", "0x194", "0x195", "0x196", "0x197", "0x198", "0x199", "0x19A", "0x19B", "0x19C", "0x19D", "0x19E", "0x19F", "0x1A0", "0x1A1", "0x1A2", "0x1A3", "0x1A4", "0x1A5", "0x1A6", "0x1A7", "0x1A8", "0x1A9", "0x1AA", "0x1AB", "0x1AC", "0x1AD", "0x1AE", "0x1AF", "0x1B0", "0x1B1", "0x1B2", "0x1B3", "0x1B4", "0x1B5", "0x1B6", "0x1B7", "0x1B8", "0x1B9", "0x1BA", "0x1BB", "0x1BC", "0x1BD", "0x1BE", "0x1BF" ,"0x1C0", "0x1C1", "0x1C2", "0x1C3", "0x1C4", "0x1C5", "0x1C6", "0x1C7", "0x1C8", "0x1C9", "0x1CA", "0x1CB", "0x1CC", "0x1CD", "0x1CE", "0x1CF", "0x1D0", "0x1D1", "0x1D2", "0x1D3", "0x1D4", "0x1D5", "0x1D6", "0x1D7", "0x1D8", "0x1D9", "0x1DA", "0x1DB", "0x1DC", "0x1DD", "0x1DE", "0x1DF", "0x1E0", "0x1E1", "0x1E2", "0x1E3", "0x1E4", "0x1E5", "0x1E6", "0x1E7", "0x1E8", "0x1E9", "0x1EA", "0x1EB", "0x1EC", "0x1ED", "0x1EE", "0x1EF" ,"0x1F0", "0x1F1", "0x1F2", "0x1F3", "0x1F4", "0x1F5", "0x1F6", "0x1F7", "0x1F8", "0x1F9", "0x1FA", "0x1FB", "0x1FC", "0x1FD", "0x1FE", "0x1FF"
@@ -235,7 +255,7 @@
235255 dfcoEnabled = bits, U08, 38, [7:7], "Off", "On"
236256
237257 primePulse = scalar, U08, 39, "ms", 0.1, 0.0, 0.0, 25.5, 1
238- dutyLim = scalar, U08, 40, "%", 1.0, 0.0, 0.0, 100.0, 0
258+ dutyLim = scalar, U08, 40, "%", 1.0, 0.0, 0.0, 95.0, 0
239259 flexFreqLow = scalar, U08, 41, "Hz", 1.0, 0.0, 0.0, 250.0, 0
240260 flexFreqHigh = scalar, U08, 42, "Hz", 1.0, 0.0, 0.0, 250.0, 0
241261
@@ -274,7 +294,8 @@
274294 page = 3
275295 advTable1 = array, U08, 0,[16x16], "deg", 1.0, -40, -40, 215.0, 0
276296 rpmBins2 = array, U08, 256,[ 16], "RPM", 100.0, 0.0, 100, 25500, 0
277- ignLoadBins= array, U08, 272, [ 16], { bitStringValue(algorithmUnits , ignAlgorithm) }, 2.0, 0.0, 0.0, {ignLoadMax}, 0
297+ ;ignLoadBins= array, U08, 272, [ 16], { bitStringValue(algorithmUnits , ignAlgorithm) }, 2.0, 0.0, 0.0, {ignLoadMax}, 0
298+ mapBins1= array, U08, 272, [ 16], { bitStringValue(algorithmUnits , ignAlgorithm) }, 2.0, 0.0, 0.0, {ignLoadMax}, 0 ; This name has to be used in order for the table to show up in MLVs table. I can't find the regexs that make this work :(
278299
279300 ;--------------------------------------------------
280301 ;Start Page 4
@@ -560,7 +581,7 @@
560581 #endif
561582
562583 ;--------------------------------------------------
563-;CANBUS control (Page 9)
584+;CANBUS control and Auxillary io(Page 9)
564585 ;--------------------------------------------------
565586 page = 9
566587 #if CAN_COMMANDS
@@ -569,148 +590,230 @@
569590 enable_canbus = bits, U08, 0, [0:1], "Disable", "On Via Secondary Serial", "INVALID", "INVALID"
570591 #endif
571592 enable_candata_in = bits, U08, 0, [2:2], "Off", "On"
593+ #if CAN_COMMANDS
594+ caninput_sel0 = bits, U08, 1, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
595+ caninput_sel1 = bits, U08, 2, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
596+ caninput_sel2 = bits, U08, 3, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
597+ caninput_sel3 = bits, U08, 4, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
598+ caninput_sel4 = bits, U08, 5, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
599+ caninput_sel5 = bits, U08, 6, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
600+ caninput_sel6 = bits, U08, 7, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
601+ caninput_sel7 = bits, U08, 8, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
602+ caninput_sel8 = bits, U08, 9, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
603+ caninput_sel9 = bits, U08, 10, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
604+ caninput_sel10 = bits, U08, 11, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
605+ caninput_sel11 = bits, U08, 12, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
606+ caninput_sel12 = bits, U08, 13, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
607+ caninput_sel13 = bits, U08, 14, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
608+ caninput_sel14 = bits, U08, 15, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
609+ caninput_sel15 = bits, U08, 16, [0:1], "Off", "EXT / CAN", "Analog_local", "Digital_local"
610+ #else
611+ caninput_sel0 = bits, U08, 1, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
612+ caninput_sel1 = bits, U08, 2, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
613+ caninput_sel2 = bits, U08, 3, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
614+ caninput_sel3 = bits, U08, 4, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
615+ caninput_sel4 = bits, U08, 5, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
616+ caninput_sel5 = bits, U08, 6, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
617+ caninput_sel6 = bits, U08, 7, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
618+ caninput_sel7 = bits, U08, 8, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
619+ caninput_sel8 = bits, U08, 9, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
620+ caninput_sel9 = bits, U08, 10, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
621+ caninput_sel10 = bits, U08, 11, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
622+ caninput_sel11 = bits, U08, 12, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
623+ caninput_sel12 = bits, U08, 13, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
624+ caninput_sel13 = bits, U08, 14, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
625+ caninput_sel14 = bits, U08, 15, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
626+ caninput_sel15 = bits, U08, 16, [0:1], "Off", "INVALID", "Analog_local", "Digital_local"
627+ #endif
628+ ;caninput_param_group = array , U16, 9, [ 8], "", 1, 0, 0, 65535, 0
629+ caninput_source_can_address0 = bits, U16, 17, [0:10], $CAN_ADDRESS_HEX
630+ caninput_source_can_address1 = bits, U16, 19, [0:10], $CAN_ADDRESS_HEX
631+ caninput_source_can_address2 = bits, U16, 21, [0:10], $CAN_ADDRESS_HEX
632+ caninput_source_can_address3 = bits, U16, 23, [0:10], $CAN_ADDRESS_HEX
633+ caninput_source_can_address4 = bits, U16, 25, [0:10], $CAN_ADDRESS_HEX
634+ caninput_source_can_address5 = bits, U16, 27, [0:10], $CAN_ADDRESS_HEX
635+ caninput_source_can_address6 = bits, U16, 29, [0:10], $CAN_ADDRESS_HEX
636+ caninput_source_can_address7 = bits, U16, 31, [0:10], $CAN_ADDRESS_HEX
637+ caninput_source_can_address8 = bits, U16, 33, [0:10], $CAN_ADDRESS_HEX
638+ caninput_source_can_address9 = bits, U16, 35, [0:10], $CAN_ADDRESS_HEX
639+ caninput_source_can_address10 = bits, U16, 37, [0:10], $CAN_ADDRESS_HEX
640+ caninput_source_can_address11 = bits, U16, 39, [0:10], $CAN_ADDRESS_HEX
641+ caninput_source_can_address12 = bits, U16, 41, [0:10], $CAN_ADDRESS_HEX
642+ caninput_source_can_address13 = bits, U16, 43, [0:10], $CAN_ADDRESS_HEX
643+ caninput_source_can_address14 = bits, U16, 45, [0:10], $CAN_ADDRESS_HEX
644+ caninput_source_can_address15 = bits, U16, 47, [0:10], $CAN_ADDRESS_HEX
572645
573- caninput_sel0 = bits, U16, 1, [0:0], "Off", "On"
574- caninput_sel1 = bits, U16, 1, [1:1], "Off", "On"
575- caninput_sel2 = bits, U16, 1, [2:2], "Off", "On"
576- caninput_sel3 = bits, U16, 1, [3:3], "Off", "On"
577- caninput_sel4 = bits, U16, 1, [4:4], "Off", "On"
578- caninput_sel5 = bits, U16, 1, [5:5], "Off", "On"
579- caninput_sel6 = bits, U16, 1, [6:6], "Off", "On"
580- caninput_sel7 = bits, U16, 1, [7:7], "Off", "On"
581- caninput_sel8 = bits, U16, 1, [8:8], "Off", "On"
582- caninput_sel9 = bits, U16, 1, [9:9], "Off", "On"
583- caninput_sel10 = bits, U16, 1, [10:10], "Off", "On"
584- caninput_sel11 = bits, U16, 1, [11:11], "Off", "On"
585- caninput_sel12 = bits, U16, 1, [12:12], "Off", "On"
586- caninput_sel13 = bits, U16, 1, [13:13], "Off", "On"
587- caninput_sel14 = bits, U16, 1, [14:14], "Off", "On"
588- caninput_sel15 = bits, U16, 1, [15:15], "Off", "On"
589646
590- ;caninput_param_group = array , U16, 9, [ 8], "", 1, 0, 0, 65535, 0
591- caninput_source_can_address0 = bits, U16, 3, [0:10], $CAN_ADDRESS_HEX
592- caninput_source_can_address1 = bits, U16, 5, [0:10], $CAN_ADDRESS_HEX
593- caninput_source_can_address2 = bits, U16, 7, [0:10], $CAN_ADDRESS_HEX
594- caninput_source_can_address3 = bits, U16, 9, [0:10], $CAN_ADDRESS_HEX
595- caninput_source_can_address4 = bits, U16, 11, [0:10], $CAN_ADDRESS_HEX
596- caninput_source_can_address5 = bits, U16, 13, [0:10], $CAN_ADDRESS_HEX
597- caninput_source_can_address6 = bits, U16, 15, [0:10], $CAN_ADDRESS_HEX
598- caninput_source_can_address7 = bits, U16, 17, [0:10], $CAN_ADDRESS_HEX
599- caninput_source_can_address8 = bits, U16, 19, [0:10], $CAN_ADDRESS_HEX
600- caninput_source_can_address9 = bits, U16, 21, [0:10], $CAN_ADDRESS_HEX
601- caninput_source_can_address10 = bits, U16, 23, [0:10], $CAN_ADDRESS_HEX
602- caninput_source_can_address11 = bits, U16, 25, [0:10], $CAN_ADDRESS_HEX
603- caninput_source_can_address12 = bits, U16, 27, [0:10], $CAN_ADDRESS_HEX
604- caninput_source_can_address13 = bits, U16, 29, [0:10], $CAN_ADDRESS_HEX
605- caninput_source_can_address14 = bits, U16, 31, [0:10], $CAN_ADDRESS_HEX
606- caninput_source_can_address15 = bits, U16, 33, [0:10], $CAN_ADDRESS_HEX
607647
648+ caninput_source_start_byte0 = bits, U08, 49, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
649+ caninput_source_start_byte1 = bits, U08, 50, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
650+ caninput_source_start_byte2 = bits, U08, 51, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
651+ caninput_source_start_byte3 = bits, U08, 52, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
652+ caninput_source_start_byte4 = bits, U08, 53, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
653+ caninput_source_start_byte5 = bits, U08, 54, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
654+ caninput_source_start_byte6 = bits, U08, 55, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
655+ caninput_source_start_byte7 = bits, U08, 56, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
656+ caninput_source_start_byte8 = bits, U08, 57, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
657+ caninput_source_start_byte9 = bits, U08, 58, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
658+ caninput_source_start_byte10 = bits, U08, 59, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
659+ caninput_source_start_byte11 = bits, U08, 60, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
660+ caninput_source_start_byte12 = bits, U08, 61, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
661+ caninput_source_start_byte13 = bits, U08, 62, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
662+ caninput_source_start_byte14 = bits, U08, 63, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
663+ caninput_source_start_byte15 = bits, U08, 64, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
608664
665+ caninput_source_num_bytes0 = bits, U16, 65, [0:0], "1", "2"
666+ caninput_source_num_bytes1 = bits, U16, 65, [1:1], "1", "2"
667+ caninput_source_num_bytes2 = bits, U16, 65, [2:2], "1", "2"
668+ caninput_source_num_bytes3 = bits, U16, 65, [3:3], "1", "2"
669+ caninput_source_num_bytes4 = bits, U16, 65, [4:4], "1", "2"
670+ caninput_source_num_bytes5 = bits, U16, 65, [5:5], "1", "2"
671+ caninput_source_num_bytes6 = bits, U16, 65, [6:6], "1", "2"
672+ caninput_source_num_bytes7 = bits, U16, 65, [7:7], "1", "2"
673+ caninput_source_num_bytes8 = bits, U16, 65, [8:8], "1", "2"
674+ caninput_source_num_bytes9 = bits, U16, 65, [9:9], "1", "2"
675+ caninput_source_num_bytes10 = bits, U16, 65, [10:10], "1", "2"
676+ caninput_source_num_bytes11 = bits, U16, 65, [11:11], "1", "2"
677+ caninput_source_num_bytes12 = bits, U16, 65, [12:12], "1", "2"
678+ caninput_source_num_bytes13 = bits, U16, 65, [13:13], "1", "2"
679+ caninput_source_num_bytes14 = bits, U16, 65, [14:14], "1", "2"
680+ caninput_source_num_bytes15 = bits, U16, 65, [15:15], "1", "2"
609681
610- caninput_source_start_byte0 = bits, U08, 35, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
611- caninput_source_start_byte1 = bits, U08, 36, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
612- caninput_source_start_byte2 = bits, U08, 37, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
613- caninput_source_start_byte3 = bits, U08, 38, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
614- caninput_source_start_byte4 = bits, U08, 39, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
615- caninput_source_start_byte5 = bits, U08, 40, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
616- caninput_source_start_byte6 = bits, U08, 41, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
617- caninput_source_start_byte7 = bits, U08, 42, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
618- caninput_source_start_byte8 = bits, U08, 43, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
619- caninput_source_start_byte9 = bits, U08, 44, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
620- caninput_source_start_byte10 = bits, U08, 45, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
621- caninput_source_start_byte11 = bits, U08, 46, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
622- caninput_source_start_byte12 = bits, U08, 47, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
623- caninput_source_start_byte13 = bits, U08, 48, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
624- caninput_source_start_byte14 = bits, U08, 49, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
625- caninput_source_start_byte15 = bits, U08, 50, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
682+ unused10_67 = scalar, U08, 67, "", 1, 0, 0, 255, 0
683+ unused10_68 = scalar, U08, 68, "", 1, 0, 0, 255, 0
684+
685+ enable_candata_out = bits, U08, 69, [0:0], "Off", "On"
686+ canoutput_sel0 = bits, U08, 70, [0:0], "Off", "On"
687+ canoutput_sel1 = bits, U08, 71, [0:0], "Off", "On"
688+ canoutput_sel2 = bits, U08, 72, [0:0], "Off", "On"
689+ canoutput_sel3 = bits, U08, 73, [0:0], "Off", "On"
690+ canoutput_sel4 = bits, U08, 74, [0:0], "Off", "On"
691+ canoutput_sel5 = bits, U08, 75, [0:0], "Off", "On"
692+ canoutput_sel6 = bits, U08, 76, [0:0], "Off", "On"
693+ canoutput_sel7 = bits, U08, 77, [0:0], "Off", "On"
694+ canoutput_param_group = array , U16, 78, [ 8], "", 1, 0, 0, 65535, 0
695+ canoutput_param_start_byte0 = bits, U08, 94, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
696+ canoutput_param_start_byte1 = bits, U08, 95, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
697+ canoutput_param_start_byte2 = bits, U08, 96, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
698+ canoutput_param_start_byte3 = bits, U08, 97, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
699+ canoutput_param_start_byte4 = bits, U08, 98, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
700+ canoutput_param_start_byte5 = bits, U08, 99, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
701+ canoutput_param_start_byte6 = bits, U08, 100, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
702+ canoutput_param_start_byte7 = bits, U08, 101, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
703+ canoutput_param_num_bytes0 = bits, U08, 102, [0:1], "INVALID", "1", "2", "INVALID"
704+ canoutput_param_num_bytes1 = bits, U08, 103, [0:1], "INVALID", "1", "2", "INVALID"
705+ canoutput_param_num_bytes2 = bits, U08, 104, [0:1], "INVALID", "1", "2", "INVALID"
706+ canoutput_param_num_bytes3 = bits, U08, 105, [0:1], "INVALID", "1", "2", "INVALID"
707+ canoutput_param_num_bytes4 = bits, U08, 106, [0:1], "INVALID", "1", "2", "INVALID"
708+ canoutput_param_num_bytes5 = bits, U08, 107, [0:1], "INVALID", "1", "2", "INVALID"
709+ canoutput_param_num_bytes6 = bits, U08, 108, [0:1], "INVALID", "1", "2", "INVALID"
710+ canoutput_param_num_bytes7 = bits, U08, 109, [0:1], "INVALID", "1", "2", "INVALID"
626711
627- caninput_source_num_bytes0 = bits, U16, 51, [0:0], "1", "2"
628- caninput_source_num_bytes1 = bits, U16, 51, [1:1], "1", "2"
629- caninput_source_num_bytes2 = bits, U16, 51, [2:2], "1", "2"
630- caninput_source_num_bytes3 = bits, U16, 51, [3:3], "1", "2"
631- caninput_source_num_bytes4 = bits, U16, 51, [4:4], "1", "2"
632- caninput_source_num_bytes5 = bits, U16, 51, [5:5], "1", "2"
633- caninput_source_num_bytes6 = bits, U16, 51, [6:6], "1", "2"
634- caninput_source_num_bytes7 = bits, U16, 51, [7:7], "1", "2"
635- caninput_source_num_bytes8 = bits, U16, 51, [8:8], "1", "2"
636- caninput_source_num_bytes9 = bits, U16, 51, [9:9], "1", "2"
637- caninput_source_num_bytes10 = bits, U16, 51, [10:10], "1", "2"
638- caninput_source_num_bytes11 = bits, U16, 51, [11:11], "1", "2"
639- caninput_source_num_bytes12 = bits, U16, 51, [12:12], "1", "2"
640- caninput_source_num_bytes13 = bits, U16, 51, [13:13], "1", "2"
641- caninput_source_num_bytes14 = bits, U16, 51, [14:14], "1", "2"
642- caninput_source_num_bytes15 = bits, U16, 51, [15:15], "1", "2"
712+ unused10_110 = scalar, U08, 110, "", 1, 0, 0, 255, 0
713+ unused10_111 = scalar, U08, 111, "", 1, 0, 0, 255, 0
714+ unused10_112 = scalar, U08, 112, "", 1, 0, 0, 255, 0
715+ unused10_113 = scalar, U08, 113, "", 1, 0, 0, 255, 0
643716
644- unused10_53 = scalar, U08, 53, "", 1, 0, 0, 255, 0
645- unused10_54 = scalar, U08, 54, "", 1, 0, 0, 255, 0
646- enable_candata_out = bits, U08, 55, [0:0], "Off", "On"
647- canoutput_sel0 = bits, U08, 56, [0:0], "Off", "On"
648- canoutput_sel1 = bits, U08, 57, [0:0], "Off", "On"
649- canoutput_sel2 = bits, U08, 58, [0:0], "Off", "On"
650- canoutput_sel3 = bits, U08, 59, [0:0], "Off", "On"
651- canoutput_sel4 = bits, U08, 60, [0:0], "Off", "On"
652- canoutput_sel5 = bits, U08, 61, [0:0], "Off", "On"
653- canoutput_sel6 = bits, U08, 62, [0:0], "Off", "On"
654- canoutput_sel7 = bits, U08, 63, [0:0], "Off", "On"
655- canoutput_param_group = array , U16, 64, [ 8], "", 1, 0, 0, 65535, 0
656- canoutput_param_start_byte0 = bits, U08, 80, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
657- canoutput_param_start_byte1 = bits, U08, 81, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
658- canoutput_param_start_byte2 = bits, U08, 82, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
659- canoutput_param_start_byte3 = bits, U08, 83, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
660- canoutput_param_start_byte4 = bits, U08, 84, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
661- canoutput_param_start_byte5 = bits, U08, 85, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
662- canoutput_param_start_byte6 = bits, U08, 86, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
663- canoutput_param_start_byte7 = bits, U08, 87, [0:2], "0", "1", "2", "3", "4", "5", "6", "7"
664- canoutput_param_num_bytes0 = bits, U08, 88, [0:1], "INVALID", "1", "2", "INVALID"
665- canoutput_param_num_bytes1 = bits, U08, 89, [0:1], "INVALID", "1", "2", "INVALID"
666- canoutput_param_num_bytes2 = bits, U08, 90, [0:1], "INVALID", "1", "2", "INVALID"
667- canoutput_param_num_bytes3 = bits, U08, 91, [0:1], "INVALID", "1", "2", "INVALID"
668- canoutput_param_num_bytes4 = bits, U08, 92, [0:1], "INVALID", "1", "2", "INVALID"
669- canoutput_param_num_bytes5 = bits, U08, 93, [0:1], "INVALID", "1", "2", "INVALID"
670- canoutput_param_num_bytes6 = bits, U08, 94, [0:1], "INVALID", "1", "2", "INVALID"
671- canoutput_param_num_bytes7 = bits, U08, 95, [0:1], "INVALID", "1", "2", "INVALID"
717+ speeduino_tsCanId = bits, U08, 114, [0:3], $tsCanId_list
718+ true_address = bits, U16, 115, [0:10], $CAN_ADDRESS_HEX
719+ realtime_base_address = bits, U16, 117, [0:10], $CAN_ADDRESS_HEX
720+ obd_address = bits, U16, 119, [0:10], $CAN_ADDRESS_HEX
672721
673- unused10_96 = scalar, U08, 96, "", 1, 0, 0, 255, 0
674- unused10_97 = scalar, U08, 97, "", 1, 0, 0, 255, 0
675- unused10_98 = scalar, U08, 98, "", 1, 0, 0, 255, 0
676- unused10_99 = scalar, U08, 99, "", 1, 0, 0, 255, 0
677-
678- speeduino_tsCanId = bits, U08, 100, [0:3], $tsCanId_list
679- true_address = bits, U16, 101, [0:10], $CAN_ADDRESS_HEX
680- realtime_base_address = bits, U16, 103, [0:10], $CAN_ADDRESS_HEX
681- obd_address = bits, U16, 105, [0:10], $CAN_ADDRESS_HEX
682-
683-
684- ;unused10_101 = scalar, U16, 101, "", 1, 0, 0, 255, 0
685- ;unused10_103 = scalar, U16, 103, "", 1, 0, 0, 255, 0
686- ;unused10_105 = scalar, U16, 105, "", 1, 0, 0, 255, 0
687-
688722 ;AFR offset for WUE VeAnalyze
689723 ;wueAFRRates = array, U08, 107, [10], "%", 1.0, 0.0, 0.0, 255, 0
690724 ;wueAFRBins = array, U08, 117, [10], "C", 1.0, -40, -40, 102.0, 0
691725
692- unused10_107 = scalar, U08, 107, "", 1, 0, 0, 255, 0
693- unused10_108 = scalar, U08, 108, "", 1, 0, 0, 255, 0
694- unused10_109 = scalar, U08, 109, "", 1, 0, 0, 255, 0
695- unused10_110 = scalar, U08, 110, "", 1, 0, 0, 255, 0
696- unused10_111 = scalar, U08, 111, "", 1, 0, 0, 255, 0
697- unused10_112 = scalar, U08, 112, "", 1, 0, 0, 255, 0
698- unused10_113 = scalar, U08, 113, "", 1, 0, 0, 255, 0
699- unused10_114 = scalar, U08, 114, "", 1, 0, 0, 255, 0
700- unused10_115 = scalar, U08, 115, "", 1, 0, 0, 255, 0
701- unused10_116 = scalar, U08, 116, "", 1, 0, 0, 255, 0
702- unused10_117 = scalar, U08, 117, "", 1, 0, 0, 255, 0
703- unused10_118 = scalar, U08, 118, "", 1, 0, 0, 255, 0
704- unused10_119 = scalar, U08, 119, "", 1, 0, 0, 255, 0
705- unused10_120 = scalar, U08, 120, "", 1, 0, 0, 255, 0
706- unused10_121 = scalar, U08, 121, "", 1, 0, 0, 255, 0
707- unused10_122 = scalar, U08, 122, "", 1, 0, 0, 255, 0
708- unused10_123 = scalar, U08, 123, "", 1, 0, 0, 255, 0
709- unused10_124 = scalar, U08, 124, "", 1, 0, 0, 255, 0
710- unused10_125 = scalar, U08, 125, "", 1, 0, 0, 255, 0
711- unused10_126 = scalar, U08, 126, "", 1, 0, 0, 255, 0
712- unused10_127 = scalar, U08, 127, "", 1, 0, 0, 255, 0
713-
726+ Auxin0pina = bits, U08, 121, [0:5], $ANALOG_PIN
727+ Auxin1pina = bits, U08, 122, [0:5], $ANALOG_PIN
728+ Auxin2pina = bits, U08, 123, [0:5], $ANALOG_PIN
729+ Auxin3pina = bits, U08, 124, [0:5], $ANALOG_PIN
730+ Auxin4pina = bits, U08, 125, [0:5], $ANALOG_PIN
731+ Auxin5pina = bits, U08, 126, [0:5], $ANALOG_PIN
732+ Auxin6pina = bits, U08, 127, [0:5], $ANALOG_PIN
733+ Auxin7pina = bits, U08, 128, [0:5], $ANALOG_PIN
734+ Auxin8pina = bits, U08, 129, [0:5], $ANALOG_PIN
735+ Auxin9pina = bits, U08, 130, [0:5], $ANALOG_PIN
736+ Auxin10pina = bits, U08, 131, [0:5], $ANALOG_PIN
737+ Auxin11pina = bits, U08, 132, [0:5], $ANALOG_PIN
738+ Auxin12pina = bits, U08, 133, [0:5], $ANALOG_PIN
739+ Auxin13pina = bits, U08, 134, [0:5], $ANALOG_PIN
740+ Auxin14pina = bits, U08, 135, [0:5], $ANALOG_PIN
741+ Auxin15pina = bits, U08, 136, [0:5], $ANALOG_PIN
742+
743+ Auxin0pinb = bits, U08, 137, [0:5], $DIGITAL_PIN
744+ Auxin1pinb = bits, U08, 138, [0:5], $DIGITAL_PIN
745+ Auxin2pinb = bits, U08, 139, [0:5], $DIGITAL_PIN
746+ Auxin3pinb = bits, U08, 140, [0:5], $DIGITAL_PIN
747+ Auxin4pinb = bits, U08, 141, [0:5], $DIGITAL_PIN
748+ Auxin5pinb = bits, U08, 142, [0:5], $DIGITAL_PIN
749+ Auxin6pinb = bits, U08, 143, [0:5], $DIGITAL_PIN
750+ Auxin7pinb = bits, U08, 144, [0:5], $DIGITAL_PIN
751+ Auxin8pinb = bits, U08, 145, [0:5], $DIGITAL_PIN
752+ Auxin9pinb = bits, U08, 146, [0:5], $DIGITAL_PIN
753+ Auxin10pinb = bits, U08, 147, [0:5], $DIGITAL_PIN
754+ Auxin11pinb = bits, U08, 148, [0:5], $DIGITAL_PIN
755+ Auxin12pinb = bits, U08, 149, [0:5], $DIGITAL_PIN
756+ Auxin13pinb = bits, U08, 150, [0:5], $DIGITAL_PIN
757+ Auxin14pinb = bits, U08, 151, [0:5], $DIGITAL_PIN
758+ Auxin15pinb = bits, U08, 152, [0:5], $DIGITAL_PIN
759+
760+ ;unused10_137 = scalar, U08, 137, "", 1, 0, 0, 255, 0
761+ ;unused10_138 = scalar, U08, 138, "", 1, 0, 0, 255, 0
762+ ;unused10_139 = scalar, U08, 139, "", 1, 0, 0, 255, 0
763+ ;unused10_140 = scalar, U08, 140, "", 1, 0, 0, 255, 0
764+ ;unused10_141 = scalar, U08, 141, "", 1, 0, 0, 255, 0
765+ ;unused10_142 = scalar, U08, 142, "", 1, 0, 0, 255, 0
766+ ;unused10_143 = scalar, U08, 143, "", 1, 0, 0, 255, 0
767+ ;unused10_144 = scalar, U08, 144, "", 1, 0, 0, 255, 0
768+ ;unused10_145 = scalar, U08, 145, "", 1, 0, 0, 255, 0
769+ ;unused10_146 = scalar, U08, 146, "", 1, 0, 0, 255, 0
770+ ;unused10_147 = scalar, U08, 147, "", 1, 0, 0, 255, 0
771+ ;unused10_148 = scalar, U08, 148, "", 1, 0, 0, 255, 0
772+ ;unused10_149 = scalar, U08, 149, "", 1, 0, 0, 255, 0
773+ ;unused10_150 = scalar, U08, 150, "", 1, 0, 0, 255, 0
774+ ;unused10_151 = scalar, U08, 151, "", 1, 0, 0, 255, 0
775+ ;unused10_152 = scalar, U08, 152, "", 1, 0, 0, 255, 0
776+ unused10_153 = scalar, U08, 153, "", 1, 0, 0, 255, 0
777+ unused10_154 = scalar, U08, 154, "", 1, 0, 0, 255, 0
778+ unused10_155 = scalar, U08, 155, "", 1, 0, 0, 255, 0
779+ unused10_156 = scalar, U08, 156, "", 1, 0, 0, 255, 0
780+ unused10_157 = scalar, U08, 157, "", 1, 0, 0, 255, 0
781+ unused10_158 = scalar, U08, 158, "", 1, 0, 0, 255, 0
782+ unused10_159 = scalar, U08, 159, "", 1, 0, 0, 255, 0
783+ unused10_160 = scalar, U08, 160, "", 1, 0, 0, 255, 0
784+ unused10_161 = scalar, U08, 161, "", 1, 0, 0, 255, 0
785+ unused10_162 = scalar, U08, 162, "", 1, 0, 0, 255, 0
786+ unused10_163 = scalar, U08, 163, "", 1, 0, 0, 255, 0
787+ unused10_164 = scalar, U08, 164, "", 1, 0, 0, 255, 0
788+ unused10_165 = scalar, U08, 165, "", 1, 0, 0, 255, 0
789+ unused10_166 = scalar, U08, 166, "", 1, 0, 0, 255, 0
790+ unused10_167 = scalar, U08, 167, "", 1, 0, 0, 255, 0
791+ unused10_168 = scalar, U08, 168, "", 1, 0, 0, 255, 0
792+ unused10_169 = scalar, U08, 169, "", 1, 0, 0, 255, 0
793+ unused10_170 = scalar, U08, 170, "", 1, 0, 0, 255, 0
794+ unused10_171 = scalar, U08, 171, "", 1, 0, 0, 255, 0
795+ unused10_172 = scalar, U08, 172, "", 1, 0, 0, 255, 0
796+ unused10_173 = scalar, U08, 173, "", 1, 0, 0, 255, 0
797+ unused10_174 = scalar, U08, 174, "", 1, 0, 0, 255, 0
798+ unused10_175 = scalar, U08, 175, "", 1, 0, 0, 255, 0
799+ unused10_176 = scalar, U08, 176, "", 1, 0, 0, 255, 0
800+ unused10_177 = scalar, U08, 177, "", 1, 0, 0, 255, 0
801+ unused10_178 = scalar, U08, 178, "", 1, 0, 0, 255, 0
802+ unused10_179 = scalar, U08, 179, "", 1, 0, 0, 255, 0
803+ unused10_180 = scalar, U08, 180, "", 1, 0, 0, 255, 0
804+ unused10_181 = scalar, U08, 181, "", 1, 0, 0, 255, 0
805+ unused10_182 = scalar, U08, 182, "", 1, 0, 0, 255, 0
806+ unused10_183 = scalar, U08, 183, "", 1, 0, 0, 255, 0
807+ unused10_184 = scalar, U08, 184, "", 1, 0, 0, 255, 0
808+ unused10_185 = scalar, U08, 185, "", 1, 0, 0, 255, 0
809+ unused10_186 = scalar, U08, 186, "", 1, 0, 0, 255, 0
810+ unused10_187 = scalar, U08, 187, "", 1, 0, 0, 255, 0
811+ unused10_188 = scalar, U08, 188, "", 1, 0, 0, 255, 0
812+ unused10_189 = scalar, U08, 189, "", 1, 0, 0, 255, 0
813+ unused10_190 = scalar, U08, 190, "", 1, 0, 0, 255, 0
814+ blankfield = bits, U08, 191, [0:0], "",""
815+ ;unused10_191 = scalar, U08, 191, "", 1, 0, 0, 255, 0
816+
714817 page = 10
715818 #if CELSIUS
716819 crankingEnrichBins = array, U08, 0, [4], "C", 1.0, -40, -40, 215, 0
@@ -742,7 +845,7 @@
742845 flexFuelBins = array, U08, 51, [6], "%", 1.0, 0.0, 0.0, 250.0, 0
743846 flexFuelAdj = array, U08, 57, [6], "%", 1.0, 0.0, 0.0, 250.0, 0
744847 flexAdvBins = array, U08, 63, [6], "%", 1.0, 0.0, 0.0, 250.0, 0
745- flexAdvAdj = array, U08, 69, [6], "Deg", 1.0, 0.0, 0.0, 250.0, 0
848+ flexAdvAdj = array, S08, 69, [6], "Deg", 1.0, 0.0, -125, 125.0, 0
746849
747850 n2o_enable = bits , U08, 75, [0:1], "Off","1 Stage","2 stage", "INVALID"
748851 n2o_arming_pin = bits , U08, 75, [2:7], $IO_Pins_no_def
@@ -753,12 +856,11 @@
753856 #endif
754857 n2o_maxMAP = scalar, U08, 77, "kPa", 2.0, 0.0, 0.0, 511.0, 0
755858 n2o_minTPS = scalar, U08, 78, "%TPS", 1.0, 0.0, 0.0, 100, 0
756- n2o_maxAFR = scalar, U08, 79, "kPa", 0.1, 0.0, 0.0, 25.5, 1
859+ n2o_maxAFR = scalar, U08, 79, "AFR", 0.1, 0.0, 0.0, 25.5, 1
757860
758-
759861 n2o_stage1_pin = bits , U08, 80, [0:5], $IO_Pins_no_def
760862 n2o_pin_polarity = bits , U08, 80, [6:6], "HIGH", "LOW"
761- n2o_unused = bits , U08, 80, [7:7], "INVALID", "INVALID"
863+ n2o_unused = bits , U08, 80, [7:7], "No", "Yes"
762864 n2o_stage1_minRPM = scalar, U08, 81, "RPM", 100, 0.0, 1000, 10000, 0
763865 n2o_stage1_maxRPM = scalar, U08, 82, "RPM", 100, 0.0, 1000, 10000, 0
764866 n2o_stage1_adderMin = scalar, U08, 83, "ms", 0.1, 0, 0, 25.5, 1
@@ -766,7 +868,7 @@
766868 n2o_stage1_retard = scalar, U08, 85, "Deg", 1.0, 0.0, 0.0, 250.0, 0
767869
768870 n2o_stage2_pin = bits , U08, 86, [0:5], $IO_Pins_no_def
769- n2o_stage2_unused = bits , U08, 86, [6:7], "INVALID", "INVALID", "INVALID", "INVALID"
871+ n2o_stage2_unused = bits , U08, 86, [6:7], "No", "Yes", "INVALID", "INVALID"
770872 n2o_stage2_minRPM = scalar, U08, 87, "RPM", 100, 0.0, 1000, 10000, 0
771873 n2o_stage2_maxRPM = scalar, U08, 88, "RPM", 100, 0.0, 1000, 10000, 0
772874 n2o_stage2_adderMin = scalar, U08, 89, "ms", 0.1, 0, 0, 32, 1
@@ -773,9 +875,36 @@
773875 n2o_stage2_adderMax = scalar, U08, 90, "ms", 0.1, 0, 0, 32, 1
774876 n2o_stage2_retard = scalar, U08, 91, "Deg", 1.0, 0.0, 0.0, 250.0, 0
775877
878+ ; Knock settings
879+ knock_mode = bits , U08, 92, [0:1], "Off","Digital","Analog", "INVALID"
880+ knock_pin = bits , U08, 92, [2:7], "INVALID", "INVALID", "2", "3", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "18", "19", "20", "21", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "INVALID"
776881
777- unused11_75_191 = array, U08, 92,[99],"RPM", 100.0, 0.0, 100, 25500, 0
882+ knock_trigger = bits , U08, 93, [0:0], "HIGH", "LOW"
883+ knock_pullup = bits , U08, 93, [1:1], "Off", "Internal pullup"
884+ knock_limiterDisable= bits , U08, 93, [2:2], "No", "Yes"
885+ knock_unused = bits , U08, 93, [3:4], "INVALID", "1", "2", "3"
778886
887+ ;Knock detection / filters
888+ knock_count = bits , U08, 93, [5:7], "INVALID", "1", "2", "3", "4", "5", "6", "7"
889+ knock_threshold = scalar, U08, 94, "Volts", 0.1, 0.0, 0.0, 5.0, 1
890+ knock_maxMAP = scalar, U08, 95, "kPa", 2.0, 0.0, 0.0, 511.0, 0
891+ knock_maxRPM = scalar, U08, 96, "RPM", 100.0, 0.0, 0, 10000, 0
892+ knock_window_rpms = array, U08, 97, [6], "RPM", 100.0, 0.0, 0, 10000, 0
893+ knock_window_angle = array, U08, 103, [6], "deg", 1.0, -50, -50, 100, 0
894+ knock_window_dur = array, U08, 109, [6], "deg", 1.0, 0.0, 0, 100, 0 ;Knock window duration
895+
896+ ;Retard and recovery
897+ knock_maxRetard = scalar, U08, 115, "Deg", 1.0, 0.0, 0.0, 50, 0
898+ knock_firstStep = scalar, U08, 116, "Deg", 1.0, 0.0, 0.0, 50, 0
899+ knock_stepSize = scalar, U08, 117, "Deg", 1.0, 0.0, 0.0, 50, 0
900+ knock_stepTime = scalar, U08, 118, "Sec", 0.1, 0.0, 0.0, 2.5, 1
901+
902+ knock_duration = scalar, U08, 119, "Sec", 0.1, 0.0, 0.0, 2.5, 1 ;//Time after knock retard starts that it should start recovering
903+ knock_recoveryStepTime = scalar, U08, 120, "Sec", 0.1, 0.0, 0.0, 2.5, 1
904+ knock_recoveryStep = scalar, U08, 121, "Deg", 1.0, 0.0, 0.0, 50, 0
905+
906+ unused11_122_191 = array, U08, 122,[69],"RPM", 100.0, 0.0, 100, 25500, 0
907+
779908 ;-------------------------------------------------------------------------------
780909
781910 [ConstantsExtensions]
@@ -817,6 +946,10 @@
817946 requiresPowerCycle = n2o_enable
818947 requiresPowerCycle = n2o_arming_pin
819948 requiresPowerCycle = n2o_pin_polarity
949+ requiresPowerCycle = knock_mode
950+ requiresPowerCycle = knock_pin
951+ requiresPowerCycle = knock_trigger
952+ requiresPowerCycle = knock_pullup
820953
821954 defaultValue = pinLayout, 1
822955 defaultValue = TrigPattern, 0
@@ -829,7 +962,7 @@
829962 defaultValue = inj3Ang, 355
830963 defaultValue = inj4Ang, 355
831964 defaultValue = nInjectors, 4
832- defaultValue = dutyLim, 100
965+ defaultValue = dutyLim, 80
833966 defaultValue = mapMin, 10
834967 defaultValue = mapMax, 260
835968 defaultValue = baroMin 10
@@ -895,6 +1028,22 @@
8951028
8961029 controllerPriority = bootloaderCaps
8971030
1031+ defaultValue = AUXin00Alias Aux0
1032+ defaultValue = AUXin01Alias Aux1
1033+ defaultValue = AUXin02Alias Aux2
1034+ defaultValue = AUXin03Alias Aux3
1035+ defaultValue = AUXin04Alias Aux4
1036+ defaultValue = AUXin05Alias Aux5
1037+ defaultValue = AUXin06Alias Aux6
1038+ defaultValue = AUXin07Alias Aux7
1039+ defaultValue = AUXin08Alias Aux8
1040+ defaultValue = AUXin09Alias Aux9
1041+ defaultValue = AUXin10Alias Aux10
1042+ defaultValue = AUXin11Alias Aux11
1043+ defaultValue = AUXin12Alias Aux12
1044+ defaultValue = AUXin13Alias Aux13
1045+ defaultValue = AUXin14Alias Aux14
1046+ defaultValue = AUXin15Alias Aux15
8981047
8991048 [Menu]
9001049
@@ -947,11 +1096,12 @@
9471096 subMenu = stagingTableDialog, "Staged Injection", 10, { nCylinders <= 4 } ; Can't do staging on more than 4 cylinder engines
9481097
9491098 menu = "&Spark"
950- subMenu = sparkSettings, "Spark Settings"
951- subMenu = sparkTbl, "Spark Table", 2
952- subMenu = dwellSettings, "Dwell settings"
1099+ subMenu = sparkSettings, "Spark Settings"
1100+ subMenu = sparkTbl, "Spark Table", 2
1101+ subMenu = dwellSettings, "Dwell settings"
9531102 subMenu = dwell_correction_curve, "Dwell Compensation"
954- subMenu = iat_retard_curve, "&IAT Retard"
1103+ subMenu = iat_retard_curve, "IAT Retard"
1104+ ;subMenu = knockSettings, "Knock Settings"
9551105 subMenu = rotary_ignition, "Rotary Ignition", { sparkMode == 4 }
9561106
9571107 menu = "&Starting/Idle"
@@ -986,11 +1136,13 @@
9861136 #if CAN_COMMANDS
9871137 subMenu = can_serial3IO, "Canbus/Secondary Serial IO Interface"
9881138 subMenu = std_separator
989- subMenu = Canin_config, "External Data Input Configuration", {enable_canbus}
1139+ subMenu = Canin_config, "External Auxillary Input Channel Configuration", {enable_canbus}
1140+ subMenu = Auxin_config, "Local Auxillary Input Channel Configuration"
9901141 ;subMenu = std_separator
9911142 ;subMenu = Canout_config, "Canbus Output Configuration"
9921143 #else
9931144 subMenu = serial3IO, "Secondary Serial IO Interface"
1145+ subMenu = Auxin_config, "Local Auxillary Input Channel Configuration"
9941146 #endif
9951147
9961148 menuDialog = main
@@ -1043,7 +1195,7 @@
10431195 sparkMode = "Wasted Spark: Ignition outputs are on the channels <= half the number of cylinders. Eg 4 cylinder outputs on IGN1 and IGN2.\nSingle Channel: All ignition pulses are output on IGN1.\nWasted COP: Ignition pulses are output on all ignition channels up to the number of cylinders. Eg 4 cylinder outputs on all ignition channels. No valid for >4 cylinders"
10441196 IgInv = "Whether the spark fires when the ignition signal goes high or goes low. Nearly all ignition systems use 'Going Low' but please verify this as damage to coils can result from the incorrect selection. (NOTE: THIS IS NOT MEGASQUIRT. THIS SETTING IS USUALLY THE OPPOSITE OF WHAT THEY USE!)"
10451197 sparkDur = "The duration of the spark at full dwell. Typically around 1ms"
1046- fixAngEnable= "If enabled, timing will be locked/fixed and the ignition map will be ignored"
1198+ fixAngEnable= "If enabled, timing will be locked/fixed and the ignition map will be ignored. Note that this value will be overriden by the fixed cranking value when cranking"
10471199 FixAng = "Timing will be locked at this value if the above is enabled"
10481200
10491201 crankRPM = "The cranking RPM threshold. When RPM is lower than this value (and above 0) the system will be considered to be cranking"
@@ -1107,22 +1259,38 @@
11071259 true_address = "This is the 11bit Can address of the Speeduino ECU "
11081260 realtime_base_address = "This is the 11bit CAN address of the realtime data broadcast from the Speeduino ECU. This MUST be at least 0x16 greater than the true address"
11091261 ;obd_address = "The 11bit Can address that the Speeduino ECU responds to for OBD2 diagnostic requests"
1110- caninput_sel0 = "This Enables CAN data input channel 0 "
1111- caninput_sel1 = "This Enables CAN data input channel 1 "
1112- caninput_sel2 = "This Enables CAN data input channel 2 "
1113- caninput_sel3 = "This Enables CAN data input channel 3 "
1114- caninput_sel4 = "This Enables CAN data input channel 4 "
1115- caninput_sel5 = "This Enables CAN data input channel 5 "
1116- caninput_sel6 = "This Enables CAN data input channel 6 "
1117- caninput_sel7 = "This Enables CAN data input channel 7 "
1118- caninput_sel8 = "This Enables CAN data input channel 8 "
1119- caninput_sel9 = "This Enables CAN data input channel 9 "
1120- caninput_sel10 = "This Enables CAN data input channel 10 "
1121- caninput_sel11 = "This Enables CAN data input channel 11 "
1122- caninput_sel12 = "This Enables CAN data input channel 12 "
1123- caninput_sel13 = "This Enables CAN data input channel 13 "
1124- caninput_sel14 = "This Enables CAN data input channel 14 "
1125- caninput_sel15 = "This Enables CAN data input channel 15 "
1262+ AUXin00Alias = "The Ascii alias asigned to Aux input channel 0"
1263+ AUXin01Alias = "The Ascii alias asigned to Aux input channel 1"
1264+ AUXin02Alias = "The Ascii alias asigned to Aux input channel 2"
1265+ AUXin03Alias = "The Ascii alias asigned to Aux input channel 3"
1266+ AUXin04Alias = "The Ascii alias asigned to Aux input channel 4"
1267+ AUXin05Alias = "The Ascii alias asigned to Aux input channel 5"
1268+ AUXin06Alias = "The Ascii alias asigned to Aux input channel 6"
1269+ AUXin07Alias = "The Ascii alias asigned to Aux input channel 7"
1270+ AUXin08Alias = "The Ascii alias asigned to Aux input channel 8"
1271+ AUXin09Alias = "The Ascii alias asigned to Aux input channel 9"
1272+ AUXin10Alias = "The Ascii alias asigned to Aux input channel 10"
1273+ AUXin11Alias = "The Ascii alias asigned to Aux input channel 11"
1274+ AUXin12Alias = "The Ascii alias asigned to Aux input channel 12"
1275+ AUXin13Alias = "The Ascii alias asigned to Aux input channel 13"
1276+ AUXin14Alias = "The Ascii alias asigned to Aux input channel 14"
1277+ AUXin15Alias = "The Ascii alias asigned to Aux input channel 15"
1278+ caninput_sel0 = "This Enables External/CAN data or local analog/digital on input channel 0 "
1279+ caninput_sel1 = "This Enables External/CAN data or local analog/digital on input channel 1 "
1280+ caninput_sel2 = "This Enables External/CAN data or local analog/digital on input channel 2 "
1281+ caninput_sel3 = "This Enables External/CAN data or local analog/digital on input channel 3 "
1282+ caninput_sel4 = "This Enables External/CAN data or local analog/digital on input channel 4 "
1283+ caninput_sel5 = "This Enables External/CAN data or local analog/digital on input channel 5 "
1284+ caninput_sel6 = "This Enables External/CAN data or local analog/digital on input channel 6 "
1285+ caninput_sel7 = "This Enables External/CAN data or local analog/digital on input channel 7 "
1286+ caninput_sel8 = "This Enables External/CAN data or local analog/digital on input channel 8 "
1287+ caninput_sel9 = "This Enables External/CAN data or local analog/digital on input channel 9 "
1288+ caninput_sel10 = "This Enables External/CAN data or local analog/digital on input channel 10 "
1289+ caninput_sel11 = "This Enables External/CAN data or local analog/digital on input channel 11 "
1290+ caninput_sel12 = "This Enables External/CAN data or local analog/digital on input channel 12 "
1291+ caninput_sel13 = "This Enables External/CAN data or local analog/digital on input channel 13 "
1292+ caninput_sel14 = "This Enables External/CAN data or local analog/digital on input channel 14 "
1293+ caninput_sel15 = "This Enables External/CAN data or local analog/digital on input channel 15 "
11261294 caninput_source_can_address0 = "The source 11bit CAN address of the data for channel 0"
11271295 caninput_source_can_address1 = "The source 11bit CAN address of the data for channel 1"
11281296 caninput_source_can_address2 = "The source 11bit CAN address of the data for channel 2"
@@ -1239,7 +1407,7 @@
12391407 panel = engine_constants_west, West
12401408 panel = engine_constants_east, East
12411409
1242-# Flex fuel stuff
1410+; Flex fuel stuff
12431411 dialog = flexFuelSettings, "", yAxis
12441412 field = "Flex Fuel Sensor ", flexEnabled
12451413 field = "Low (E0) ", flexFreqLow, { flexEnabled }
@@ -1263,6 +1431,47 @@
12631431 panel = flexFuelSettings, North
12641432 panel = flexCurves, South
12651433
1434+; Knock control settings
1435+ dialog = knock_windows, "Knock Windows", xAxis
1436+ panel = knock_window_angle_curve, West, { knock_mode }
1437+ panel = knock_window_duration_curve, East, { knock_mode }
1438+
1439+ dialog = knock_settings_west, "Settings", yAxis
1440+ field = "Knock Mode", knock_mode
1441+ field = "Knock Pin", knock_pin, { knock_mode }
1442+ field = "Knock active when pin is", knock_trigger, { knock_mode == 1 }
1443+ field = "Use pullup", knock_pullup, { knock_mode == 1 }
1444+
1445+ dialog = knock_settings_east, "Detection and Response"
1446+ field = "#Detection"
1447+ field = "Knock count required", knock_count, { knock_mode == 1}
1448+ field = "Knock threshold required", knock_threshold, { knock_mode == 2}
1449+ field = "Maximum MAP", knock_maxMAP, { knock_mode }
1450+ field = "Maximum RPM", knock_maxRPM, { knock_mode }
1451+
1452+ ;Retard and recovery
1453+ field = "#Retard"
1454+ field = "Total retard", knock_maxRetard, { knock_mode }
1455+ field = "First step size", knock_firstStep, { knock_mode }
1456+ field = "Other step size", knock_stepSize, { knock_mode }
1457+ field = "Step time", knock_stepTime, { knock_mode }
1458+
1459+ field = "#Recovery"
1460+ field = "Retard duration", knock_duration, { knock_mode } ;Time before retard starts ending
1461+ field = "Recovery step time", knock_recoveryStepTime, { knock_mode } ;Time between each recovery step
1462+ field = "Recovery step size", knock_recoveryStep, { knock_mode }
1463+
1464+ dialog = knock_settings_top, "", xAxis
1465+ panel = knock_settings_west, West
1466+ panel = knock_settings_east, East
1467+
1468+ dialog = knockSettings, "", border
1469+ topicHelp = "http://speeduino.com/wiki/index.php/Knock"
1470+ panel = knock_settings_top, North
1471+ panel = knock_windows, South
1472+
1473+
1474+
12661475 dialog = tacho, "Tacho"
12671476 field = "Output pin", tachoPin
12681477 field = "Output speed", tachoDiv
@@ -1425,9 +1634,6 @@
14251634 field = "Missing Tooth Secondary type" trigPatternSec, { (TrigPattern == 0&& TrigSpeed == 0) }
14261635 field = "Trigger Filter", TrigFilter
14271636 field = "Re-sync every cycle", useResync, { TrigPattern == 2 || TrigPattern == 4 || TrigPattern == 7 || TrigPattern == 12 || TrigPattern == 9 } ;Dual wheel, 4G63, Audi 135, Nissan 360, Miata 99-05
1428- field = ""
1429- field = "#The below option is EXPERIMENTAL! If unsure what this is, please set to No"
1430- field = "User per tooth ignition calculation", perToothIgn, {TrigPattern == 0 || TrigPattern == 1 || TrigPattern == 2 || TrigPattern == 4 || TrigPattern == 12 || TrigPattern == 16 } ;Only works for missing tooth, distributor, dual wheel, nissan 360, 36-2-2-2
14311637
14321638 dialog = sparkSettings,"Spark Settings",4
14331639 field = "Ignition load source", ignAlgorithm
@@ -1437,6 +1643,10 @@
14371643 field = ""
14381644 field = "Enabled Fixed/Locked timing", fixAngEnable
14391645 field = "Fixed Angle", FixAng, { fixAngEnable }
1646+ field = "#Note: During cranking the fixed/locked timing angle is overriden by the Cranking advance angle value above"
1647+ field = ""
1648+ field = "#The below option is currently in testing! If unsure what this is, please set to No"
1649+ field = "User new ignition mode", perToothIgn, {TrigPattern == 0 || TrigPattern == 1 || TrigPattern == 2 || TrigPattern == 4 || TrigPattern == 12 } ;Only works for missing tooth, distributor, dual wheel, 4g63, nissan 360
14401650
14411651 dialog = dwellSettings, "Dwell Settings", 4
14421652 topicHelp = "http://speeduino.com/wiki/index.php/Dwell"
@@ -1694,58 +1904,77 @@
16941904 commandButton = "Stop Test Mode", cmdStopTestMode,{testactive}, clickOnCloseIfEnabled
16951905
16961906 dialog = outputtestinj1, "Injector CH1", yAxis
1697- commandButton = "Off", cmdtestinj1off,{testactive}
1698- commandButton = "50% DC", cmdtestinj150dc,{!testenabled & testactive}
1699- commandButton = "On", cmdtestinj1on,{!testenabled & testactive}
1907+ commandButton = "Off", cmdtestinj1off,{testactive}
1908+ commandButton = "50% DC", cmdtestinj150dc,{!testenabled & testactive}
1909+ commandButton = "On", cmdtestinj1on,{!testenabled & testactive}
17001910 dialog = outputtestinj2, "Injector CH2", yAxis
1701- commandButton = "Off", cmdtestinj2off,{testactive}
1702- commandButton = "50% DC", cmdtestinj250dc,{!testenabled &testactive}
1703- commandButton = "On", cmdtestinj2on,{!testenabled & testactive}
1911+ commandButton = "Off", cmdtestinj2off,{testactive}
1912+ commandButton = "50% DC", cmdtestinj250dc,{!testenabled &testactive}
1913+ commandButton = "On", cmdtestinj2on,{!testenabled & testactive}
17041914 dialog = outputtestinj3, "Injector CH3", yAxis
1705- commandButton = "Off", cmdtestinj3off,{testactive}
1706- commandButton = "50% DC", cmdtestinj350dc,{!testenabled & testactive}
1707- commandButton = "On", cmdtestinj3on,{!testenabled & testactive}
1915+ commandButton = "Off", cmdtestinj3off,{testactive}
1916+ commandButton = "50% DC", cmdtestinj350dc,{!testenabled & testactive}
1917+ commandButton = "On", cmdtestinj3on,{!testenabled & testactive}
17081918 dialog = outputtestinj4, "Injector CH4", yAxis
1709- commandButton = "Off", cmdtestinj4off,{testactive}
1710- commandButton = "50% DC", cmdtestinj450dc,{!testenabled & testactive}
1711- commandButton = "On", cmdtestinj4on ,{!testenabled & testactive}
1919+ commandButton = "Off", cmdtestinj4off,{testactive}
1920+ commandButton = "50% DC", cmdtestinj450dc,{!testenabled & testactive}
1921+ commandButton = "On", cmdtestinj4on ,{!testenabled & testactive}
17121922
17131923 dialog = outputtest_injectors, "Injector Driver Output Test", xAxis
1714- panel = outputtestinj1
1715- panel = outputtestinj2
1716- panel = outputtestinj3
1717- panel = outputtestinj4
1924+ panel = outputtestinj1
1925+ panel = outputtestinj2
1926+ panel = outputtestinj3
1927+ panel = outputtestinj4
17181928
17191929 dialog = outputtestspk1, "Spark CH1 ", yAxis
1720- commandButton = "Off", cmdtestspk1off,{testactive}
1721- commandButton = "50% DC", cmdtestspk150dc,{!testenabled & testactive}
1722- commandButton = "On", cmdtestspk1on,{!testenabled & testactive}
1930+ commandButton = "Off", cmdtestspk1off,{testactive}
1931+ commandButton = "50% DC", cmdtestspk150dc,{!testenabled & testactive}
1932+ commandButton = "On", cmdtestspk1on,{!testenabled & testactive}
17231933 dialog = outputtestspk2, "Spark CH2", yAxis
1724- commandButton = "Off", cmdtestspk2off,{testactive}
1725- commandButton = "50% DC", cmdtestspk250dc,{!testenabled & testactive}
1726- commandButton = "On", cmdtestspk2on,{!testenabled & testactive}
1934+ commandButton = "Off", cmdtestspk2off,{testactive}
1935+ commandButton = "50% DC", cmdtestspk250dc,{!testenabled & testactive}
1936+ commandButton = "On", cmdtestspk2on,{!testenabled & testactive}
17271937 dialog = outputtestspk3, "Spark CH3", yAxis
1728- commandButton = "Off", cmdtestspk3off,{testactive}
1729- commandButton = "50% DC", cmdtestspk350dc,{!testenabled & testactive}
1730- commandButton = "On", cmdtestspk3on,{!testenabled & testactive}
1938+ commandButton = "Off", cmdtestspk3off,{testactive}
1939+ commandButton = "50% DC", cmdtestspk350dc,{!testenabled & testactive}
1940+ commandButton = "On", cmdtestspk3on,{!testenabled & testactive}
17311941 dialog = outputtestspk4, "Spark CH4", yAxis
1732- commandButton = "Off", cmdtestspk4off,{testactive}
1733- commandButton = "50% DC", cmdtestspk450dc,{!testenabled & testactive}
1734- commandButton = "On", cmdtestspk4on,{!testenabled & testactive}
1942+ commandButton = "Off", cmdtestspk4off,{testactive}
1943+ commandButton = "50% DC", cmdtestspk450dc,{!testenabled & testactive}
1944+ commandButton = "On", cmdtestspk4on,{!testenabled & testactive}
17351945
17361946 dialog = outputtest_spark, "Spark Driver Output Test", xAxis
1737- panel = outputtestspk1
1738- panel = outputtestspk2
1739- panel = outputtestspk3
1740- panel = outputtestspk4
1947+ panel = outputtestspk1
1948+ panel = outputtestspk2
1949+ panel = outputtestspk3
1950+ panel = outputtestspk4
17411951
17421952 dialog = outputtest1,"Test Output Hardware"
1743- topicHelp = "http://speeduino.com/wiki/index.php/Hardware_testing_page"
1744- panel = enableoutputtestbuttons
1745- panel = outputtest_injectors
1746- panel = outputtest_spark
1747- ;panel = outputtest_io2
1748- panel = outputtest_warningmessage
1953+ topicHelp = "http://speeduino.com/wiki/index.php/Hardware_testing_page"
1954+ panel = enableoutputtestbuttons
1955+ panel = outputtest_injectors
1956+ panel = outputtest_spark
1957+ ;panel = outputtest_io2
1958+ panel = outputtest_warningmessage
1959+
1960+ dialog = canAuxinput_alias, "", yAxis
1961+ field = "Input Alias"
1962+ field = "", AUXin00Alias , {caninput_sel0}
1963+ field = "", AUXin01Alias , {caninput_sel1}
1964+ field = "", AUXin02Alias , {caninput_sel2}
1965+ field = "", AUXin03Alias , {caninput_sel3}
1966+ field = "", AUXin04Alias , {caninput_sel4}
1967+ field = "", AUXin05Alias , {caninput_sel5}
1968+ field = "", AUXin06Alias , {caninput_sel6}
1969+ field = "", AUXin07Alias , {caninput_sel7}
1970+ field = "", AUXin08Alias , {caninput_sel8}
1971+ field = "", AUXin09Alias , {caninput_sel9}
1972+ field = "", AUXin10Alias , {caninput_sel10}
1973+ field = "", AUXin11Alias , {caninput_sel11}
1974+ field = "", AUXin12Alias , {caninput_sel12}
1975+ field = "", AUXin13Alias , {caninput_sel13}
1976+ field = "", AUXin14Alias , {caninput_sel14}
1977+ field = "", AUXin15Alias , {caninput_sel15}
17491978
17501979 dialog = caninput_sel, ""
17511980 ;CAN inputs
@@ -1769,82 +1998,103 @@
17691998
17701999 dialog = caninput_parameter_group, "", yAxis
17712000 field = " Source CAN Address"
1772- field = "", caninput_source_can_address0, { caninput_sel0 && enable_candata_in }
1773- field = "", caninput_source_can_address1, { caninput_sel1 && enable_candata_in }
1774- field = "", caninput_source_can_address2, { caninput_sel2 && enable_candata_in }
1775- field = "", caninput_source_can_address3, { caninput_sel3 && enable_candata_in }
1776- field = "", caninput_source_can_address4, { caninput_sel4 && enable_candata_in }
1777- field = "", caninput_source_can_address5, { caninput_sel5 && enable_candata_in }
1778- field = "", caninput_source_can_address6, { caninput_sel6 && enable_candata_in }
1779- field = "", caninput_source_can_address7, { caninput_sel7 && enable_candata_in }
1780- field = "", caninput_source_can_address8, { caninput_sel8 && enable_candata_in }
1781- field = "", caninput_source_can_address9, { caninput_sel9 && enable_candata_in }
1782- field = "", caninput_source_can_address10, { caninput_sel10 && enable_candata_in }
1783- field = "", caninput_source_can_address11, { caninput_sel11 && enable_candata_in }
1784- field = "", caninput_source_can_address12, { caninput_sel12 && enable_candata_in }
1785- field = "", caninput_source_can_address13, { caninput_sel13 && enable_candata_in }
1786- field = "", caninput_source_can_address14, { caninput_sel14 && enable_candata_in }
1787- field = "", caninput_source_can_address15, { caninput_sel15 && enable_candata_in }
2001+ field = "", caninput_source_can_address0, { caninput_sel0 == 1 && enable_candata_in }
2002+ field = "", caninput_source_can_address1, { caninput_sel1 == 1 && enable_candata_in }
2003+ field = "", caninput_source_can_address2, { caninput_sel2 == 1 && enable_candata_in }
2004+ field = "", caninput_source_can_address3, { caninput_sel3 == 1 && enable_candata_in }
2005+ field = "", caninput_source_can_address4, { caninput_sel4 == 1 && enable_candata_in }
2006+ field = "", caninput_source_can_address5, { caninput_sel5 == 1 && enable_candata_in }
2007+ field = "", caninput_source_can_address6, { caninput_sel6 == 1 && enable_candata_in }
2008+ field = "", caninput_source_can_address7, { caninput_sel7 == 1 && enable_candata_in }
2009+ field = "", caninput_source_can_address8, { caninput_sel8 == 1 && enable_candata_in }
2010+ field = "", caninput_source_can_address9, { caninput_sel9 == 1 && enable_candata_in }
2011+ field = "", caninput_source_can_address10, { caninput_sel10 == 1 && enable_candata_in }
2012+ field = "", caninput_source_can_address11, { caninput_sel11 == 1 && enable_candata_in }
2013+ field = "", caninput_source_can_address12, { caninput_sel12 == 1 && enable_candata_in }
2014+ field = "", caninput_source_can_address13, { caninput_sel13 == 1 && enable_candata_in }
2015+ field = "", caninput_source_can_address14, { caninput_sel14 == 1 && enable_candata_in }
2016+ field = "", caninput_source_can_address15, { caninput_sel15 == 1 && enable_candata_in }
17882017
17892018 dialog = caninput_parameter_start_byte, "", yAxis
17902019 field = " source data start byte"
1791- field = "", caninput_source_start_byte0, { caninput_sel0 && enable_candata_in }
1792- field = "", caninput_source_start_byte1, { caninput_sel1 && enable_candata_in }
1793- field = "", caninput_source_start_byte2, { caninput_sel2 && enable_candata_in }
1794- field = "", caninput_source_start_byte3, { caninput_sel3 && enable_candata_in }
1795- field = "", caninput_source_start_byte4, { caninput_sel4 && enable_candata_in }
1796- field = "", caninput_source_start_byte5, { caninput_sel5 && enable_candata_in }
1797- field = "", caninput_source_start_byte6, { caninput_sel6 && enable_candata_in }
1798- field = "", caninput_source_start_byte7, { caninput_sel7 && enable_candata_in }
1799- field = "", caninput_source_start_byte8, { caninput_sel8 && enable_candata_in }
1800- field = "", caninput_source_start_byte9, { caninput_sel9 && enable_candata_in }
1801- field = "", caninput_source_start_byte10, { caninput_sel10 && enable_candata_in }
1802- field = "", caninput_source_start_byte11, { caninput_sel11 && enable_candata_in }
1803- field = "", caninput_source_start_byte12, { caninput_sel12 && enable_candata_in }
1804- field = "", caninput_source_start_byte13, { caninput_sel13 && enable_candata_in }
1805- field = "", caninput_source_start_byte14, { caninput_sel14 && enable_candata_in }
1806- field = "", caninput_source_start_byte15, { caninput_sel15 && enable_candata_in }
2020+ field = "", caninput_source_start_byte0, { caninput_sel0 == 1 && enable_candata_in }
2021+ field = "", caninput_source_start_byte1, { caninput_sel1 == 1 && enable_candata_in }
2022+ field = "", caninput_source_start_byte2, { caninput_sel2 == 1 && enable_candata_in }
2023+ field = "", caninput_source_start_byte3, { caninput_sel3 == 1 && enable_candata_in }
2024+ field = "", caninput_source_start_byte4, { caninput_sel4 == 1 && enable_candata_in }
2025+ field = "", caninput_source_start_byte5, { caninput_sel5 == 1 && enable_candata_in }
2026+ field = "", caninput_source_start_byte6, { caninput_sel6 == 1 && enable_candata_in }
2027+ field = "", caninput_source_start_byte7, { caninput_sel7 == 1 && enable_candata_in }
2028+ field = "", caninput_source_start_byte8, { caninput_sel8 == 1 && enable_candata_in }
2029+ field = "", caninput_source_start_byte9, { caninput_sel9 == 1 && enable_candata_in }
2030+ field = "", caninput_source_start_byte10, { caninput_sel10 == 1 && enable_candata_in }
2031+ field = "", caninput_source_start_byte11, { caninput_sel11 == 1 && enable_candata_in }
2032+ field = "", caninput_source_start_byte12, { caninput_sel12 == 1 && enable_candata_in }
2033+ field = "", caninput_source_start_byte13, { caninput_sel13 == 1 && enable_candata_in }
2034+ field = "", caninput_source_start_byte14, { caninput_sel14 == 1 && enable_candata_in }
2035+ field = "", caninput_source_start_byte15, { caninput_sel15 == 1 && enable_candata_in }
18072036
18082037 dialog = caninput_parameter_num_byte, "", yAxis
18092038 field = "Input Parameter Number of Bytes"
1810- field = "", caninput_source_num_bytes0, { caninput_sel0 && enable_candata_in }
1811- field = "", caninput_source_num_bytes1, { caninput_sel1 && enable_candata_in }
1812- field = "", caninput_source_num_bytes2, { caninput_sel3 && enable_candata_in }
1813- field = "", caninput_source_num_bytes3, { caninput_sel3 && enable_candata_in }
1814- field = "", caninput_source_num_bytes4, { caninput_sel4 && enable_candata_in }
1815- field = "", caninput_source_num_bytes5, { caninput_sel5 && enable_candata_in }
1816- field = "", caninput_source_num_bytes6, { caninput_sel6 && enable_candata_in }
1817- field = "", caninput_source_num_bytes7, { caninput_sel7 && enable_candata_in }
1818- field = "", caninput_source_num_bytes8, { caninput_sel8 && enable_candata_in }
1819- field = "", caninput_source_num_bytes9, { caninput_sel9 && enable_candata_in }
1820- field = "", caninput_source_num_bytes10, { caninput_sel10 && enable_candata_in }
1821- field = "", caninput_source_num_bytes11, { caninput_sel11 && enable_candata_in }
1822- field = "", caninput_source_num_bytes12, { caninput_sel12 && enable_candata_in }
1823- field = "", caninput_source_num_bytes13, { caninput_sel13 && enable_candata_in }
1824- field = "", caninput_source_num_bytes14, { caninput_sel14 && enable_candata_in }
1825- field = "", caninput_source_num_bytes15, { caninput_sel15 && enable_candata_in }
2039+ field = "", caninput_source_num_bytes0, { caninput_sel0 == 1 && enable_candata_in }
2040+ field = "", caninput_source_num_bytes1, { caninput_sel1 == 1 && enable_candata_in }
2041+ field = "", caninput_source_num_bytes2, { caninput_sel3 == 1 && enable_candata_in }
2042+ field = "", caninput_source_num_bytes3, { caninput_sel3 == 1 && enable_candata_in }
2043+ field = "", caninput_source_num_bytes4, { caninput_sel4 == 1 && enable_candata_in }
2044+ field = "", caninput_source_num_bytes5, { caninput_sel5 == 1 && enable_candata_in }
2045+ field = "", caninput_source_num_bytes6, { caninput_sel6 == 1 && enable_candata_in }
2046+ field = "", caninput_source_num_bytes7, { caninput_sel7 == 1 && enable_candata_in }
2047+ field = "", caninput_source_num_bytes8, { caninput_sel8 == 1 && enable_candata_in }
2048+ field = "", caninput_source_num_bytes9, { caninput_sel9 == 1 && enable_candata_in }
2049+ field = "", caninput_source_num_bytes10, { caninput_sel10 == 1 && enable_candata_in }
2050+ field = "", caninput_source_num_bytes11, { caninput_sel11 == 1 && enable_candata_in }
2051+ field = "", caninput_source_num_bytes12, { caninput_sel12 == 1 && enable_candata_in }
2052+ field = "", caninput_source_num_bytes13, { caninput_sel13 == 1 && enable_candata_in }
2053+ field = "", caninput_source_num_bytes14, { caninput_sel14 == 1 && enable_candata_in }
2054+ field = "", caninput_source_num_bytes15, { caninput_sel15 == 1 && enable_candata_in }
18262055
18272056 dialog = caninconfig_blank1,""
18282057 field = ""
18292058
18302059 dialog = Canin_config1, "", xAxis
1831- panel = caninput_sel
1832- panel = caninconfig_blank1
1833- panel = caninput_parameter_group
1834- panel = caninconfig_blank1
1835- panel = caninput_parameter_start_byte
1836- panel = caninconfig_blank1
1837- panel = caninput_parameter_num_byte
2060+ panel = canAuxinput_alias
2061+ panel = caninconfig_blank1
2062+ panel = caninput_sel
2063+ panel = caninconfig_blank1
2064+ panel = caninput_parameter_group
2065+ panel = caninconfig_blank1
2066+ panel = caninput_parameter_start_byte
2067+ panel = caninconfig_blank1
2068+ panel = caninput_parameter_num_byte
18382069
18392070 dialog = Canin_config2, "External Data Input"
1840- field = "Enable External data input", enable_candata_in
2071+ field = "Enable External data input", enable_candata_in
18412072
18422073 dialog = Canin_config, "", border
18432074 topicHelp = "http://speeduino.com/wiki/index.php/Secondary_Serial_IO_interface#Read_external_analog_data"
1844- panel = Canin_config2, North
1845- panel = Canin_config1, South
1846-
1847- dialog = canoutput_sel, ""
2075+ panel = Canin_config2, North
2076+ panel = Canin_config1, South
2077+
2078+ dialog = canAuxoutput_alias, "", yAxis
2079+ field = "Input Alias"
2080+ field = "", AUXin00Alias , {caninput_sel0}
2081+ field = "", AUXin01Alias , {caninput_sel1}
2082+ field = "", AUXin02Alias , {caninput_sel2}
2083+ field = "", AUXin03Alias , {caninput_sel3}
2084+ field = "", AUXin04Alias , {caninput_sel4}
2085+ field = "", AUXin05Alias , {caninput_sel5}
2086+ field = "", AUXin06Alias , {caninput_sel6}
2087+ field = "", AUXin07Alias , {caninput_sel7}
2088+ field = "", AUXin08Alias , {caninput_sel8}
2089+ field = "", AUXin09Alias , {caninput_sel9}
2090+ field = "", AUXin10Alias , {caninput_sel10}
2091+ field = "", AUXin11Alias , {caninput_sel11}
2092+ field = "", AUXin12Alias , {caninput_sel12}
2093+ field = "", AUXin13Alias , {caninput_sel13}
2094+ field = "", AUXin14Alias , {caninput_sel14}
2095+ field = "", AUXin15Alias , {caninput_sel15}
2096+
2097+ dialog = canoutput_sel, "", yAxis
18482098 ;CAN outputs
18492099 field = "CAN Output Channel on/off"
18502100 field = "CAN Output 0", canoutput_sel0, { enable_candata_out}
@@ -1925,13 +2175,15 @@
19252175 field = ""
19262176
19272177 dialog = Canout_config1, "", xAxis
1928- panel = canoutput_sel
1929- panel = canoutconfig_blank1
1930- panel = canoutput_parameter_group
1931- panel = canoutconfig_blank1
1932- panel = canoutput_parameter_start_byte
1933- panel = canoutconfig_blank1
1934- panel = canoutput_parameter_num_byte
2178+ panel = canAuxoutput_alias
2179+ panel = canoutconfig_blank1
2180+ panel = canoutput_sel
2181+ panel = canoutconfig_blank1
2182+ panel = canoutput_parameter_group
2183+ panel = canoutconfig_blank1
2184+ panel = canoutput_parameter_start_byte
2185+ panel = canoutconfig_blank1
2186+ panel = canoutput_parameter_num_byte
19352187
19362188 dialog = Canout_config2, "CAN Data Out"
19372189 field = "Enable CanBus data Output", enable_candata_out
@@ -1938,16 +2190,16 @@
19382190
19392191 dialog = Canout_config, "", border
19402192 topicHelp = ""
1941- panel = Canout_config2, North
1942- panel = Canout_config1, South
2193+ panel = Canout_config2, North
2194+ panel = Canout_config1, South
19432195
19442196 dialog = can_serial3IO, "CanBus/Serial3 IO interface"
19452197 topicHelp = "http://speeduino.com/wiki/index.php/Secondary_Serial_IO_interface"
1946- field = "Enable CanBus/Second Serial", enable_canbus
2198+ field = "Enable CanBus/Second Serial", enable_canbus
19472199 ; field = "Speeduino TsCanId", speeduino_tsCanId
1948- field = "True Canbus Address", true_address {enable_canbus}
1949- field = "NOTE! Realtime Datat Base Address MUST be at least 0x16 GREATER than the True Address as they are reserved for future expansion"
1950- field = "Realtime Data Base Can Address", realtime_base_address {enable_canbus}
2200+ field = "True Canbus Address", true_address {enable_canbus}
2201+ field = "NOTE! Realtime Datat Base Address MUST be at least 0x16 GREATER than the True Address as they are reserved for future expansion"
2202+ field = "Realtime Data Base Can Address", realtime_base_address {enable_canbus}
19512203 ; field = "Speeduino OBD address", obd_address
19522204
19532205 dialog = serial3IO, "Serial3 IO interface"
@@ -1959,6 +2211,116 @@
19592211 field = "Control Type", resetControl
19602212 field = "Control Pin", resetControlPin
19612213
2214+ dialog = Auxinput_pin_selection, "", yAxis
2215+ field = " PIN"
2216+ displayOnlyField = "Off", blankfield, {caninput_sel0 == 0},{caninput_sel0 == 0}
2217+ field = "", caninput_source_can_address0, { caninput_sel0 == 1 && enable_candata_in }, {caninput_sel0 == 1}
2218+ field = "", Auxin0pina , {caninput_sel0 == 2 || caninput_sel0 == 3 }, {caninput_sel0 == 2}
2219+ field = "", Auxin0pinb , {caninput_sel0 == 2 || caninput_sel0 == 3 }, {caninput_sel0 == 3}
2220+ displayOnlyField = "Off", blankfield, {caninput_sel1 == 0},{caninput_sel1 == 0}
2221+ field = "", caninput_source_can_address1, { caninput_sel1 == 1 && enable_candata_in }, {caninput_sel1 == 1}
2222+ field = "", Auxin1pina , {caninput_sel1 == 2 || caninput_sel1 == 3}, {caninput_sel1 == 2}
2223+ field = "", Auxin1pinb , {caninput_sel1 == 2 || caninput_sel1 == 3}, {caninput_sel1 == 3}
2224+ displayOnlyField = "Off", blankfield, {caninput_sel2 == 0},{caninput_sel2 == 0}
2225+ field = "", caninput_source_can_address2, { caninput_sel2 == 1 && enable_candata_in }, {caninput_sel2 == 1}
2226+ field = "", Auxin2pina , {caninput_sel2 == 2 || caninput_sel2 == 3}, {caninput_sel2 == 2}
2227+ field = "", Auxin2pinb , {caninput_sel2 == 2 || caninput_sel2 == 3}, {caninput_sel2 == 3}
2228+ displayOnlyField = "Off", blankfield, {caninput_sel3 == 0},{caninput_sel3 == 0}
2229+ field = "", caninput_source_can_address3, { caninput_sel3 == 1 && enable_candata_in }, {caninput_sel3 == 1}
2230+ field = "", Auxin3pina , {caninput_sel3 == 2 || caninput_sel3 == 3}, {caninput_sel3 == 2}
2231+ field = "", Auxin3pinb , {caninput_sel3 == 2 || caninput_sel3 == 3}, {caninput_sel3 == 3}
2232+ displayOnlyField = "Off", blankfield, {caninput_sel4 == 0},{caninput_sel4 == 0}
2233+ field = "", caninput_source_can_address4, { caninput_sel4 == 1 && enable_candata_in }, {caninput_sel4 == 1}
2234+ field = "", Auxin4pina , {caninput_sel4 == 2 || caninput_sel4 == 3}, {caninput_sel4 == 2}
2235+ field = "", Auxin4pinb , {caninput_sel4 == 2 || caninput_sel4 == 3}, {caninput_sel4 == 3}
2236+ displayOnlyField = "Off", blankfield, {caninput_sel5 == 0},{caninput_sel5 == 0}
2237+ field = "", caninput_source_can_address5, { caninput_sel5 == 1 && enable_candata_in }, {caninput_sel5 == 1}
2238+ field = "", Auxin5pina , {caninput_sel5 == 2 || caninput_sel5 == 3}, {caninput_sel5 == 2}
2239+ field = "", Auxin5pinb , {caninput_sel5 == 2 || caninput_sel5 == 3}, {caninput_sel5 == 3}
2240+ displayOnlyField = "Off", blankfield, {caninput_sel6 == 0},{caninput_sel6 == 0}
2241+ field = "", caninput_source_can_address6, { caninput_sel6 == 1 && enable_candata_in }, {caninput_sel6 == 1}
2242+ field = "", Auxin6pina , {caninput_sel6 == 2 || caninput_sel6 == 3}, {caninput_sel6 == 2}
2243+ field = "", Auxin6pinb , {caninput_sel6 == 2 || caninput_sel6 == 3}, {caninput_sel6 == 3}
2244+ displayOnlyField = "Off", blankfield, {caninput_sel7 == 0},{caninput_sel7 == 0}
2245+ field = "", caninput_source_can_address7, { caninput_sel7 == 1 && enable_candata_in }, {caninput_sel7 == 1}
2246+ field = "", Auxin7pina , {caninput_sel7 == 2 || caninput_sel7 == 3}, {caninput_sel7 == 2}
2247+ field = "", Auxin7pinb , {caninput_sel7 == 2 || caninput_sel7 == 3}, {caninput_sel7 == 3}
2248+ displayOnlyField = "Off", blankfield, {caninput_sel8 == 8},{caninput_sel8 == 0}
2249+ field = "", caninput_source_can_address8, { caninput_sel8 == 1 && enable_candata_in }, {caninput_sel8 == 1}
2250+ field = "", Auxin8pina , {caninput_sel8 == 2 || caninput_sel8 == 3}, {caninput_sel8 == 2}
2251+ field = "", Auxin8pinb , {caninput_sel8 == 2 || caninput_sel8 == 3}, {caninput_sel8 == 3}
2252+ displayOnlyField = "Off", blankfield, {caninput_sel9 == 0},{caninput_sel9 == 0}
2253+ field = "", caninput_source_can_address9, { caninput_sel9 == 1 && enable_candata_in }, {caninput_sel9 == 1}
2254+ field = "", Auxin9pina , {caninput_sel9 == 2 || caninput_sel9 == 3}, {caninput_sel9 == 2}
2255+ field = "", Auxin9pinb , {caninput_sel9 == 2 || caninput_sel9 == 3}, {caninput_sel9 == 3}
2256+ displayOnlyField = "Off", blankfield, {caninput_sel10 == 0},{caninput_sel10 == 0}
2257+ field = "", caninput_source_can_address10, { caninput_sel10 == 1 && enable_candata_in }, {caninput_sel10 == 1}
2258+ field = "", Auxin10pina , {caninput_sel10 == 2 || caninput_sel10 == 3}, {caninput_sel10 == 2}
2259+ field = "", Auxin10pinb , {caninput_sel10 == 2 || caninput_sel10 == 3}, {caninput_sel10 == 3}
2260+ displayOnlyField = "Off", blankfield, {caninput_sel11 == 0},{caninput_sel11 == 0}
2261+ field = "", caninput_source_can_address11, { caninput_sel11 == 1 && enable_candata_in }, {caninput_sel11 == 1}
2262+ field = "", Auxin11pina , {caninput_sel11 == 2 || caninput_sel11 == 3}, {caninput_sel11 == 2}
2263+ field = "", Auxin11pinb , {caninput_sel11 == 2 || caninput_sel11 == 3}, {caninput_sel11 == 3}
2264+ displayOnlyField = "Off", blankfield, {caninput_sel12 == 0},{caninput_sel12 == 0}
2265+ field = "", caninput_source_can_address12, { caninput_sel12 == 1 && enable_candata_in }, {caninput_sel12 == 1}
2266+ field = "", Auxin12pina , {caninput_sel12 == 2 || caninput_sel12 == 3}, {caninput_sel12 == 2}
2267+ field = "", Auxin12pinb , {caninput_sel12 == 2 || caninput_sel12 == 3}, {caninput_sel12 == 3}
2268+ displayOnlyField = "Off", blankfield, {caninput_sel13 == 0},{caninput_sel13 == 0}
2269+ field = "", caninput_source_can_address13, { caninput_sel13 == 1 && enable_candata_in }, {caninput_sel13 == 1}
2270+ field = "", Auxin13pina , {caninput_sel13 == 2 || caninput_sel13 == 3}, {caninput_sel13 == 2}
2271+ field = "", Auxin13pinb , {caninput_sel13 == 2 || caninput_sel13 == 3}, {caninput_sel13 == 3}
2272+ displayOnlyField = "Off", blankfield, {caninput_sel14 == 0},{caninput_sel14 == 0}
2273+ field = "", caninput_source_can_address14, { caninput_sel14 == 1 && enable_candata_in }, {caninput_sel14 == 1}
2274+ field = "", Auxin14pina , {caninput_sel14 == 2 || caninput_sel14 == 3}, {caninput_sel14 == 2}
2275+ field = "", Auxin14pinb , {caninput_sel14 == 2 || caninput_sel14 == 3}, {caninput_sel14 == 3}
2276+ displayOnlyField = "Off", blankfield, {caninput_sel15 == 0},{caninput_sel15 == 0}
2277+ field = "", caninput_source_can_address15, { caninput_sel15 == 1 && enable_candata_in }, {caninput_sel15 == 1}
2278+ field = "", Auxin15pina , {caninput_sel15 == 2 || caninput_sel15 == 3}, {caninput_sel15 == 2}
2279+ field = "", Auxin15pinb , {caninput_sel15 == 2 || caninput_sel15 == 3}, {caninput_sel15 == 3}
2280+
2281+ dialog = Auxinput_alias, "", yAxis
2282+ field = "Input Alias"
2283+ field = "", AUXin00Alias , {caninput_sel0}
2284+ field = "", AUXin01Alias , {caninput_sel1}
2285+ field = "", AUXin02Alias , {caninput_sel2}
2286+ field = "", AUXin03Alias , {caninput_sel3}
2287+ field = "", AUXin04Alias , {caninput_sel4}
2288+ field = "", AUXin05Alias , {caninput_sel5}
2289+ field = "", AUXin06Alias , {caninput_sel6}
2290+ field = "", AUXin07Alias , {caninput_sel7}
2291+ field = "", AUXin08Alias , {caninput_sel8}
2292+ field = "", AUXin09Alias , {caninput_sel9}
2293+ field = "", AUXin10Alias , {caninput_sel10}
2294+ field = "", AUXin11Alias , {caninput_sel11}
2295+ field = "", AUXin12Alias , {caninput_sel12}
2296+ field = "", AUXin13Alias , {caninput_sel13}
2297+ field = "", AUXin14Alias , {caninput_sel14}
2298+ field = "", AUXin15Alias , {caninput_sel15}
2299+
2300+ dialog = Auxinput_channelenable, "", yAxis
2301+ field = " Aux Input Channel Enable"
2302+ field = "AUX Input 0", caninput_sel0
2303+ field = "AUX Input 1", caninput_sel1
2304+ field = "AUX Input 2", caninput_sel2
2305+ field = "AUX Input 3", caninput_sel3
2306+ field = "AUX Input 4", caninput_sel4
2307+ field = "AUX Input 5", caninput_sel5
2308+ field = "AUX Input 6", caninput_sel6
2309+ field = "AUX Input 7", caninput_sel7
2310+ field = "AUX Input 8", caninput_sel8
2311+ field = "AUX Input 9", caninput_sel9
2312+ field = "AUX Input 10", caninput_sel10
2313+ field = "AUX Input 11", caninput_sel11
2314+ field = "AUX Input 12", caninput_sel12
2315+ field = "AUX Input 13", caninput_sel13
2316+ field = "AUX Input 14", caninput_sel14
2317+ field = "AUX Input 15", caninput_sel15
2318+
2319+ dialog = Auxin_config, "Auxillary Input Configuration",xAxis
2320+ panel = Auxinput_alias
2321+ panel = Auxinput_channelenable
2322+ panel = Auxinput_pin_selection
2323+
19622324 ;-------------------------------------------------------------------------------
19632325 ; General help text
19642326
@@ -2151,7 +2513,7 @@
21512513
21522514 curve = flex_adv_curve, "Flex Timing Advance"
21532515 columnLabel = "Ethanol", "Advance"
2154- xAxis = 0, 100, 10
2516+ xAxis = 0, 100, 10
21552517 yAxis = 0, 50, 5
21562518 xBins = flexAdvBins, flex
21572519 yBins = flexAdvAdj
@@ -2159,12 +2521,29 @@
21592521
21602522 curve = flex_boost_curve, "Flex Boost Adjustments"
21612523 columnLabel = "Ethanol", "Boost"
2162- xAxis = 0, 100, 10
2524+ xAxis = 0, 100, 10
21632525 yAxis = -100, 200, 5
21642526 xBins = flexBoostBins, flex
21652527 yBins = flexBoostAdj
21662528 size = 400, 200
21672529
2530+;Knock sensor windows
2531+ curve = knock_window_angle_curve, "Knock Window"
2532+ columnLabel = "RPM", "Window Start"
2533+ xAxis = 0, 8000, 9
2534+ yAxis = -100, 100, 11
2535+ xBins = knock_window_rpms, rpm
2536+ yBins = knock_window_angle
2537+ size = 400, 200
2538+
2539+ curve = knock_window_duration_curve, "Knock Window Duration"
2540+ columnLabel = "RPM", "Window Duration"
2541+ xAxis = 0, 8000, 9
2542+ yAxis = 0, 100, 10
2543+ xBins = knock_window_rpms, rpm
2544+ yBins = knock_window_dur
2545+ size = 400, 200
2546+
21682547 [TableEditor]
21692548 ; table_id, map3d_id, "title", page
21702549 table = veTable1Tbl, veTable1Map, "VE Table", 1
@@ -2181,11 +2560,12 @@
21812560
21822561 table = sparkTbl, sparkMap, "Ignition Advance Table", 3
21832562 xBins = rpmBins2, rpm
2184- yBins = ignLoadBins, ignLoad
2563+ ;yBins = ignLoadBins, ignLoad
2564+ yBins = mapBins1, ignLoad
21852565 xyLabels = "RPM", "Ignition Load: "
21862566 zBins = advTable1
21872567 gridHeight = 3.0
2188- upDownLabel = "ADVANCED", "RETARDED"
2568+ upDownLabel = "ADVANCING", "RETARDING"
21892569
21902570 ;table = afrTbl, afrTableMap, "AFR Table", 5
21912571 table = afrTable1Tbl, afrTable1Map, "AFR Table", 5
@@ -2352,25 +2732,23 @@
23522732 #endif
23532733 flexGauge = flex, "Flex sensor", "%", 0, 100, -1, -1, 999, 999, 0, 0
23542734
2355- #if CAN_COMMANDS
2356- gaugeCategory = "CanBus Inputs"
2357- CanGauge0 = canin_gauge0, "Can In0" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2358- CanGauge1 = canin_gauge1, "Can In1" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2359- CanGauge2 = canin_gauge2, "Can In2" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2360- CanGauge3 = canin_gauge3, "Can In3" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2361- CanGauge4 = canin_gauge4, "Can In4" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2362- CanGauge5 = canin_gauge5, "Can In5" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2363- CanGauge6 = canin_gauge6, "Can In6" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2364- CanGauge7 = canin_gauge7, "Can In7" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2365- CanGauge8 = canin_gauge8, "Can In8" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2366- CanGauge9 = canin_gauge9, "Can In9" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2367- CanGauge10 = canin_gauge10, "Can In10" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2368- CanGauge11 = canin_gauge11, "Can In11" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2369- CanGauge12 = canin_gauge12, "Can In12" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2370- CanGauge13 = canin_gauge13, "Can In13" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2371- CanGauge14 = canin_gauge14, "Can In14" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2372- CanGauge15 = canin_gauge15, "Can In15" "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2373- #endif
2735+ gaugeCategory = "Auxillary Input Channels"
2736+ AuxInGauge0 = auxin_gauge0, { stringValue(AUXin00Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2737+ AuxInGauge1 = auxin_gauge1, { stringValue(AUXin01Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2738+ AuxInGauge2 = auxin_gauge2, { stringValue(AUXin02Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2739+ AuxInGauge3 = auxin_gauge3, { stringValue(AUXin03Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2740+ AuxInGauge4 = auxin_gauge4, { stringValue(AUXin04Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2741+ AuxInGauge5 = auxin_gauge5, { stringValue(AUXin05Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2742+ AuxInGauge6 = auxin_gauge6, { stringValue(AUXin06Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2743+ AuxInGauge7 = auxin_gauge7, { stringValue(AUXin07Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2744+ AuxInGauge8 = auxin_gauge8, { stringValue(AUXin08Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2745+ AuxInGauge9 = auxin_gauge9, { stringValue(AUXin09Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2746+ AuxInGauge10 = auxin_gauge10, { stringValue(AUXin10Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2747+ AuxInGauge11 = auxin_gauge11, { stringValue(AUXin11Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2748+ AuxInGauge12 = auxin_gauge12, { stringValue(AUXin12Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2749+ AuxInGauge13 = auxin_gauge13, { stringValue(AUXin13Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2750+ AuxInGauge14 = auxin_gauge14, { stringValue(AUXin14Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
2751+ AuxInGauge15 = auxin_gauge15, { stringValue(AUXin15Alias) }, "", 0, 1024, -1, -1, 1025, 1025, 0, 0
23742752
23752753 gaugeCategory = "System Data"
23762754 clockGauge = secl, "Clock", "Seconds", 0, 255, 10, 10, 245, 245, 0, 0
@@ -2432,7 +2810,7 @@
24322810 ; you change it.
24332811
24342812 ochGetCommand = "r\$tsCanId\x30%2o%2c"
2435- ochBlockSize = 89
2813+ ochBlockSize = 90
24362814
24372815 secl = scalar, U08, 0, "sec", 1.000, 0.000
24382816 status1 = scalar, U08, 1, "bits", 1.000, 0.000
@@ -2496,22 +2874,22 @@
24962874 testactive = bits, U08, 38, [1:1]
24972875 afr2 = scalar, U08, 39, "O2", 0.100, 0.000
24982876 baro = scalar, U08, 40, "kpa", 1.000, 0.000
2499- canin_gauge0 = scalar, U16, 41, "", 1.000, 0.000
2500- canin_gauge1 = scalar, U16, 43, "", 1.000, 0.000
2501- canin_gauge2 = scalar, U16, 45, "", 1.000, 0.000
2502- canin_gauge3 = scalar, U16, 47, "", 1.000, 0.000
2503- canin_gauge4 = scalar, U16, 49, "", 1.000, 0.000
2504- canin_gauge5 = scalar, U16, 51, "", 1.000, 0.000
2505- canin_gauge6 = scalar, U16, 53, "", 1.000, 0.000
2506- canin_gauge7 = scalar, U16, 55, "", 1.000, 0.000
2507- canin_gauge8 = scalar, U16, 57, "", 1.000, 0.000
2508- canin_gauge9 = scalar, U16, 59, "", 1.000, 0.000
2509- canin_gauge10 = scalar, U16, 61, "", 1.000, 0.000
2510- canin_gauge11 = scalar, U16, 63, "", 1.000, 0.000
2511- canin_gauge12 = scalar, U16, 65, "", 1.000, 0.000
2512- canin_gauge13 = scalar, U16, 67, "", 1.000, 0.000
2513- canin_gauge14 = scalar, U16, 69, "", 1.000, 0.000
2514- canin_gauge15 = scalar, U16, 71, "", 1.000, 0.000
2877+ auxin_gauge0 = scalar, U16, 41, "", 1.000, 0.000
2878+ auxin_gauge1 = scalar, U16, 43, "", 1.000, 0.000
2879+ auxin_gauge2 = scalar, U16, 45, "", 1.000, 0.000
2880+ auxin_gauge3 = scalar, U16, 47, "", 1.000, 0.000
2881+ auxin_gauge4 = scalar, U16, 49, "", 1.000, 0.000
2882+ auxin_gauge5 = scalar, U16, 51, "", 1.000, 0.000
2883+ auxin_gauge6 = scalar, U16, 53, "", 1.000, 0.000
2884+ auxin_gauge7 = scalar, U16, 55, "", 1.000, 0.000
2885+ auxin_gauge8 = scalar, U16, 57, "", 1.000, 0.000
2886+ auxin_gauge9 = scalar, U16, 59, "", 1.000, 0.000
2887+ auxin_gauge10 = scalar, U16, 61, "", 1.000, 0.000
2888+ auxin_gauge11 = scalar, U16, 63, "", 1.000, 0.000
2889+ auxin_gauge12 = scalar, U16, 65, "", 1.000, 0.000
2890+ auxin_gauge13 = scalar, U16, 67, "", 1.000, 0.000
2891+ auxin_gauge14 = scalar, U16, 69, "", 1.000, 0.000
2892+ auxin_gauge15 = scalar, U16, 71, "", 1.000, 0.000
25152893 tpsADC = scalar, U08, 73, "ADC",1.000, 0.000
25162894 errors = scalar, U08, 74, "bits", 1.000, 0.000
25172895 errorNum = bits, U08, 74, [0:1]
@@ -2524,12 +2902,13 @@
25242902 nitrousOn = bits, U08, 81, [1:1]
25252903 unused81_2-4 = bits, U08, 81, [2:4]
25262904 nSquirts = bits, U08, 81, [5:7]
2527- flexBoostCor = scalar, S16, 82, "kPa", 1.000, 0.000
2528- nChannels = scalar, U08, 84, "bits", 1.000, 0.000
2905+ flexBoostCor = scalar, S16, 82, "kPa", 1.000, 0.000
2906+ nChannels = scalar, U08, 84, "bits", 1.000, 0.000
25292907 nIgnChannels = bits, U08, 84, [0:3]
25302908 nFuelChannels = bits, U08, 84, [4:7]
2531- fuelLoad = scalar, S16, 85, { bitStringValue( algorithmUnits , algorithm ) }, 1.000, 0.000
2532- ignLoad = scalar, S16, 87, { bitStringValue( algorithmUnits , ignAlgorithm ) }, 1.000, 0.000
2909+ fuelLoad = scalar, S16, 85, { bitStringValue( algorithmUnits , algorithm ) }, 1.000, 0.000
2910+ ignLoad = scalar, S16, 87, { bitStringValue( algorithmUnits , ignAlgorithm ) }, 1.000, 0.000
2911+ syncLossCounter = scalar, U08, 89, "", 1.000, 0.000
25332912
25342913
25352914 #if CELSIUS
@@ -2631,17 +3010,16 @@
26313010 entry = idleLoad, "IAC value", int, "%d"
26323011 entry = baro, "Baro Pressure",int, "%d"
26333012 entry = nitrousOn, "Nitrous On", int, "%d", { n2o_enable > 0 }
3013+ entry = syncLossCounter, "Sync Loss #", int, "%d"
26343014
2635-#if CAN_COMMANDS
2636- entry = canin_gauge0, "CanIn CH0", int, "%d"
2637- entry = canin_gauge1, "CanIn CH1", int, "%d"
2638- entry = canin_gauge2, "CanIn CH2", int, "%d"
2639- entry = canin_gauge3, "CanIn CH3", int, "%d"
2640- entry = canin_gauge4, "CanIn CH4", int, "%d"
2641- entry = canin_gauge5, "CanIn CH5", int, "%d"
2642- entry = canin_gauge6, "CanIn CH6", int, "%d"
2643- entry = canin_gauge7, "CanIn CH7", int, "%d"
2644-#endif
3015+ entry = auxin_gauge0, "AuxIn CH0", int, "%d"
3016+ entry = auxin_gauge1, "AuxIn CH1", int, "%d"
3017+ entry = auxin_gauge2, "AuxIn CH2", int, "%d"
3018+ entry = auxin_gauge3, "AuxIn CH3", int, "%d"
3019+ entry = auxin_gauge4, "AuxIn CH4", int, "%d"
3020+ entry = auxin_gauge5, "AuxIn CH5", int, "%d"
3021+ entry = auxin_gauge6, "AuxIn CH6", int, "%d"
3022+ entry = auxin_gauge7, "AuxIn CH7", int, "%d"
26453023
26463024
26473025 [LoggerDefinition]
@@ -2659,7 +3037,7 @@
26593037 recordDef = 0, 0, 2; in bytes, the recordLen is for each record, currently limited to 4 bytes
26603038
26613039 ;recordField = Name, HeaderName, startBit, bitCount, scale, units, updateCondition
2662- recordField = toothGap, "ToothTime", 0, 16, 1.0, "uS"
3040+ recordField = toothTime, "ToothTime", 0, 16, 1.0, "uS"
26633041
26643042
26653043 [Tools]
--- branches/Speeduino/speeduino/auxiliaries.h (revision 22)
+++ branches/Speeduino/speeduino/auxiliaries.h (revision 23)
@@ -3,9 +3,12 @@
33
44 void initialiseAuxPWM();
55 void boostControl();
6+void boostDisable();
7+void idleControl();
68 void vvtControl();
79 void initialiseFan();
810 void nitrousControl();
11+void fanControl();
912
1013 #if defined(CORE_AVR)
1114 #define ENABLE_BOOST_TIMER() TIMSK1 |= (1 << OCIE1A)
@@ -88,6 +91,9 @@
8891 long boost_cl_target_boost;
8992 byte boostCounter;
9093
94+byte fanHIGH = HIGH; // Used to invert the cooling fan output
95+byte fanLOW = LOW; // Used to invert the cooling fan output
96+
9197 volatile bool vvt_pwm_state;
9298 unsigned int vvt_pwm_max_count; //Used for variable PWM frequency
9399 volatile unsigned int vvt_pwm_cur_value;
--- branches/Speeduino/speeduino/comms.h (revision 22)
+++ branches/Speeduino/speeduino/comms.h (revision 23)
@@ -12,7 +12,7 @@
1212 #define canbusPage 9//Config Page 9
1313 #define warmupPage 10 //Config Page 10
1414
15-#define SERIAL_PACKET_SIZE 89 //Must match ochBlockSize in ini file
15+#define SERIAL_PACKET_SIZE 90 //Must match ochBlockSize in ini file
1616
1717 byte currentPage = 1;//Not the same as the speeduino config page numbers
1818 bool isMap = true;
--- branches/Speeduino/speeduino/corrections.h (revision 22)
+++ branches/Speeduino/speeduino/corrections.h (revision 23)
@@ -29,9 +29,14 @@
2929 static inline int8_t correctionNitrous(int8_t);
3030 static inline int8_t correctionSoftLaunch(int8_t);
3131 static inline int8_t correctionSoftFlatShift(int8_t);
32+static inline int8_t correctionKnock(int8_t);
3233
3334 uint16_t correctionsDwell(uint16_t dwell);
3435
3536 uint16_t AFRnextCycle;
37+unsigned long knockStartTime;
38+byte lastKnockCount;
39+int16_t knockWindowMin; //The current minimum crank angle for a knock pulse to be valid
40+int16_t knockWindowMax;//The current maximum crank angle for a knock pulse to be valid
3641
3742 #endif // CORRECTIONS_H
--- branches/Speeduino/speeduino/crankMaths.h (revision 22)
+++ branches/Speeduino/speeduino/crankMaths.h (revision 23)
@@ -1,7 +1,29 @@
1-#define CRANKMATH_METHOD_INTERVAL_RPM 0
2-#define CRANKMATH_METHOD_INTERVAL_TOOTH 1
3-#define CRANKMATH_METHOD_ALPHA_BETA 2
4-#define CRANKMATH_METHOD_2ND_DERIVATIVE 3
1+#ifndef CRANKMATHS_H
2+#define CRANKMATHS_H
53
6-unsigned long angleToTime(int16_t angle);
7-uint16_t timeToAngle(unsigned long time);
\ No newline at end of file
4+#define CRANKMATH_METHOD_INTERVAL_DEFAULT 0
5+#define CRANKMATH_METHOD_INTERVAL_REV 1
6+#define CRANKMATH_METHOD_INTERVAL_TOOTH 2
7+#define CRANKMATH_METHOD_ALPHA_BETA 3
8+#define CRANKMATH_METHOD_2ND_DERIVATIVE 4
9+
10+//#define fastDegreesToUS(targetDegrees) ((targetDegrees) * (unsigned long)timePerDegree)
11+#define fastDegreesToUS(targetDegrees) (((targetDegrees) * (unsigned long)timePerDegreex16) >> 4)
12+#define fastTimeToAngle(time) (((unsigned long)time * degreesPeruSx2048) / 2048) //Divide by 2048 will be converted at compile time to bitshift
13+
14+#define ignitionLimits(angle) ( (((int16_t)angle) >= CRANK_ANGLE_MAX_IGN) ? (angle - CRANK_ANGLE_MAX_IGN) : ( (angle < 0) ? (angle + CRANK_ANGLE_MAX_IGN) : angle) )
15+
16+
17+unsigned long angleToTime(int16_t, byte);
18+uint16_t timeToAngle(unsigned long, byte);
19+void doCrankSpeedCalcs();
20+
21+volatile uint16_t timePerDegree;
22+volatile uint16_t timePerDegreex16;
23+volatile uint16_t degreesPeruSx2048;
24+
25+//These are only part of the experimental 2nd deriv calcs
26+byte deltaToothCount = 0; //The last tooth that was used with the deltaV calc
27+int rpmDelta;
28+
29+#endif
\ No newline at end of file
--- branches/Speeduino/speeduino/decoders.h (revision 22)
+++ branches/Speeduino/speeduino/decoders.h (revision 23)
@@ -1,33 +1,146 @@
11 #ifndef DECODERS_H
22 #define DECODERS_H
33
4-#include <limits.h>
5-
64 #if defined(CORE_AVR)
75 #define READ_PRI_TRIGGER() ((*triggerPri_pin_port & triggerPri_pin_mask) ? true : false)
86 #define READ_SEC_TRIGGER() ((*triggerSec_pin_port & triggerSec_pin_mask) ? true : false)
9-#elif defined(CORE_TEENSY) || defined(CORE_STM32)
7+#else
108 #define READ_PRI_TRIGGER() digitalRead(pinTrigger)
119 #define READ_SEC_TRIGGER() digitalRead(pinTrigger2)
1210 #endif
1311
1412 static inline void addToothLogEntry(unsigned long);
15-static inline uint16_t stdGetRPM(uint16_t degreesOver);
13+static inline uint16_t stdGetRPM(uint16_t);
1614 static inline void setFilter(unsigned long);
1715 static inline int crankingGetRPM(byte);
18-static inline void doPerToothTiming(uint16_t crankAngle);
16+//static inline void doPerToothTiming(uint16_t);
1917
18+void (*trigger)(); //Pointer for the trigger function (Gets pointed to the relevant decoder)
19+void (*triggerSecondary)(); //Pointer for the secondary trigger function (Gets pointed to the relevant decoder)
20+uint16_t (*getRPM)(); //Pointer to the getRPM function (Gets pointed to the relevant decoder)
21+int (*getCrankAngle)(); //Pointer to the getCrank Angle function (Gets pointed to the relevant decoder)
22+void (*triggerSetEndTeeth)(); //Pointer to the triggerSetEndTeeth function of each decoder
23+
24+//All of the below are the 6 required functions for each decoder / pattern
2025 void triggerSetup_missingTooth();
2126 void triggerPri_missingTooth();
2227 void triggerSec_missingTooth();
2328 uint16_t getRPM_missingTooth();
24-int getCrankAngle_missingTooth(int timePerDegree);
29+int getCrankAngle_missingTooth();
30+void triggerSetEndTeeth_missingTooth();
31+
2532 void triggerSetup_DualWheel();
2633 void triggerPri_DualWheel();
2734 void triggerSec_DualWheel();
2835 uint16_t getRPM_DualWheel();
29-int getCrankAngle_DualWheel(int timePerDegree);
36+int getCrankAngle_DualWheel();
37+void triggerSetEndTeeth_DualWheel();
3038
39+void triggerSetup_BasicDistributor();
40+void triggerPri_BasicDistributor();
41+void triggerSec_BasicDistributor();
42+uint16_t getRPM_BasicDistributor();
43+int getCrankAngle_BasicDistributor();
44+void triggerSetEndTeeth_BasicDistributor();
45+
46+void triggerSetup_GM7X();
47+void triggerPri_GM7X();
48+void triggerSec_GM7X();
49+uint16_t getRPM_GM7X();
50+int getCrankAngle_GM7X();
51+void triggerSetEndTeeth_GM7X();
52+
53+void triggerSetup_4G63();
54+void triggerPri_4G63();
55+void triggerSec_4G63();
56+uint16_t getRPM_4G63();
57+int getCrankAngle_4G63();
58+void triggerSetEndTeeth_4G63();
59+
60+void triggerSetup_24X();
61+void triggerPri_24X();
62+void triggerSec_24X();
63+uint16_t getRPM_24X();
64+int getCrankAngle_24X();
65+void triggerSetEndTeeth_24X();
66+
67+void triggerSetup_Jeep2000();
68+void triggerPri_Jeep2000();
69+void triggerSec_Jeep2000();
70+uint16_t getRPM_Jeep2000();
71+int getCrankAngle_Jeep2000();
72+void triggerSetEndTeeth_Jeep2000();
73+
74+void triggerSetup_Audi135();
75+void triggerPri_Audi135();
76+void triggerSec_Audi135();
77+uint16_t getRPM_Audi135();
78+int getCrankAngle_Audi135();
79+void triggerSetEndTeeth_Audi135();
80+
81+void triggerSetup_HondaD17();
82+void triggerPri_HondaD17();
83+void triggerSec_HondaD17();
84+uint16_t getRPM_HondaD17();
85+int getCrankAngle_HondaD17();
86+void triggerSetEndTeeth_HondaD17();
87+
88+void triggerSetup_Miata9905();
89+void triggerPri_Miata9905();
90+void triggerSec_Miata9905();
91+uint16_t getRPM_Miata9905();
92+int getCrankAngle_Miata9905();
93+void triggerSetEndTeeth_Miata9905();
94+
95+void triggerSetup_MazdaAU();
96+void triggerPri_MazdaAU();
97+void triggerSec_MazdaAU();
98+uint16_t getRPM_MazdaAU();
99+int getCrankAngle_MazdaAU();
100+void triggerSetEndTeeth_MazdaAU();
101+
102+void triggerSetup_non360();
103+void triggerPri_non360();
104+void triggerSec_non360();
105+uint16_t getRPM_non360();
106+int getCrankAngle_non360();
107+void triggerSetEndTeeth_non360();
108+
109+void triggerSetup_Nissan360();
110+void triggerPri_Nissan360();
111+void triggerSec_Nissan360();
112+uint16_t getRPM_Nissan360();
113+int getCrankAngle_Nissan360();
114+void triggerSetEndTeeth_Nissan360();
115+
116+void triggerSetup_Subaru67();
117+void triggerPri_Subaru67();
118+void triggerSec_Subaru67();
119+uint16_t getRPM_Subaru67();
120+int getCrankAngle_Subaru67();
121+void triggerSetEndTeeth_Subaru67();
122+
123+void triggerSetup_Daihatsu();
124+void triggerPri_Daihatsu();
125+void triggerSec_Daihatsu();
126+uint16_t getRPM_Daihatsu();
127+int getCrankAngle_Daihatsu();
128+void triggerSetEndTeeth_Daihatsu();
129+
130+void triggerSetup_Harley();
131+void triggerPri_Harley();
132+void triggerSec_Harley();
133+uint16_t getRPM_Harley();
134+int getCrankAngle_Harley();
135+void triggerSetEndTeeth_Harley();
136+
137+void triggerSetup_ThirtySixMinus222();
138+void triggerPri_ThirtySixMinus222();
139+void triggerSec_ThirtySixMinus222();
140+uint16_t getRPM_ThirtySixMinus222();
141+int getCrankAngle_ThirtySixMinus222();
142+void triggerSetEndTeeth_ThirtySixMinus222();
143+
31144 unsigned long MAX_STALL_TIME = 500000UL; //The maximum time (in uS) that the system will continue to function before the engine is considered stalled/stopped. This is unique to each decoder, depending on the number of teeth etc. 500000 (half a second) is used as the default value, most decoders will be much less.
32145
33146 volatile unsigned long curTime;
@@ -50,9 +163,6 @@
50163 volatile unsigned long toothOneTime = 0; //The time (micros()) that tooth 1 last triggered
51164 volatile unsigned long toothOneMinusOneTime = 0; //The 2nd to last time (micros()) that tooth 1 last triggered
52165 volatile bool revolutionOne = 0; // For sequential operation, this tracks whether the current revolution is 1 or 2 (not 1)
53-volatile uint16_t toothHistory[TOOTH_LOG_BUFFER];
54-volatile unsigned int toothHistoryIndex = 0;
55-volatile bool toothLogRead = false; //Flag to indicate whether the current tooth log values have been read out yet
56166
57167 volatile unsigned int secondaryToothCount; //Used for identifying the current secondary (Usually cam) tooth for patterns with multiple secondary teeth
58168 volatile unsigned long secondaryLastToothTime = 0; //The time (micros()) that the last tooth was registered (Cam input)
@@ -60,15 +170,18 @@
60170
61171 volatile int triggerActualTeeth;
62172 volatile unsigned long triggerFilterTime; // The shortest time (in uS) that pulses will be accepted (Used for debounce filtering)
63-unsigned long triggerSecFilterTime; // The shortest time (in uS) that pulses will be accepted (Used for debounce filtering) for the secondary input
173+volatile unsigned long triggerSecFilterTime; // The shortest time (in uS) that pulses will be accepted (Used for debounce filtering) for the secondary input
64174 unsigned int triggerSecFilterTime_duration; // The shortest valid time (in uS) pulse DURATION
65175 volatile uint16_t triggerToothAngle; //The number of crank degrees that elapse per tooth
66176 volatile bool triggerToothAngleIsCorrect = false; //Whether or not the triggerToothAngle variable is currently accurate. Some patterns have times when the triggerToothAngle variable cannot be accurately set.
67-bool secondDerivEnabled; //The use of the 2nd derivative calculation is limited to certain decoders. This is set to either true or false in each decoders setup routine
177+bool secondDerivEnabled = false; //The use of the 2nd derivative calculation is limited to certain decoders. This is set to either true or false in each decoders setup routine
68178 bool decoderIsSequential; //Whether or not the decoder supports sequential operation
69179 bool decoderIsLowRes = false; //Is set true, certain extra calculations are performed for better timing accuracy
70180 bool decoderHasFixedCrankingTiming = false; //Whether or not the decoder supports fixed cranking timing
71181 byte checkSyncToothCount; //How many teeth must've been seen on this revolution before we try to confirm sync (Useful for missing tooth type decoders)
182+unsigned long elapsedTime;
183+unsigned long lastCrankAngleCalc;
184+int16_t lastToothCalcAdvance = 99; //Invalid value here forces calculation of this on first main loop
72185
73186 int16_t ignition1EndTooth = 0;
74187 int16_t ignition2EndTooth = 0;
--- branches/Speeduino/speeduino/globals.h (revision 22)
+++ branches/Speeduino/speeduino/globals.h (revision 23)
@@ -18,6 +18,7 @@
1818 #elif defined(CORE_TEENSY)
1919 #define BOARD_DIGITAL_GPIO_PINS 34
2020 #define BOARD_NR_GPIO_PINS 34
21+
2122 #elif defined(STM32_MCU_SERIES) || defined(ARDUINO_ARCH_STM32) || defined(__STM32F1__) || defined(STM32F4) || defined(STM32)
2223 #define CORE_STM32
2324 #ifndef word
@@ -169,6 +170,10 @@
169170 #define NITROUS_STAGE1 1
170171 #define NITROUS_STAGE2 2
171172
173+#define KNOCK_MODE_OFF 0
174+#define KNOCK_MODE_DIGITAL 1
175+#define KNOCK_MODE_ANALOG 2
176+
172177 #define RESET_CONTROL_DISABLED 0
173178 #define RESET_CONTROL_PREVENT_WHEN_RUNNING 1
174179 #define RESET_CONTROL_PREVENT_ALWAYS 2
@@ -195,7 +200,7 @@
195200
196201 const byte data_structure_version = 2; //This identifies the data structure when reading / writing.
197202 //const byte page_size = 64;
198-const int16_t npage_size[11] = {0,288,128,288,128,288,128,240,192,128,192};
203+const int16_t npage_size[11] = {0,288,128,288,128,288,128,240,192,192,192};
199204 //const byte page11_size = 128;
200205 #define MAP_PAGE_SIZE 288
201206
@@ -220,6 +225,8 @@
220225 struct table2D flexFuelTable; //6 bin flex fuel correction table for fuel adjustments (2D)
221226 struct table2D flexAdvTable; //6 bin flex fuel correction table for timing advance (2D)
222227 struct table2D flexBoostTable; //6 bin flex fuel correction table for boost adjustments (2D)
228+struct table2D knockWindowStartTable;
229+struct table2D knockWindowDurationTable;
223230
224231 //These are for the direct port manipulation of the injectors, coils and aux outputs
225232 volatile byte *inj1_pin_port;
@@ -282,10 +289,23 @@
282289 int ignition4EndAngle = 0;
283290 int ignition5EndAngle = 0;
284291
285-//This is used across multiple files
292+//These are variables used across multiple files
293+bool initialisationComplete = false; //Tracks whether the setup() functino has run completely
294+volatile uint16_t mainLoopCount;
286295 unsigned long revolutionTime; //The time in uS that one revolution would take at current speed (The time tooth 1 was last seen, minus the time it was seen prior to that)
287296 volatile unsigned long timer5_overflow_count = 0; //Increments every time counter 5 overflows. Used for the fast version of micros()
288297 volatile unsigned long ms_counter = 0; //A counter that increments once per ms
298+uint16_t fixedCrankingOverride = 0;
299+bool clutchTrigger;
300+bool previousClutchTrigger;
301+volatile uint16_t toothHistory[TOOTH_LOG_BUFFER];
302+volatile bool fpPrimed = false; //Tracks whether or not the fuel pump priming has been completed yet
303+volatile unsigned int toothHistoryIndex = 0;
304+volatile bool toothLogRead = false; //Flag to indicate whether the current tooth log values have been read out yet
305+int CRANK_ANGLE_MAX = 720;
306+int CRANK_ANGLE_MAX_IGN = 360;
307+int CRANK_ANGLE_MAX_INJ = 360; // The number of crank degrees that the system track over. 360 for wasted / timed batch and 720 for sequential
308+
289309
290310 //This needs to be here because using the config page directly can prevent burning the setting
291311 byte resetControl = RESET_CONTROL_DISABLED;
@@ -334,7 +354,7 @@
334354 byte iatCorrection; //The amount of inlet air temperature adjustment currently being applied
335355 byte launchCorrection; //The amount of correction being applied if launch control is active
336356 byte flexCorrection; //Amount of correction being applied to compensate for ethanol content
337- byte flexIgnCorrection; //Amount of additional advance being applied based on flex
357+ int8_t flexIgnCorrection; //Amount of additional advance being applied based on flex. Note the type as this allows for negative values
338358 byte afrTarget;
339359 byte idleDuty;
340360 bool idleUpActive;
@@ -361,7 +381,7 @@
361381 uint16_t freeRAM;
362382 unsigned int clutchEngagedRPM;
363383 bool flatShiftingHard;
364- volatile uint16_t startRevolutions; //A counter for how many revolutions have been completed since sync was achieved.
384+ volatile uint32_t startRevolutions; //A counter for how many revolutions have been completed since sync was achieved.
365385 uint16_t boostTarget;
366386 byte testOutputs;
367387 bool testActive;
@@ -377,6 +397,10 @@
377397 byte nChannels; //Number of fuel and ignition channels
378398 int16_t fuelLoad;
379399 int16_t ignLoad;
400+ bool fuelPumpOn; //The current status of the fuel pump
401+ byte syncLossCounter;
402+ byte knockRetard;
403+ bool knockActive;
380404
381405 //Helpful bitwise operations:
382406 //Useful reference: http://playground.arduino.cc/Code/BitMath
@@ -658,12 +682,12 @@
658682 struct config9 {
659683 byte enable_canbus:2;
660684 byte enable_candata_in:1;
661- uint16_t caninput_sel; //bit status on/off if input is enabled
685+ byte caninput_sel[16]; //bit status on/Can/analog_local/digtal_local if input is enabled
662686 uint16_t caninput_source_can_address[16]; //u16 [15] array holding can address of input
663687 uint8_t caninput_source_start_byte[16]; //u08 [15] array holds the start byte number(value of 0-7)
664688 uint16_t caninput_source_num_bytes; //u16 bit status of the number of bytes length 1 or 2
665- byte unused10_53;
666- byte unused10_54;
689+ byte unused10_67;
690+ byte unused10_68;
667691 byte enable_candata_out : 1;
668692 byte canoutput_sel[8];
669693 uint16_t canoutput_param_group[8];
@@ -670,34 +694,58 @@
670694 uint8_t canoutput_param_start_byte[8];
671695 byte canoutput_param_num_bytes[8];
672696
673- byte unused10_97;
674- byte unused10_98;
675- byte unused10_99;
697+ byte unused10_110;
698+ byte unused10_111;
699+ byte unused10_112;
700+ byte unused10_113;
676701 byte speeduino_tsCanId:4; //speeduino TS canid (0-14)
677702 uint16_t true_address; //speeduino 11bit can address
678703 uint16_t realtime_base_address; //speeduino 11 bit realtime base address
679704 uint16_t obd_address; //speeduino OBD diagnostic address
680- byte unused10_107;
681- byte unused10_108;
682- byte unused10_109;
683- byte unused10_110;
684- byte unused10_111;
685- byte unused10_112;
686- byte unused10_113;
687- byte unused10_114;
688- byte unused10_115;
689- byte unused10_116;
690- byte unused10_117;
691- byte unused10_118;
692- byte unused10_119;
693- byte unused10_120;
694- byte unused10_121;
695- byte unused10_122;
696- byte unused10_123;
697- byte unused10_124;
698- byte unused10_125;
699- byte unused10_126;
700- byte unused10_127;
705+ uint8_t Auxinpina[16]; //analog pin number when internal aux in use
706+ uint8_t Auxinpinb[16]; // digital pin number when internal aux in use
707+
708+ byte unused10_152;
709+ byte unused10_153;
710+ byte unused10_154;
711+ byte unused10_155;
712+ byte unused10_156;
713+ byte unused10_157;
714+ byte unused10_158;
715+ byte unused10_159;
716+ byte unused10_160;
717+ byte unused10_161;
718+ byte unused10_162;
719+ byte unused10_163;
720+ byte unused10_164;
721+ byte unused10_165;
722+ byte unused10_166;
723+ byte unused10_167;
724+ byte unused10_168;
725+ byte unused10_169;
726+ byte unused10_170;
727+ byte unused10_171;
728+ byte unused10_172;
729+ byte unused10_173;
730+ byte unused10_174;
731+ byte unused10_175;
732+ byte unused10_176;
733+ byte unused10_177;
734+ byte unused10_178;
735+ byte unused10_179;
736+ byte unused10_180;
737+ byte unused10_181;
738+ byte unused10_182;
739+ byte unused10_183;
740+ byte unused10_184;
741+ byte unused10_185;
742+ byte unused10_186;
743+ byte unused10_187;
744+ byte unused10_188;
745+ byte unused10_189;
746+ byte unused10_190;
747+ byte unused10_191;
748+
701749 #if defined(CORE_AVR)
702750 };
703751 #else
@@ -732,7 +780,7 @@
732780 uint8_t flexFuelBins[6];
733781 uint8_t flexFuelAdj[6]; //Fuel % @ current ethanol (typically 100% @ 0%, 163% @ 100%)
734782 uint8_t flexAdvBins[6];
735- uint8_t flexAdvAdj[6]; //Additional advance (in degrees) @ current ethanol (typically 0 @ 0%, 10-20 @ 100%)
783+ uint8_t flexAdvAdj[6]; //Additional advance (in degrees) @ current ethanol (typically 0 @ 0%, 10-20 @ 100%). NOTE: THIS IS A SIGNED VALUE!
736784 //And another three corn rows die.
737785
738786 byte n2o_enable : 2;
@@ -759,8 +807,33 @@
759807 byte n2o_stage2_adderMax;
760808 byte n2o_stage2_retard;
761809
762- byte unused11_75_191[99];
810+ byte knock_mode : 2;
811+ byte knock_pin : 6;
763812
813+ byte knock_trigger : 1;
814+ byte knock_pullup : 1;
815+ byte knock_limiterDisable : 1;
816+ byte knock_unused : 2;
817+ byte knock_count : 3;
818+
819+ byte knock_threshold;
820+ byte knock_maxMAP;
821+ byte knock_maxRPM;
822+ byte knock_window_rpms[6];
823+ byte knock_window_angle[6];
824+ byte knock_window_dur[6];
825+
826+ byte knock_maxRetard;
827+ byte knock_firstStep;
828+ byte knock_stepSize;
829+ byte knock_stepTime;
830+
831+ byte knock_duration; //Time after knock retard starts that it should start recovering
832+ byte knock_recoveryStepTime;
833+ byte knock_recoveryStep;
834+
835+ byte unused11_122_191[69];
836+
764837 #if defined(CORE_AVR)
765838 };
766839 #else
--- branches/Speeduino/speeduino/maths.h (revision 22)
+++ branches/Speeduino/speeduino/maths.h (revision 23)
@@ -3,6 +3,9 @@
33
44 int fastMap1023toX(int, int);
55 unsigned long percentage(byte, unsigned long);
6+inline long powint(int, unsigned int);
7+int divs100(long);
8+unsigned long divu100(unsigned long);
69
710 #define DIV_ROUND_CLOSEST(n, d) ((((n) < 0) ^ ((d) < 0)) ? (((n) - (d)/2)/(d)) : (((n) + (d)/2)/(d)))
811
--- branches/Speeduino/speeduino/scheduledIO.h (revision 22)
+++ branches/Speeduino/speeduino/scheduledIO.h (revision 23)
@@ -33,7 +33,13 @@
3333 inline void endTrailingCoilCharge1();
3434 inline void endTrailingCoilCharge2();
3535
36+//And the combined versions of the above for simplicity
37+void beginCoil1and3Charge();
38+void endCoil1and3Charge();
39+void beginCoil2and4Charge();
40+void endCoil2and4Charge();
3641
42+
3743 #define openInjector1() *inj1_pin_port |= (inj1_pin_mask); BIT_SET(currentStatus.status1, BIT_STATUS1_INJ1)
3844 #define closeInjector1() *inj1_pin_port &= ~(inj1_pin_mask); BIT_CLEAR(currentStatus.status1, BIT_STATUS1_INJ1)
3945 #define openInjector2() *inj2_pin_port |= (inj2_pin_mask); BIT_SET(currentStatus.status1, BIT_STATUS1_INJ2)
@@ -61,4 +67,18 @@
6167 #define openInjector3and5() openInjector3(); openInjector5()
6268 #define closeInjector3and5() closeInjector3(); closeInjector5()
6369
70+#define coil1Low() (*ign1_pin_port &= ~(ign1_pin_mask))
71+#define coil1High() (*ign1_pin_port |= (ign1_pin_mask))
72+#define coil2Low() (*ign2_pin_port &= ~(ign2_pin_mask))
73+#define coil2High() (*ign2_pin_port |= (ign2_pin_mask))
74+#define coil3Low() (*ign3_pin_port &= ~(ign3_pin_mask))
75+#define coil3High() (*ign3_pin_port |= (ign3_pin_mask))
76+#define coil4Low() (*ign4_pin_port &= ~(ign4_pin_mask))
77+#define coil4High() (*ign4_pin_port |= (ign4_pin_mask))
78+
79+void nullCallback();
80+
81+static byte coilHIGH = HIGH;
82+static byte coilLOW = LOW;
83+
6484 #endif
--- branches/Speeduino/speeduino/scheduler.h (revision 22)
+++ branches/Speeduino/speeduino/scheduler.h (revision 23)
@@ -25,6 +25,7 @@
2525 #ifndef SCHEDULER_H
2626 #define SCHEDULER_H
2727
28+#define USE_IGN_REFRESH
2829 #define IGNITION_REFRESH_THRESHOLD 30 //Time in uS that the refresh functions will check to ensure there is enough time before changing the end compare
2930 #if defined(CORE_AVR)
3031 #include <avr/interrupt.h>
@@ -446,13 +447,14 @@
446447 unsigned int nextStartCompare;
447448 unsigned int nextEndCompare;
448449 volatile bool hasNextSchedule = false;
450+ volatile bool endScheduleSetByDecoder = false;
449451 #if defined(CORE_AVR)
450452 volatile uint16_t * counter;
451453 volatile uint16_t * compare;
452-#elif defined(CORE_STM32) || defined(CORE_TEENSY)
454+#else
453455 volatile uint32_t * counter;
454456 volatile uint32_t * compare;
455- #endif
457+#endif
456458 };
457459
458460 volatile Schedule *timer3Aqueue[4];
--- branches/Speeduino/speeduino/sensors.h (revision 22)
+++ branches/Speeduino/speeduino/sensors.h (revision 23)
@@ -3,7 +3,6 @@
33
44 #include "Arduino.h"
55
6-
76 // The following are alpha values for the ADC filters.
87 // Their values are from 0 to 255 with 0 being no filtering and 255 being maximum
98 #define ADCFILTER_TPS 128
@@ -17,6 +16,9 @@
1716 #define BARO_MIN 87
1817 #define BARO_MAX 108
1918
19+#define KNOCK_MODE_DIGITAL 1
20+#define KNOCK_MODE_ANALOG 2
21+
2022 /*
2123 #if defined(CORE_AVR)
2224 #define ANALOG_ISR
@@ -24,13 +26,21 @@
2426 */
2527
2628 volatile byte flexCounter = 0;
29+volatile byte knockCounter = 0;
30+volatile uint16_t knockAngle;
2731 volatile int AnChannel[15];
2832
2933 unsigned long MAPrunningValue; //Used for tracking either the total of all MAP readings in this cycle (Event average) or the lowest value detected in this cycle (event minimum)
3034 unsigned long EMAPrunningValue; //As above but for EMAP
3135 unsigned int MAPcount; //Number of samples taken in the current MAP cycle
32-uint16_t MAPcurRev; //Tracks which revolution we're sampling on
36+uint32_t MAPcurRev; //Tracks which revolution we're sampling on
37+bool auxIsEnabled;
3338
39+//These variables are used for tracking the number of running sensors values that appear to be errors. Once a threshold is reached, the sensor reading will go to default value and assume the sensor is faulty
40+byte mapErrorCount = 0;
41+byte iatErrorCount = 0;
42+byte cltErrorCount = 0;
43+
3444 /*
3545 * Simple low pass IIR filter macro for the analog inputs
3646 * This is effectively implementing the smooth filter from http://playground.arduino.cc/Main/Smooth
@@ -40,11 +50,18 @@
4050
4151 static inline void instanteneousMAPReading() __attribute__((always_inline));
4252 static inline void readMAP() __attribute__((always_inline));
53+void initialiseADC();
4354 void readTPS();
4455 void readO2_2();
4556 void flexPulse();
57+uint16_t readAuxanalog(uint8_t analogPin);
58+uint16_t readAuxdigital(uint8_t digitalPin);
59+void readCLT();
60+void readIAT();
61+void readO2();
62+void readBat();
63+void readBaro();
4664
47-
4865 #if defined(ANALOG_ISR)
4966 //Analog ISR interrupt routine
5067 /*
--- branches/Speeduino/speeduino/speeduino.h (revision 22)
+++ branches/Speeduino/speeduino/speeduino.h (revision 23)
@@ -1,8 +1,13 @@
11 #ifndef SPEEDUINO_H
22 #define SPEEDUINO_H
33
4-static inline unsigned int PW(int REQ_FUEL, byte VE, long MAP, int corrections, int injOpen) __attribute__((always_inline));
5-static inline byte getVE();
6-static inline byte getAdvance();
4+uint16_t PW(int REQ_FUEL, byte VE, long MAP, int corrections, int injOpen);
5+byte getVE();
6+byte getAdvance();
77
8+uint16_t calculateInjector2StartAngle(unsigned int);
9+uint16_t calculateInjector3StartAngle(unsigned int);
10+uint16_t calculateInjector4StartAngle(unsigned int);
11+uint16_t calculateInjector4StartAngle(unsigned int);
12+
813 #endif
--- branches/Speeduino/speeduino/storage.h (revision 22)
+++ branches/Speeduino/speeduino/storage.h (revision 23)
@@ -2,7 +2,7 @@
22 #define STORAGE_H
33
44 void writeAllConfig();
5-void writeConfig();
5+void writeConfig(byte);
66 void loadConfig();
77 void loadCalibration();
88 void writeCalibration();
@@ -56,8 +56,8 @@
5656 | 1441 |2 | X and Y size4 |
5757 | 1443 |36 | PAGE 9 MAP4 |
5858 | 1479 |6 | X and Y Bins4 |
59-| 1500 |128 | CANBUS config and data (Table 10_) |
60-| 1628 |192 | Table 11 - General settings |
59+| 1500 |192 | CANBUS config and data (Table 10_) |
60+| 1692 |192 | Table 11 - General settings |
6161 | |
6262 | 2559 |512 | Calibration data (O2) |
6363 | 3071 |512 | Calibration data (IAT) |
@@ -127,9 +127,9 @@
127127 #define EEPROM_CONFIG8_XBINS4 1689
128128 #define EEPROM_CONFIG8_YBINS4 1695
129129 #define EEPROM_CONFIG9_START 1710
130-#define EEPROM_CONFIG9_END 1838
131-#define EEPROM_CONFIG10_START 1838
132-#define EEPROM_CONFIG10_END 2030
130+#define EEPROM_CONFIG9_END 1902
131+#define EEPROM_CONFIG10_START 1902
132+#define EEPROM_CONFIG10_END 2094
133133
134134 //Calibration data is stored at the end of the EEPROM (This is in case any further calibration tables are needed as they are large blocks)
135135 #define EEPROM_LAST_BARO 2558
--- branches/Speeduino/speeduino/table.h (revision 22)
+++ branches/Speeduino/speeduino/table.h (revision 23)
@@ -3,7 +3,6 @@
33 */
44 #ifndef TABLE_H
55 #define TABLE_H
6-#include <Arduino.h>
76
87 #define TABLE_RPM_MULTIPLIER 100
98 #define TABLE_LOAD_MULTIPLIER 2
--- branches/Speeduino/speeduino/utils.h (revision 22)
+++ branches/Speeduino/speeduino/utils.h (revision 23)
@@ -8,6 +8,7 @@
88
99 uint16_t freeRam ();
1010 void setPinMapping(byte boardID);
11+void initialiseTriggers();
1112
1213 //This is dumb, but it'll do for now to get things compiling
1314 #if defined(CORE_STM32)