diff --git a/configure.ac b/configure.ac index a48b734..5239642 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,15 @@ AC_ARG_ENABLE([doc], [], [enable_doc=yes]) AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"]) +# BLE support +AC_ARG_ENABLE([ble], + [AS_HELP_STRING([--enable-ble=@<:@yes/no@:>@], + [Enable BLE dive computers @<:@default=yes@:>@])], + [], [enable_ble=no]) +AS_IF([test "x$enable_ble" = "xyes"], [ + AC_DEFINE(ENABLE_BLE, [1], [Enable support for BLE dive computers.]) +]) + # Checks for programs. AC_PROG_CC AC_PROG_CC_C99 diff --git a/src/descriptor.c b/src/descriptor.c index a8c8a1a..a267bf3 100644 --- a/src/descriptor.c +++ b/src/descriptor.c @@ -98,7 +98,7 @@ static const dc_descriptor_t g_descriptors[] = { {"Suunto", "Zoop Novo", DC_FAMILY_SUUNTO_D9, 0x1E}, // FTDI {"Suunto", "D4f", DC_FAMILY_SUUNTO_D9, 0x20}, // FTDI /* Suunto EON Steel */ -#ifdef USBHID +#if defined(USBHID) || defined(ENABLE_BLE) {"Suunto", "EON Steel", DC_FAMILY_SUUNTO_EONSTEEL, 0}, // BLE {"Suunto", "EON Core", DC_FAMILY_SUUNTO_EONSTEEL, 1}, // BLE #endif @@ -139,7 +139,7 @@ static const dc_descriptor_t g_descriptors[] = { {"Scubapro", "Chromis", DC_FAMILY_UWATEC_MERIDIAN, 0x24}, {"Scubapro", "Mantis 2", DC_FAMILY_UWATEC_MERIDIAN, 0x26}, /* Scubapro G2 */ -#ifdef USBHID +#if defined(USBHID) || defined(ENABLE_BLE) {"Scubapro", "Aladin Sport Matrix", DC_FAMILY_UWATEC_G2, 0x17}, // BLE {"Scubapro", "Aladin Square", DC_FAMILY_UWATEC_G2, 0x22}, {"Scubapro", "G2", DC_FAMILY_UWATEC_G2, 0x32}, // BLE