Class ImuDeviceRegistry¶
Defined in File imu_device_config.hpp
Class Documentation¶
-
class ImuDeviceRegistry¶
Registry of supported IMU devices.
This class provides a centralized registry for different IMU device configurations. It maintains device-specific settings including register addresses, scale factors, and configuration values for various IMU sensors (e.g., MPU6050, ICM20948). The registry follows a singleton pattern and lazy initialization to ensure device configurations are loaded only when needed.
Example usage:
auto config_opt = ImuDeviceRegistry::get_device_config("MPU6050"); if (config_opt) { // Use configuration for device initialization const auto& config = config_opt->get(); uint8_t who_am_i = config.who_am_i_value; }Public Static Functions¶
-
static std::optional<std::reference_wrapper<const ImuDeviceConfig>> get_device_config(const std::string &device_name)¶
Get device configuration by name.
-
static std::optional<std::reference_wrapper<const ImuDeviceConfig>> get_device_config(const std::string &device_name)¶