Skip to content

Type redefinition errors on latest Arduino IDE master #16

@Jeroen88

Description

@Jeroen88

First: compliments for the excellent work to reduce the memory footprint for BLE!

Today I updated my ESP32 Arduino IDE to the latest master, and I got compilation errors (type redefinition errors). The cause was in NimbleAddress.h:

typedef enum {
    BLE_ADDR_TYPE_PUBLIC        = 0x00,
    BLE_ADDR_TYPE_RANDOM        = 0x01,
    BLE_ADDR_TYPE_RPA_PUBLIC    = 0x02,
    BLE_ADDR_TYPE_RPA_RANDOM    = 0x03,
} esp_nimble_addr_type_t;

typedef uint8_t esp_nimble_addr_type_t ;

I changed it to:

typedef enum {
    NIMBLE_ADDR_TYPE_PUBLIC        = 0x00,
    NIMBLE_ADDR_TYPE_RANDOM        = 0x01,
    NIMBLE_ADDR_TYPE_RPA_PUBLIC    = 0x02,
    NIMBLE_ADDR_TYPE_RPA_RANDOM    = 0x03,
} esp_nimble_addr_type_t;

//typedef uint8_t esp_nimble_addr_type_t ;

Now I also had to change NimBLEClient.h into:

bool connect(NimBLEAddress address, esp_nimble_addr_type_t type = NIMBLE_ADDR_TYPE_PUBLIC, bool refreshServices = true); // Connect to the remote BLE Server

and NimBLEClient.cpp:

bool NimBLEClient::connect(NimBLEAddress address, esp_nimble_addr_type_t type, bool refreshServices) {
and lastly in this file:
return connect(address, (esp_nimble_addr_type_t)type, refreshServices);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions