![]() |
Speeduino
|
#include "table2d.h"#include "table3d.h"#include "statuses.h"#include "config_pages.h"#include "atomic.h"#include "src/pins/pinNumbers_t.h"
Go to the source code of this file.
Typedefs | |
| using | trimTable3d = table3d6RpmLoad |
Functions | |
| bool | pinIsOutput (byte pin) |
| bool | pinIsUsed (byte pin) |
Variables | |
| constexpr uint8_t | TOOTH_LOG_SIZE = 127U |
| struct table3d16RpmLoad | fuelTable |
| 16x16 fuel map | |
| struct table3d16RpmLoad | fuelTable2 |
| 16x16 fuel map | |
| struct table3d16RpmLoad | ignitionTable |
| 16x16 ignition map | |
| struct table3d16RpmLoad | ignitionTable2 |
| 16x16 ignition map | |
| struct table3d16RpmLoad | afrTable |
| 16x16 afr target map | |
| struct table3d8RpmLoad | stagingTable |
| 8x8 fuel staging table | |
| struct table3d8RpmLoad | boostTable |
| 8x8 boost map | |
| struct table3d8RpmLoad | boostTableLookupDuty |
| 8x8 boost map lookup table | |
| struct table3d8RpmLoad | vvtTable |
| 8x8 vvt map | |
| struct table3d8RpmLoad | vvt2Table |
| 8x8 vvt2 map | |
| struct table3d8RpmLoad | wmiTable |
| 8x8 wmi map | |
| trimTable3d | trimTables [INJ_CHANNELS] |
| struct table3d4RpmLoad | dwellTable |
| 4x4 Dwell map | |
| uint8_t | softLimitTime |
| volatile uint16_t | mainLoopCount |
| volatile unsigned long | ms_counter |
| uint16_t | fixedCrankingOverride |
| volatile uint32_t | toothHistory [TOOTH_LOG_SIZE] |
| Tooth trigger history - delta time (in uS) from last tooth (Indexed by toothHistoryIndex) | |
| volatile uint8_t | compositeLogHistory [TOOTH_LOG_SIZE] |
| volatile unsigned int | toothHistoryIndex |
| Current index to toothHistory array. | |
| unsigned long | currentLoopTime |
| volatile uint16_t | ignitionCount |
| The number of crank degrees that the system track over. Typically 720 divided by the number of squirts per cycle (Eg 360 for wasted 2 squirt and 720 for sequential single squirt) | |
| volatile uint32_t | runSecsX10 |
| volatile uint32_t | seclx10 |
| pinNumbers_t | pinNumbers |
| struct statuses | currentStatus |
| struct config2 | configPage2 |
| struct config4 | configPage4 |
| struct config6 | configPage6 |
| struct config9 | configPage9 |
| struct config10 | configPage10 |
| struct config13 | configPage13 |
| struct config15 | configPage15 |
| Immediately below max RPM, there is a range within which we can apply a rolling cut. | |
Global defines, macros, struct definitions (statuses, config2, config4, config*), extern-definitions (for globally accessible vars).
Once the struct members have been assigned to certain "role" (in certain SW version), they should not be "moved around" as the structs are stored onto EEPROM as-is and the offset and size of member needs to remain constant. Also removing existing struct members would disturb layouts. Because of this a certain amount unused old members will be left into the structs. For the storage related reasons also the bit fields are defined in byte-size (or multiple of ...) chunks.
The config* structures contain information coming from tuning SW (e.g. TS) for 2D and 3D tables, where looked up value is not a result of direct array lookup, but from interpolation algorithm. Because of standard, reusable interpolation routines associated with structs table2D and table3D, the values from config are copied from config* structs to table2D (table3D destined configurations are not stored in config* structures).
There's a C-preprocessor based "#if defined" logic present in this header file based on the Arduino IDE compiler set CPU (+board?) type, e.g. __AVR_ATmega2560__. This respectively drives (withi it's "#if defined ..." block):
| using trimTable3d = table3d6RpmLoad |
| bool pinIsOutput | ( | byte | pin | ) |


| bool pinIsUsed | ( | byte | pin | ) |


|
extern |
16x16 afr target map
|
extern |
8x8 boost map
|
extern |
8x8 boost map lookup table
|
extern |
|
externconstexpr |
|
extern |
|
extern |
Immediately below max RPM, there is a range within which we can apply a rolling cut.
The rolling cut table defines a series of relative negative RPM offsets that define the window and percent cut for each offset. I.e. RPM 0---------------------—|++++++++++++++++++++|<- max RPM | rolling cut window |
|
extern |
|
extern |
|
externconstexpr |
|
extern |
|
extern |
The time (in uS) that the current mainloop started
|
extern |
The master global "live" status struct. Contains all values that are updated frequently and used across modules
|
extern |
4x4 Dwell map
|
extern |
|
extern |
16x16 fuel map
|
extern |
16x16 fuel map
|
extern |
The number of crank degrees that the system track over. Typically 720 divided by the number of squirts per cycle (Eg 360 for wasted 2 squirt and 720 for sequential single squirt)
The count of ignition events that have taken place since the engine started
|
extern |
16x16 ignition map
|
extern |
16x16 ignition map
|
extern |
|
extern |
|
extern |
|
extern |
Counter of seconds since cranking commenced (similar to runSecs) but in increments of 0.1 seconds
|
extern |
Counter of seconds since powered commenced (similar to secl) but in increments of 0.1 seconds
|
extern |
|
extern |
8x8 fuel staging table
|
constexpr |
|
extern |
Tooth trigger history - delta time (in uS) from last tooth (Indexed by toothHistoryIndex)
|
extern |
Current index to toothHistory array.
|
extern |
|
extern |
8x8 vvt2 map
|
extern |
8x8 vvt map
|
extern |
8x8 wmi map