You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
687 B

#pragma once
#include <aidl/android/hardware/sensors/BnSensors.h>
#include "Sensor.h"
namespace aidl {
namespace android {
namespace hardware {
namespace sensors {
class AccelSensor : public Sensor {
public:
AccelSensor(int32_t sensorHandle, ISensorsEventCallback* callback);
protected:
float mCurEventData[3];
float mLastEventData[3];
virtual void readEventPayload(EventPayload& payload) override;
virtual void driverActivate(bool enable) override;
virtual void driverSetDelay(int64_t samplingPeriodNs) override;
virtual void dump(int fd) override;
void processEvent(int code, int value);
};
} // sensors
} // hardware
} // android
} // aidl