Updated all .h, .x and .s files with new "please give us your changes" lines.
[freeems-vanilla.git] / src / inc / TunableConfigs.h
blobc050175dbbb1a55b881a1da1a94af2b94de05d15
1 /** @file TunableConfigs.h
3 Copyright 2008 Fred Cooke
5 This file contains both the struct data type definitions and the arrays of
6 default values for small tables. Place reusable definitions of default table
7 values in here such that they can be used in multiple tunable table definitions.
9 You should add your configuration item here if it is best that it is adjusted with
10 instant results on a running engine. For everything else, please consider placing
11 it in one of the fixed configuration structs.
13 This file is part of the FreeEMS project.
15 FreeEMS software is free software: you can redistribute it and/or modify
16 it under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
20 FreeEMS software is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
25 You should have received a copy of the GNU General Public License
26 along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
28 We ask that if you make any changes to this file you email them upstream to
29 us at admin(at)diyefi(dot)org or, even better, fork the code on github.com!
31 Thank you for choosing FreeEMS to run your engine! */
34 /* Header file multiple inclusion protection courtesy eclipse Header Template */
35 /* and http://gcc.gnu.org/onlinedocs/gcc-3.1.1/cpp/ C pre processor manual */
36 #ifndef FILE_TUNABLE_CONFIGS_H_SEEN
37 #define FILE_TUNABLE_CONFIGS_H_SEEN
40 /** An array of 16 zeros to fill out currently unused tables. */
41 #define ARRAY_OF_16_ZEROS { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
42 /** An array of 16 scaled voltages for use as axes. */
43 #define ARRAY_OF_16_VOLTAGES { 6000, 7200, 8400, 9000, 9600, 10200, 10800, 11400, 12000, 12600, 13200, 13800, 14400, 17800, 21000, 24500}
44 /** An array of 16 dwell times in native ticks. */
45 #define ARRAY_OF_16_DWELLS {10913, 8625, 6975, 6375, 5925, 5513, 5213, 4875, 4613, 4313, 4106, 3900, 3713, 2850, 2138, 1500}
46 /** An array of 16 injector dead times in native ticks. */
47 #define ARRAY_OF_16_DEADTIMES { 3638, 2875, 2325, 2125, 1975, 1838, 1738, 1625, 1538, 1438, 1369, 1300, 1238, 950, 713, 500}
48 /** Any array of 16 RPM values forAxis values for use as axes. TODO fill out values */
49 #define ARRAY_OF_16_RPMS { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
50 /** An array of 6 percentage fuel trims, the value is 100%. */
51 #define ARRAY_OF_6_FUEL_TRIMS {32768, 32768, 32768, 32768, 32768, 32768}
54 /**
55 * One of four structs of live tunable data such as small tables and fuel trims
56 * etc. If you add something here, please ensure you update all of the following :
57 * - Default values in the initial definitions in TunableConfig.c and TunableConfig2.c
58 * - The address values within the initPagedRAMTune() function in init.c
59 * - The lookupBlockDetails() function in blockDetailsLookup.c
60 * - The JSON data map and other related firmware interface definition files
62 * @todo TODO add doxy comments for each element of the struct
64 typedef struct {
65 twoDTableUS dwellDesiredVersusVoltageTable;
66 twoDTableUS injectorDeadTimeTable;
67 twoDTableUS postStartEnrichmentTable;
68 twoDTableUS engineTempEnrichmentTableFixed;
69 /// @todo TODO define units. perhaps micro litres (cubic milli meters) would be good, 5 - 100 seem to be the norm 327.68 = 65535/200
70 twoDTableUS primingVolumeTable;
71 twoDTableUS engineTempEnrichmentTablePercent;
72 twoDTableUS dwellMaxVersusRPMTable;
73 unsigned char filler[576];
74 } SmallTables1;
77 /** @copydoc SmallTables1 */
78 typedef struct {
79 unsigned short perCylinderFuelTrims[INJECTION_CHANNELS]; /* Trims for injection, from 0% to 200% of base */
80 unsigned char filler[1012];
81 } SmallTables2;
84 /** @copydoc SmallTables1 */
85 typedef struct {
86 unsigned char filler[1024];
87 } SmallTables3;
90 /** @copydoc SmallTables1 */
91 typedef struct {
92 unsigned char filler[1024];
93 } SmallTables4;
96 #else
97 /* let us know if we are being untidy with headers */
98 #warning "Header file TUNABLE_CONFIGS_H seen before, sort it out!"
99 /* end of the wrapper ifdef from the very top */
100 #endif