Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4faa8c70 authored by Ashutosh Joshi's avatar Ashutosh Joshi
Browse files

Add the uncalibrated accelerometer sensor type.

Adding the uncalibrated accelerometer sensor.

Test: Update makefiles.
Change-Id: I7f6bc3ce69264b698836946bf9fb820ce9959b01
parent 06fe970b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ void convertFromSensorEvent(const sensors_event_t &src, Event *dst) {

        case SensorType::SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED:
        case SensorType::SENSOR_TYPE_GYROSCOPE_UNCALIBRATED:
        case SensorType::SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED:
        {
            dst->u.uncal.x = src.uncalibrated_gyro.x_uncalib;
            dst->u.uncal.y = src.uncalibrated_gyro.y_uncalib;
@@ -243,6 +244,7 @@ void convertToSensorEvent(const Event &src, sensors_event_t *dst) {

        case SensorType::SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED:
        case SensorType::SENSOR_TYPE_GYROSCOPE_UNCALIBRATED:
        case SensorType::SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED:
        {
            dst->uncalibrated_gyro.x_uncalib = src.u.uncal.x;
            dst->uncalibrated_gyro.y_uncalib = src.u.uncal.y;
+14 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ enum SensorType : int32_t {
     * reporting-mode: continuous
     *
     * All values are in SI units (m/s^2) and measure the acceleration of the
     * device minus the force of gravity.
     * device minus the acceleration due to gravity.
     *
     * Implement the non-wake-up version of this sensor and implement the
     * wake-up version if the system possesses a wake up fifo.
@@ -696,6 +696,18 @@ enum SensorType : int32_t {
     */
    SENSOR_TYPE_LOW_LATENCY_OFFBODY_DETECT      = 34,

    /*
     * SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED
     * reporting-mode: continuous
     *
     * All values are in SI units (m/s^2) and measure the acceleration of the
     * device minus the acceleration due to gravity.
     *
     * Implement the non-wake-up version of this sensor and implement the
     * wake-up version if the system possesses a wake up fifo.
     */
    SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED      = 35,

    /*
     * Base for device manufacturers private sensor types.
     * These sensor types can't be exposed in the SDK.
@@ -1037,6 +1049,7 @@ union EventPayload {

    /* SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED,
     * SENSOR_TYPE_GYROSCOPE_UNCALIBRATED
     * SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED
     */
    Uncal uncal;