Declaration of the Pedal class for handling throttle and brake pedal inputs. More...
#include <stdint.h>#include "CarState.hpp"#include "Interp.hpp"#include "Curves.hpp"#include "SignalProcessing.hpp"#include <mcp2515.h>Go to the source code of this file.
Classes | |
| class | Pedal |
| Pedal class for managing throttle and brake pedal inputs. Handles filtering, fault detection, and CAN frame updates. More... | |
Namespaces | |
| namespace | PedalConstants |
| Namespace for pedal-related constants, such as thresholds and calculation parameters. This is to avoid polluting the Pedal class with intermediate results. | |
Variables | |
| constexpr bool | REGEN_ENABLED = true |
| constexpr bool | FLIP_MOTOR_DIR = false |
| constexpr bool | BRAKE_RELIABLE = true |
| constexpr uint16_t | FAULT_CHECK_HEX = BRAKE_RELIABLE ? 0xFE : 0x3E |
| constexpr uint32_t | MAX_MOTOR_READ_MILLIS = 100 |
| constexpr uint8_t | PedalConstants::MIN_REGEN_KMH = 10 |
| constexpr uint8_t | PedalConstants::GEAR_RATIO_NUMERATOR = 60 |
| constexpr uint8_t | PedalConstants::GEAR_RATIO_DENOMINATOR = 13 |
| constexpr uint8_t | PedalConstants::WHEEL_DIAMETER_INCH = 13 |
| constexpr uint16_t | PedalConstants::MAX_MOTOR_RPM = 7000 |
| constexpr uint16_t | PedalConstants::MAX_TORQUE_VAL = 32767 |
| constexpr uint16_t | PedalConstants::INCH_PER_KM = 39370 |
| constexpr uint8_t | PedalConstants::MINUTES_PER_HOUR = 60 |
| constexpr double | PedalConstants::PI_ = 3.1415926535897932384626433832795 |
| constexpr int16_t | PedalConstants::MIN_REGEN_RPM_VAL |
| constexpr uint8_t | ADC_BUFFER_SIZE = 16 |
Declaration of the Pedal class for handling throttle and brake pedal inputs.
Definition in file Pedal.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
Hex mask for fault checking based on brake reliability.
Definition at line 34 of file Pedal.hpp.
Referenced by Pedal::update().
|
constexpr |
Boolean toggle to flip motor direction; true inverts torque commands.
Definition at line 30 of file Pedal.hpp.
Referenced by Pedal::sendFrame().
|
constexpr |
Maximum time in milliseconds between motor data reads before disabling regen.
Definition at line 36 of file Pedal.hpp.
Referenced by Pedal::readMotor().
|
constexpr |
Boolean toggle for regenerative braking; false disables reverse torque.
Definition at line 28 of file Pedal.hpp.
Referenced by Pedal::pedalTorqueMapping().