Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
Diff: akmsensormanager.h
- Revision:
- 27:41aa9fb23a2f
- Parent:
- 16:d85be9bafb80
- Child:
- 29:b488d2c89fba
--- a/akmsensormanager.h Wed Feb 22 21:56:05 2017 +0000 +++ b/akmsensormanager.h Sat Mar 11 01:14:15 2017 +0000 @@ -11,6 +11,7 @@ #define ANALOG_SENSOR_ID P0_4 #define ANALOG_SENSOR_ID_SUB P0_5 +#define MAX_SENSOR_NUM 5 class AkmSensorManager { public: @@ -37,12 +38,13 @@ private: - AkmSensor* sensor; + AkmSensor* sensor[MAX_SENSOR_NUM]; SerialNano* serial; UARTService* uartService; Message msg; Timeout t; + uint8_t currentSensorNumber; uint8_t primaryId; uint8_t subId; bool isEnabledBle; @@ -53,10 +55,11 @@ char userCommand[20]; - AkmSensor* getAkmSensor(); + bool checkAkmSensor(); void dataOut(char* str); int16_t getAdcData(MCP342X *mcp3428, MCP342X::AdcChannel ch, MCP342X::SampleSetting s); void dummyCallbackForCommandReceived(); + char* my_strcat(char* str1, char* str2); }; #endif // AKMSENSORMANAGER_H