Skip to content

Commit 1c9bfed

Browse files
committed
move consts out of headers and into c files
1 parent 28fbf0e commit 1c9bfed

14 files changed

+24
-20
lines changed

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "MetaWear C++ API"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 0.20.5
41+
PROJECT_NUMBER = 0.20.6
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ dist/
7575
└── lib
7676
└── x64
7777
├── libmetawear.so -> libmetawear.so.0
78-
├── libmetawear.so.0 -> libmetawear.so.0.20.5
79-
└── libmetawear.so.0.20.5
78+
├── libmetawear.so.0 -> libmetawear.so.0.20.6
79+
└── libmetawear.so.0.20.6
8080

8181
```
8282

project_version.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=0.20.5
1+
VERSION=0.20.6
22
VERSION_MAJOR=0
33
VERSION_MINOR=20
4-
VERSION_STEP=5
4+
VERSION_STEP=6

src/metawear/core/metawearboard.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#include "metawear/platform/btle_connection.h"
1616
#include "metawear/platform/dllmarker.h"
1717

18-
/** Constant signifying a module is not available */
19-
const int32_t MBL_MW_MODULE_TYPE_NA = -1;
20-
2118
#ifdef __cplusplus
2219
extern "C" {
2320
#endif

src/metawear/impl/cpp/metawearboard.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
using namespace std;
6060
using namespace std::chrono;
6161

62+
/** Constant signifying a module is not available */
63+
const int32_t MBL_MW_MODULE_TYPE_NA = -1;
6264
const uint8_t CARTESIAN_FLOAT_SIZE= 6;
6365
const uint16_t MAX_TIME_PER_RESPONSE= 4000;
6466

src/metawear/sensor/accelerometer_bosch.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
extern "C" {
1515
#endif
1616

17-
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI160 = 1; ///< Constant identifying the BMI160 accelerometer module type
18-
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMA255 = 3; ///< Constant identifying the BMA255 accelerometer module type
19-
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI270 = 4; ///< Constant identifying the BMI270 accelerometer module type
20-
2117
/**
2218
* Available wrist gestures on the BMI270
2319
*/

src/metawear/sensor/accelerometer_mma8452q.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
extern "C" {
1313
#endif
1414

15-
const uint8_t MBL_MW_MODULE_ACC_TYPE_MMA8452Q = 0; ///< Constant identifying the MMA8452Q accelerometer type
16-
1715
/*
1816
typedef enum {
1917
MBL_MW_ACC_MMA8452Q_AXIS_X,

src/metawear/sensor/barometer_bosch.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
extern "C" {
1515
#endif
1616

17-
const uint8_t MBL_MW_MODULE_BARO_TYPE_BMP280 = 0; ///< Constant identifying the BMP280 barometer module type
18-
const uint8_t MBL_MW_MODULE_BARO_TYPE_BME280 = 1; ///< Constant identifying the BME280 barometer module type
19-
2017
/**
2118
* Supported oversampling modes on the Bosch barometers
2219
*/

src/metawear/sensor/cpp/accelerometer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ const float INVALID_SETTING= -1;
1818
using std::stringstream;
1919
using std::vector;
2020

21+
const uint8_t MBL_MW_MODULE_ACC_TYPE_MMA8452Q = 0; ///< Constant identifying the MMA8452Q accelerometer type
22+
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI160 = 1; ///< Constant identifying the BMI160 accelerometer module type
23+
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMA255 = 3; ///< Constant identifying the BMA255 accelerometer module type
24+
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI270 = 4; ///< Constant identifying the BMI270 accelerometer module type
25+
2126
static const vector<float> MMA8452Q_ODR_VALUES= {800.f, 400.f, 200.f, 100.f, 50.f, 12.5f, 6.25f, 1.56f},
2227
MMA8452Q_FSR_VALUES= {2.f, 4.f, 8.f},
2328
BMI270_ODR_VALUES= {0.78125f, 1.5625f, 3.125f, 6.25f, 12.5f, 25.f, 50.f, 100.f, 200.f, 400.f, 800.f, 1600.f},

src/metawear/sensor/cpp/accelerometer_bosch.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ using std::vector;
3232
FirmwareConverter::BOSCH_ACCELERATION, channels, 2, 1, offset)
3333
#define GET_CONFIG(x) ((x*) board->module_config.at(MBL_MW_MODULE_ACCELEROMETER))
3434

35+
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI160 = 1; ///< Constant identifying the BMI160 accelerometer module type
36+
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMA255 = 3; ///< Constant identifying the BMA255 accelerometer module type
37+
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI270 = 4; ///< Constant identifying the BMI270 accelerometer module type
38+
3539
const uint8_t BMI270_DEFAULT_CONFIG[]= {
3640
0xa8, 0x02, // acc range
3741
0x00, // feature enable

0 commit comments

Comments
 (0)