PARTY NAMES
This commit is contained in:
parent
70536af4c0
commit
f7cd159a1d
2 changed files with 3 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "esp_event_base.h"
|
#include "esp_event_base.h"
|
||||||
|
|
||||||
|
#define BAROS_NAME_MAX_LEN ( 32)
|
||||||
#define BAROS_BLE_SERVICE_PUMP_ENABLED (0x4200)
|
#define BAROS_BLE_SERVICE_PUMP_ENABLED (0x4200)
|
||||||
#define BAROS_BLE_SERVICE_PUMP_STATE (0x4300)
|
#define BAROS_BLE_SERVICE_PUMP_STATE (0x4300)
|
||||||
#define BAROS_BLE_SERVICE_PUMP_DURATION (0x4350)
|
#define BAROS_BLE_SERVICE_PUMP_DURATION (0x4350)
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,8 @@ static int ble_gap_event(struct ble_gap_event *event, void *arg) {
|
||||||
name[fields.name_len] = '\0';
|
name[fields.name_len] = '\0';
|
||||||
ESP_LOGI(TAG, "DISCOVERY: %s", name);
|
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!");
|
ESP_LOGI(TAG, "Let's Party!");
|
||||||
uint8_t addr_type;
|
uint8_t addr_type;
|
||||||
ble_gap_disc_cancel();
|
ble_gap_disc_cancel();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue