Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
ak7401ctrl.h
- Committer:
- masahikofukasawa
- Date:
- 2017-03-17
- Revision:
- 29:b488d2c89fba
- Parent:
- 27:41aa9fb23a2f
- Child:
- 34:1ea3357c8d9a
File content as of revision 29:b488d2c89fba:
#ifndef AK7401CTRL_H #define AK7401CTRL_H #include "mbed.h" #include "SerialNano.h" #include "akmsensor.h" #include "ak7401.h" class Ak7401Ctrl : public AkmSensor { public: typedef AkmSensor base; 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 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); private: Ticker ticker; AK7401* ak7401; float interval; }; #endif