![]() |
OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
|
Types and constants used everywhere for firmware implementation. More...
Go to the source code of this file.
Classes | |
| struct | FakeInput |
| Fake input specification used for testing. More... | |
| struct | DeviceCapabilities |
| Set of device capabilities. More... | |
| class | BitQueue |
| Queue for 61 bits. More... | |
| struct | DecouplingEvent |
| Decoupling event. More... | |
| struct | BatteryStatus |
| Battery status. More... | |
| struct | BatteryStatusChrData |
| Data format for the Battery Level Status characteristic (packed) More... | |
| class | static_event< Args > |
| Publish-subscribe event (forever subscribed) More... | |
Macros | |
| #define | PRIVATE private |
| For testing. | |
| #define | PROTECTED protected |
| For testing. | |
| #define | CLUTCH_NONE_VALUE 0 |
| Value for a fully released clutch. | |
| #define | CLUTCH_FULL_VALUE 254 |
| Value for a fully engaged clutch. | |
| #define | CLUTCH_DEFAULT_VALUE 127 |
| Default bite point value. | |
| #define | CLUTCH_1_4_VALUE 64 |
| Value for 1/4 engaged clutch. | |
| #define | CLUTCH_3_4_VALUE 192 |
| Value for 3/4 engaged clutch. | |
| #define | CLUTCH_INVALID_VALUE 255 |
| Invalid clutch value used for masking. | |
| #define | INPUT_TASK_PRIORITY (tskIDLE_PRIORITY + 2) |
| Priority of background tasks. | |
| #define | MAX_DECOUPLING_EVENT_COUNT 64 |
| Queue size for decoupling events. | |
| #define | AUTO_POWER_OFF_DELAY_SECS 60 |
| Time to wait for connection before power off (in seconds) | |
Enumerations | |
| enum class | DeviceCapability : uint8_t { CLUTCH_BUTTON = 0 , CLUTCH_ANALOG = 1 , ALT = 2 , DPAD = 3 , BATTERY = 4 , BATTERY_CALIBRATION_AVAILABLE = 5 , TELEMETRY_POWERTRAIN = 6 , TELEMETRY_ECU = 7 , TELEMETRY_RACE_CONTROL = 8 , TELEMETRY_GAUGES = 9 , ROTARY_ENCODERS = 10 , TELEMETRY_WHEELS = 11 , _MAX_VALUE = TELEMETRY_WHEELS } |
| Enumeration of device capabilities. More... | |
| enum class | ClutchWorkingMode : uint8_t { CLUTCH = 0 , AXIS , ALT , BUTTON , LAUNCH_CONTROL_MASTER_LEFT , LAUNCH_CONTROL_MASTER_RIGHT , _MAX_VALUE = LAUNCH_CONTROL_MASTER_RIGHT , _DEFAULT_VALUE = CLUTCH } |
| User-selected working mode of the clutch paddles. More... | |
| enum class | AltButtonsWorkingMode : uint8_t { Regular = 0 , ALT , _MAX_VALUE = ALT , _DEFAULT_VALUE = ALT } |
| User-selected working mode of "ALT" buttons. More... | |
| enum class | PulseWidthMultiplier : uint8_t { X1 = 1 , X2 , X3 , X4 , X5 , X6 , _MAX_VALUE = X6 , _DEFAULT_VALUE = X2 } |
| User-selected pulse width multiplier. More... | |
| enum class | DPadWorkingMode : uint8_t { Regular = 0 , Navigation , _MAX_VALUE = Navigation , _DEFAULT_VALUE = Navigation } |
| User-selected working mode of directional pads. More... | |
| enum class | UserSetting : uint8_t { ALL = 0 , AXIS_CALIBRATION , AXIS_POLARITY , PULSE_WIDTH , SECURITY_LOCK , BITE_POINT , CLUTCH_WORKING_MODE , ALT_WORKING_MODE , DPAD_WORKING_MODE , INPUT_MAP , CUSTOM_HARDWARE_ID , BATTERY_AUTO_CALIBRATION , BATTERY_CALIBRATION_DATA , _MAX_VALUE = BATTERY_CALIBRATION_DATA } |
| User setting to be stored in flash memory. More... | |
| enum | SimpleCommand { CMD_RESERVED = 0 , CMD_AXIS_RECALIBRATE = 1 , CMD_BATT_RECALIBRATE = 2 , CMD_RESET_BUTTONS_MAP = 3 , CMD_SAVE_NOW = 4 , CMD_REVERSE_LEFT_AXIS = 5 , CMD_REVERSE_RIGHT_AXIS = 6 , CMD_SHOW_PIXELS = 7 , CMD_RESET_PIXELS = 8 , _MAX_VALUE = 8 } |
| Simple commands accepted from a feature HID report. More... | |
Variables | |
| static_event | OnStart |
| System startup. | |
| static_event | OnShutdown |
| The system is about to shutdown. | |
| static_event | OnDisconnected |
| No host connection. | |
| static_event | OnConnected |
| Host connection. | |
| static_event< uint8_t > | OnBitePoint |
| New bite point. | |
| static_event< ClutchWorkingMode > | OnClutchWorkingMode |
| New clutch working mode. | |
| static_event< AltButtonsWorkingMode > | OnAltButtonsWorkingMode |
| New ALT buttons working mode. | |
| static_event | OnDPadWorkingMode |
| New DPAD working mode. | |
| static_event | OnSettingsSaved |
| Save event. | |
| static_event< PulseWidthMultiplier > | OnPulseWidthMultiplier |
| New pulse width multiplier. | |
| static_event | OnLowBattery |
| Notified when a low battery condition is detected. | |
| static_event< const BatteryStatus & > | OnBatteryStatus |
| New battery level (state of charge) or battery status. | |
| static_event< UserSetting > | LoadSetting |
| Request to load a user setting. | |
| static_event< UserSetting > | SaveSetting |
| Request to save a user setting. | |
Types and constants used everywhere for firmware implementation.
Definition in file InternalTypes.hpp.
| #define AUTO_POWER_OFF_DELAY_SECS 60 |
Time to wait for connection before power off (in seconds)
Definition at line 747 of file InternalTypes.hpp.
| #define CLUTCH_1_4_VALUE 64 |
Value for 1/4 engaged clutch.
Definition at line 202 of file InternalTypes.hpp.
| #define CLUTCH_3_4_VALUE 192 |
Value for 3/4 engaged clutch.
Definition at line 204 of file InternalTypes.hpp.
| #define CLUTCH_DEFAULT_VALUE 127 |
Default bite point value.
Definition at line 200 of file InternalTypes.hpp.
| #define CLUTCH_FULL_VALUE 254 |
Value for a fully engaged clutch.
Definition at line 198 of file InternalTypes.hpp.
| #define CLUTCH_INVALID_VALUE 255 |
Invalid clutch value used for masking.
Definition at line 206 of file InternalTypes.hpp.
| #define CLUTCH_NONE_VALUE 0 |
Value for a fully released clutch.
Definition at line 196 of file InternalTypes.hpp.
| #define INPUT_TASK_PRIORITY (tskIDLE_PRIORITY + 2) |
Priority of background tasks.
Definition at line 272 of file InternalTypes.hpp.
| #define MAX_DECOUPLING_EVENT_COUNT 64 |
Queue size for decoupling events.
Definition at line 361 of file InternalTypes.hpp.
| #define PRIVATE private |
For testing.
Definition at line 25 of file InternalTypes.hpp.
| #define PROTECTED protected |
For testing.
Definition at line 27 of file InternalTypes.hpp.
|
strong |
User-selected working mode of "ALT" buttons.
| Enumerator | |
|---|---|
| Regular | Regular button. |
| ALT | Engage or disengage alternate mode. |
Definition at line 216 of file InternalTypes.hpp.
|
strong |
User-selected working mode of the clutch paddles.
Definition at line 177 of file InternalTypes.hpp.
|
strong |
Enumeration of device capabilities.
Definition at line 96 of file InternalTypes.hpp.
|
strong |
User-selected working mode of directional pads.
| Enumerator | |
|---|---|
| Regular | Regular button. |
| Navigation | Navigation control. |
Definition at line 254 of file InternalTypes.hpp.
|
strong |
User-selected pulse width multiplier.
Definition at line 234 of file InternalTypes.hpp.
| enum SimpleCommand |
Simple commands accepted from a feature HID report.
Definition at line 757 of file InternalTypes.hpp.
|
strong |
User setting to be stored in flash memory.
Definition at line 483 of file InternalTypes.hpp.
|
inline |
Request to load a user setting.
Definition at line 731 of file InternalTypes.hpp.
|
inline |
New ALT buttons working mode.
Definition at line 694 of file InternalTypes.hpp.
|
inline |
New battery level (state of charge) or battery status.
Definition at line 725 of file InternalTypes.hpp.
|
inline |
New bite point.
Definition at line 682 of file InternalTypes.hpp.
|
inline |
New clutch working mode.
Definition at line 688 of file InternalTypes.hpp.
|
inline |
Host connection.
Definition at line 676 of file InternalTypes.hpp.
|
inline |
No host connection.
Definition at line 670 of file InternalTypes.hpp.
|
inline |
New DPAD working mode.
Definition at line 700 of file InternalTypes.hpp.
|
inline |
Notified when a low battery condition is detected.
Definition at line 719 of file InternalTypes.hpp.
|
inline |
New pulse width multiplier.
Definition at line 712 of file InternalTypes.hpp.
|
inline |
Save event.
Definition at line 706 of file InternalTypes.hpp.
|
inline |
The system is about to shutdown.
Definition at line 663 of file InternalTypes.hpp.
|
inline |
|
inline |
Request to save a user setting.
Definition at line 737 of file InternalTypes.hpp.