Add in return of the number of cycles added when bumping a bench test.
[freeems-vanilla.git] / src / main / inc / tableTypes.h
blob10a1e313c33a794f56df9113dff51a23b29caf78
1 /* FreeEMS - the open source engine management system
3 * Copyright 2008-2012 Fred Cooke
5 * This file is part of the FreeEMS project.
7 * FreeEMS software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * FreeEMS software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
20 * We ask that if you make any changes to this file you email them upstream to
21 * us at admin(at)diyefi(dot)org or, even better, fork the code on github.com!
23 * Thank you for choosing FreeEMS to run your engine!
27 /** @file
29 * @ingroup allHeaders
30 * @ingroup globalHeaders
31 * @ingroup dataStructures
33 * @brief Table struct typedefs
35 * This file contains all of the tabular struct typedefs.
39 /* Header file multiple inclusion protection courtesy eclipse Header Template */
40 /* and http://gcc.gnu.org/onlinedocs/gcc-3.1.1/cpp/ C pre processor manual */
41 #ifndef FILE_TABLE_TYPES_H_SEEN
42 #define FILE_TABLE_TYPES_H_SEEN
45 #define TWODTABLEUS_LENGTH 16
46 /// This block used for various curves
47 typedef struct {
48 unsigned short Axis[TWODTABLEUS_LENGTH];
49 unsigned short Values[TWODTABLEUS_LENGTH];
50 } twoDTableUS;
53 #define MAINTABLE_RPM_LENGTH 24 ///< How many cells on the X axis
54 #define MAINTABLE_LOAD_LENGTH 19 ///< How many cells on the Y axis
55 #define MAINTABLE_MAX_RPM_LENGTH 27 ///< Max number of cells on the X axis
56 #define MAINTABLE_MAX_LOAD_LENGTH 21 ///< Max number of cells on the Y axis
57 #define MAINTABLE_MAX_MAIN_LENGTH 462 ///< 924B 462 shorts maximum main table length
60 /** Main Table Structure definition
62 * Use this table descriptor to manage the
63 * - main VE table
64 * - Lambda table
65 * - Timing tables
67 * Tables can be made any size from 1x1 to 27x17 or 22x21 provided that the multiple of
68 * the two doesn't exceed the max main length and neither axis exceeds it's
69 * specified maximum.
71 * For a more detailed discussion of how this structure is actually used...
73 * @see lookupPagedMainTableCellValue
75 typedef struct {
76 unsigned short RPMLength; ///< The length of the RPM axis array
77 unsigned short LoadLength; ///< The length of the Load axis array
78 unsigned short RPM[MAINTABLE_MAX_RPM_LENGTH]; ///< The array of RPM (X) axis values
79 unsigned short Load[MAINTABLE_MAX_LOAD_LENGTH]; ///< The array of Load (Y) axis values
80 unsigned short Table[MAINTABLE_MAX_MAIN_LENGTH]; ///< The table as an array of values
81 } mainTable;
84 #else
85 /* let us know if we are being untidy with headers */
86 #warning "Header file TABLE_TYPES_H seen before, sort it out!"
87 /* end of the wrapper ifdef from the very top */
88 #endif