Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
13 | mjames | 1 | |
2 | #pragma once |
||
3 | #include "stdint.h" |
||
4 | |||
5 | #if !defined WRITABLE_TABLE |
||
6 | #define CONST_ATTR const |
||
7 | #endif |
||
8 | |||
9 | |||
10 | // values multiplied by 10 in lookup table |
||
11 | #define TIMING_SCALE 10 |
||
12 | // number of RPM lookup values |
||
13 | #define MAX_RPM_POINTS 8 |
||
14 | // number of vacuum lookup points |
||
15 | #define MAX_VACUUM_POINTS 8 |
||
16 | // integer scaling factor for use with interpolation |
||
17 | #define INTERP_SCALE 256 |
||
18 | |||
19 | |||
20 | // no given data |
||
21 | #define NO_DATA -1 |
||
22 | |||
23 | #if defined __cplusplus |
||
24 | extern "C" |
||
25 | { |
||
26 | #endif |
||
27 | |||
28 | // Define a set of values to be held in the table |
||
29 | typedef struct |
||
30 | { |
||
31 | // row of column headings |
||
32 | int16_t rpmMap[MAX_RPM_POINTS]; |
||
33 | // column of row headings - in 1000-pressure |
||
34 | int16_t vacuumMap[MAX_VACUUM_POINTS]; |
||
35 | // Actual map values |
||
36 | uint8_t mapping[MAX_VACUUM_POINTS][MAX_RPM_POINTS]; |
||
37 | } timingTable_t; |
||
38 | |||
39 | extern timingTable_t CONST_ATTR baseTimingMap; |
||
40 | |||
41 | |||
42 | #if defined __cplusplus |
||
43 | } |
||
44 | #endif |