Definition of throttle and brake mapping tables. More...
Go to the source code of this file.
Macros | |
| #define | APPS_RATIO 53 / 34 |
| Ratio between 5V APPS and 3.3V APPS, use integer math to avoid float operations. Expanded to apps_scaled = apps_3v3 * APPS_RATIO. | |
Variables | |
| constexpr uint16_t | APPS_5V_MIN = 50 |
| constexpr uint16_t | APPS_5V_MAX = 950 |
| constexpr uint16_t | APPS_3V3_MIN = 50 |
| constexpr uint16_t | APPS_3V3_MAX = 950 |
| constexpr TablePoint< uint16_t, int16_t > | CURVE_TABLE [5] |
| Throttle mapping table. | |
| constexpr uint16_t | brake_min = 50 |
| constexpr uint16_t | brake_max = 950 |
| constexpr TablePoint< uint16_t, int16_t > | BRAKE_TABLE [5] |
| Brake mapping table, negative values for regen. | |
| constexpr TablePoint< uint16_t, uint16_t > | APPS_3V3_SCALE_TABLE [3] |
| APPS_3V3 mapping table, maps 3V3 readings to 5V readings. | |
| constexpr TablePoint< uint16_t, uint16_t > | APPS_5V_PERCENT_TABLE [2] |
| APPS_5V to percent mapping table, maps 5V readings to percent throttle (0-60000) | |
| constexpr TablePoint< uint16_t, uint16_t > | APPS_5V_TABLE_INVERTED [2] |
| APPS percent mapping table, maps APPS percentage to 5V readings. | |
| constexpr LinearInterp< uint16_t, uint16_t, uint32_t, 2 > | APPS_5V_TABLE_INVERTED_MAP {APPS_5V_TABLE_INVERTED} |
| LinearInterp for APPS_5V_TABLE_INVERTED, used to get APPS reading from a desired percentage. | |
| constexpr TablePoint< uint16_t, int16_t > | THROTTLE_TABLE [5] |
| Throttle mapping table (calculated), maps APPS_5V readings to torque values. | |
Definition of throttle and brake mapping tables.
Definition in file Curves.hpp.
| #define APPS_RATIO 53 / 34 |
Ratio between 5V APPS and 3.3V APPS, use integer math to avoid float operations. Expanded to apps_scaled = apps_3v3 * APPS_RATIO.
Definition at line 28 of file Curves.hpp.
|
constexpr |
value above which apps_3v3 is considered shorted to rail
Definition at line 21 of file Curves.hpp.
Referenced by Pedal::update().
|
constexpr |
value below which apps_3v3 is considered shorted to ground
Definition at line 20 of file Curves.hpp.
Referenced by Pedal::update().
|
constexpr |
APPS_3V3 mapping table, maps 3V3 readings to 5V readings.
Definition at line 58 of file Curves.hpp.
|
constexpr |
value above which apps_5v is considered shorted to rail
Definition at line 18 of file Curves.hpp.
Referenced by Pedal::update().
|
constexpr |
value below which apps_5v is considered shorted to ground
Definition at line 17 of file Curves.hpp.
Referenced by Pedal::update().
|
constexpr |
APPS_5V to percent mapping table, maps 5V readings to percent throttle (0-60000)
Definition at line 66 of file Curves.hpp.
Referenced by Pedal::checkPedalFault().
|
constexpr |
APPS percent mapping table, maps APPS percentage to 5V readings.
Definition at line 75 of file Curves.hpp.
|
constexpr |
LinearInterp for APPS_5V_TABLE_INVERTED, used to get APPS reading from a desired percentage.
Definition at line 83 of file Curves.hpp.
|
constexpr |
value above which brake is considered shorted to rail
Definition at line 43 of file Curves.hpp.
Referenced by Pedal::update().
|
constexpr |
value below which brake is considered shorted to ground
Definition at line 42 of file Curves.hpp.
Referenced by Pedal::update().
|
constexpr |
Brake mapping table, negative values for regen.
Definition at line 48 of file Curves.hpp.
|
constexpr |
Throttle mapping table.
Definition at line 33 of file Curves.hpp.
|
constexpr |
Throttle mapping table (calculated), maps APPS_5V readings to torque values.
Definition at line 89 of file Curves.hpp.
Referenced by loop().