|
8 | 8 | #include <typeinfo>
|
9 | 9 | #include <unordered_map>
|
10 | 10 | #include <unordered_set>
|
11 |
| -#include <tuple> |
12 | 11 | #include <vector>
|
13 | 12 |
|
14 | 13 | #include "metawear/core/metawearboard.h"
|
@@ -344,31 +343,31 @@ void mbl_mw_metawearboard_set_time_for_response(MblMwMetaWearBoard* board, uint1
|
344 | 343 | }
|
345 | 344 |
|
346 | 345 | const unordered_map<uint8_t, tuple<const char*, void(*)(MblMwMetaWearBoard*)>> MODULE_ATTRS = {
|
347 |
| - { MBL_MW_MODULE_SWITCH, {"Switch", init_switch_module} }, |
348 |
| - { MBL_MW_MODULE_LED, {"Led", nullptr} }, |
349 |
| - { MBL_MW_MODULE_ACCELEROMETER, {"Accelerometer", init_accelerometer_module} }, |
350 |
| - { MBL_MW_MODULE_TEMPERATURE, {"Temperature", init_multichannel_temp_module} }, |
351 |
| - { MBL_MW_MODULE_GPIO, {"Gpio", init_gpio_module} }, |
352 |
| - { MBL_MW_MODULE_NEO_PIXEL, {"NeoPixel", nullptr} }, |
353 |
| - { MBL_MW_MODULE_IBEACON, {"IBeacon", nullptr} }, |
354 |
| - { MBL_MW_MODULE_HAPTIC, {"Haptic", nullptr} }, |
355 |
| - { MBL_MW_MODULE_DATA_PROCESSOR, {"DataProcessor", init_dataprocessor_module} }, |
356 |
| - { MBL_MW_MODULE_EVENT, {"Event", init_event_module} }, |
357 |
| - { MBL_MW_MODULE_LOGGING, {"Logging", init_logging} }, |
358 |
| - { MBL_MW_MODULE_TIMER, {"Timer", init_timer_module} }, |
359 |
| - { MBL_MW_MODULE_I2C, {"SerialPassthrough", init_serialpassthrough_module} }, |
360 |
| - { MBL_MW_MODULE_MACRO, {"Macro", init_macro_module} }, |
361 |
| - { MBL_MW_MODULE_CONDUCTANCE, {"Conductance", init_conductance_module} }, |
362 |
| - { MBL_MW_MODULE_SETTINGS, {"Settings", init_settings_module} }, |
363 |
| - { MBL_MW_MODULE_BAROMETER, {"Barometer", init_barometer_module} }, |
364 |
| - { MBL_MW_MODULE_GYRO, {"Gyro", init_gyro_module} }, |
365 |
| - { MBL_MW_MODULE_AMBIENT_LIGHT, {"AmbientLight", init_ambient_light_module} }, |
366 |
| - { MBL_MW_MODULE_MAGNETOMETER, {"Magnetometer", init_magnetometer_module} }, |
367 |
| - { MBL_MW_MODULE_HUMIDITY, {"Humidity", init_humidity_module} }, |
368 |
| - { MBL_MW_MODULE_COLOR_DETECTOR, {"Color", init_colordetector_module} }, |
369 |
| - { MBL_MW_MODULE_PROXIMITY, {"Proximity", init_proximity_module} }, |
370 |
| - { MBL_MW_MODULE_SENSOR_FUSION, {"SensorFusion", init_sensor_fusion_module} }, |
371 |
| - { MBL_MW_MODULE_DEBUG, {"Debug", init_debug_module} } |
| 346 | + { MBL_MW_MODULE_SWITCH, make_tuple("Switch", init_switch_module) }, |
| 347 | + { MBL_MW_MODULE_LED, make_tuple("Led", nullptr) }, |
| 348 | + { MBL_MW_MODULE_ACCELEROMETER, make_tuple("Accelerometer", init_accelerometer_module) }, |
| 349 | + { MBL_MW_MODULE_TEMPERATURE, make_tuple("Temperature", init_multichannel_temp_module) }, |
| 350 | + { MBL_MW_MODULE_GPIO, make_tuple("Gpio", init_gpio_module) }, |
| 351 | + { MBL_MW_MODULE_NEO_PIXEL, make_tuple("NeoPixel", nullptr) }, |
| 352 | + { MBL_MW_MODULE_IBEACON, make_tuple("IBeacon", nullptr) }, |
| 353 | + { MBL_MW_MODULE_HAPTIC, make_tuple("Haptic", nullptr) }, |
| 354 | + { MBL_MW_MODULE_DATA_PROCESSOR, make_tuple("DataProcessor", init_dataprocessor_module) }, |
| 355 | + { MBL_MW_MODULE_EVENT, make_tuple("Event", init_event_module) }, |
| 356 | + { MBL_MW_MODULE_LOGGING, make_tuple("Logging", init_logging) }, |
| 357 | + { MBL_MW_MODULE_TIMER, make_tuple("Timer", init_timer_module) }, |
| 358 | + { MBL_MW_MODULE_I2C, make_tuple("SerialPassthrough", init_serialpassthrough_module) }, |
| 359 | + { MBL_MW_MODULE_MACRO, make_tuple("Macro", init_macro_module) }, |
| 360 | + { MBL_MW_MODULE_CONDUCTANCE, make_tuple("Conductance", init_conductance_module) }, |
| 361 | + { MBL_MW_MODULE_SETTINGS, make_tuple("Settings", init_settings_module) }, |
| 362 | + { MBL_MW_MODULE_BAROMETER, make_tuple("Barometer", init_barometer_module) }, |
| 363 | + { MBL_MW_MODULE_GYRO, make_tuple("Gyro", init_gyro_module) }, |
| 364 | + { MBL_MW_MODULE_AMBIENT_LIGHT, make_tuple("AmbientLight", init_ambient_light_module) }, |
| 365 | + { MBL_MW_MODULE_MAGNETOMETER, make_tuple("Magnetometer", init_magnetometer_module) }, |
| 366 | + { MBL_MW_MODULE_HUMIDITY, make_tuple("Humidity", init_humidity_module) }, |
| 367 | + { MBL_MW_MODULE_COLOR_DETECTOR, make_tuple("Color", init_colordetector_module) }, |
| 368 | + { MBL_MW_MODULE_PROXIMITY, make_tuple("Proximity", init_proximity_module) }, |
| 369 | + { MBL_MW_MODULE_SENSOR_FUSION, make_tuple("SensorFusion", init_sensor_fusion_module) }, |
| 370 | + { MBL_MW_MODULE_DEBUG, make_tuple("Debug", init_debug_module) } |
372 | 371 | };
|
373 | 372 |
|
374 | 373 | static inline void service_discovery_completed(MblMwMetaWearBoard* board) {
|
|
0 commit comments