Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
ak7401ctrl.h
- Committer:
- masahikofukasawa
- Date:
- 2016-08-12
- Revision:
- 13:d008249f0359
- Parent:
- 10:5c69b067d88a
- Child:
- 23:50c98b286e41
- Child:
- 27:41aa9fb23a2f
File content as of revision 13:d008249f0359:
#ifndef AK7401CTRL_H #define AK7401CTRL_H #include "mbed.h" #include "SerialNano.h" #include "akmsensor.h" #include "ak7401.h" class Ak7401Ctrl : public AkmSensor { public: typedef enum { SUB_ID_AK7401 = 0x02, } SubIdAngleSensor; /** * Constructor. * */ Ak7401Ctrl(); /** * Destructor. * */ virtual ~Ak7401Ctrl(); virtual AkmSensor::Status init(const uint8_t id, const uint8_t subid); virtual bool isEvent(); virtual AkmSensor::Status startSensor(); virtual AkmSensor::Status startSensor(const float sec); virtual AkmSensor::Status stopSensor(); virtual AkmSensor::Status readSensorData(Message* msg); virtual Status requestCommand(Message* in, Message* out); virtual char* getSensorName(); void eventCallback(); private: bool event; uint8_t primaryId; uint8_t subId; char* sensorName; Ticker ticker; AK7401* ak7401; float interval; }; #endif