Skip to content

sensors without FIFO #1

Closed
Closed
@PaulStoffregen

Description

@PaulStoffregen

availableGyroscope() should be required.

Sensors without a FIFO should have their available functions return 1 when the sensor has produced a new measurement since the most recent read, or 0 if no new measurement has been completed where reading again would give duplicate data.

Filter algorithms which accumulate need to be able to know whether the read is the same data they previously used, so they don't double count anything. This is always done with gyroscope data, so it's really important for the API to not allow a default 1 return for availableGyroscope(). Some advanced algorithms may also accumulate accelerometer data, but Madgwick does not. As far as I know, this isn't important for magnetometer data.

The sampleRateGyroscope() function should probably also be required, without a default. The data just isn't usable if this info is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions