JanWielgus / JanWielgus/STM_FlightController

Create interfaces for gyro, acc, etc.. (sensors generally)

Open
#65 2 comments 0 reactions 1 assignee Claimed by @JanWielgus View on GitHub
enhancement idea
Dominant language
C++
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Create interfaces for sensors, but only for obtaining data and other things common if sensor would change (for example cannot be getReadings() method because MPU6050 has both gyro and acc readings but there could be two separate sensors)

Some example methods for 3 axis sensors (acc, gyro, for separate interface for each one!):
- getReadings(): vector3int
- getNormalizedReading(): vector3int
- calibrate(): void
- getCalibrationData(): vector3int

Sensors like barometer will have similar but separate interface for one axis data

In the end there is no need to use adapter design pattern for gyro and acc. AHRS could receive pointers to IGyro and IAccelerometer instances. This make code more flexible and less coupled.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.