SlimeVR / SlimeVR-Tracker-ESP

SlimeVR tracker firmware for ESP32/ESP8266 and different IMUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a guide for adding new sensor types?

moe001 opened this issue · comments

I want to use some sensor chip that is not on the supported list, how do I add support for it and keep the code clear? What are the source code changes that must be made?

There is currently no documentation that shows what code needs to be changed / added to add a new sensor.

I think short:

  1. Look for a lib that works with the sensor and our license. (output accel and or quat, or unfused data)
  2. Add a #define in src/consts.h for the new IMU
  3. Create a src/sensors/*sensor.h src/sensors/*sensor.cpp for your new sensor.
  4. If you need to add stuff in src/configuration/CalibrationConfig.h src/configuration/CalibrationConfig.cpp and src/configuration/Configuration.cpp
  5. Add in src/sensors/SensorManager.cpp the check for the new Sensor
  6. Write README.md