diff --git a/include/baros.h b/include/baros.h index f719e0a..709f5d4 100644 --- a/include/baros.h +++ b/include/baros.h @@ -4,6 +4,7 @@ #include #include "esp_event_base.h" +#define BAROS_NAME_MAX_LEN ( 32) #define BAROS_BLE_SERVICE_PUMP_ENABLED (0x4200) #define BAROS_BLE_SERVICE_PUMP_STATE (0x4300) #define BAROS_BLE_SERVICE_PUMP_DURATION (0x4350) diff --git a/src/baros_ble.c b/src/baros_ble.c index c40c31e..03a7df2 100644 --- a/src/baros_ble.c +++ b/src/baros_ble.c @@ -231,7 +231,8 @@ static int ble_gap_event(struct ble_gap_event *event, void *arg) { name[fields.name_len] = '\0'; ESP_LOGI(TAG, "DISCOVERY: %s", name); - if(strstr(name, "BARBACK") != NULL) { + // we'll party at any bar + if(strstr(name, "BAR") >= 0) { ESP_LOGI(TAG, "Let's Party!"); uint8_t addr_type; ble_gap_disc_cancel();