Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
ap1017ctrl.cpp
- Committer:
- tkstreet
- Date:
- 2017-04-14
- Revision:
- 25:76c11ab5060e
- Child:
- 26:4e436b0cbaf8
File content as of revision 25:76c11ab5060e:
#include "ap1017ctrl.h" #include "debug.h" Ap1017Ctrl::Ap1017Ctrl() { ap1017 = NULL; event = false; sensorName = ""; } Ap1017Ctrl::~Ap1017Ctrl() { if(ap1017) delete ap1017; } AkmSensor::Status Ap1017Ctrl::init(const uint8_t id, const uint8_t subid) { primaryId = id; subId = subid; switch (subId) { case SUB_ID_AP1017: ap1017 = new AP1017(); sensorName = "AP1017"; break; default: return AkmSensor::ERROR; } // TODO: Initialize ap1017 return AkmSensor::SUCCESS; } bool Ap1017Ctrl::isEvent() { return event; // No feedback: always false } AkmSensor::Status Ap1017Ctrl::startSensor() { return AkmSensor::SUCCESS; } AkmSensor::Status Ap1017Ctrl::startSensor(const float sec) { return AkmSensor::SUCCESS; } AkmSensor::Status Ap1017Ctrl::stopSensor() { return AkmSensor::SUCCESS; } AkmSensor::Status Ap1017Ctrl::readSensorData(Message* msg) { return AkmSensor::SUCCESS; } AkmSensor::Status Ap1017Ctrl::requestCommand(Message* in, Message* out) { return AkmSensor::SUCCESS; } char* Ap1017Ctrl::getSensorName() { return NULL; }