Speeduino
Loading...
Searching...
No Matches
storage_details.h
Go to the documentation of this file.
1#pragma once
2#include "storage.h"
3#include "sensors.h"
4#include "pages.h"
5
7
8// Exposed for unit testing
9namespace storage {
10
11namespace details {
12
17};
18
20{
22 return sizeof(uint32_t);
23 }
26 return sizeof(decltype(cltCalibrationTable)::values);
27 }
29 return sizeof(decltype(cltCalibrationTable)::axis);
30 }
31 }
34 return sizeof(decltype(iatCalibrationTable)::values);
35 }
37 return sizeof(decltype(iatCalibrationTable)::axis);
38 }
39 }
42 return sizeof(decltype(o2CalibrationTable)::values);
43 }
45 return sizeof(decltype(o2CalibrationTable)::axis);
46 }
47 }
48
49 return 0; // Fail safe
50}
51}
52
53}
SensorCalibrationTable
Enum to identify sensor calibration tables.
Definition storage.h:92
@ O2Sensor
The Oxygen (O2) sensor calibration curve.
@ CoolantSensor
The coolant sensor calibration curve.
@ IntakeAirTempSensor
Intake Air Temperature (IAT) sensor calibration curve.
constexpr uint8_t PAGE_IDX_CALIBRATION_VALUES
Index of a calibration table values on a "page".
Definition pages.h:39
constexpr uint8_t PAGE_IDX_CALIBRATION_CRC
Index of a calibration table CRC on a "page".
Definition pages.h:38
constexpr uint8_t PAGE_IDX_CALIBRATION_BINS
Index of a calibration table bins on a "page".
Definition pages.h:40
table2D_u16_u8_32 cltCalibrationTable
table2D_u16_u8_32 o2CalibrationTable
table2D_u16_u8_32 iatCalibrationTable
Functions for reading and writing user settings to/from EEPROM.
Definition array.h:14
constexpr array()=default