Skip to content

BTHome.cpp:7:6: error: no declaration matches 'void BTHome::begin(String, bool, const uint8_t*, bool)' #24

@feiticeir0

Description

@feiticeir0

Hi !
First, thank you for the code.
I'm trying to use this, but getting the following error:

/home/feiticeir0/Documents/Arduino/BTHome/BTHome.ino: In function 'void setup()':
/home/feiticeir0/Documents/Arduino/BTHome/BTHome.ino:24:27: error: call of overloaded 'begin(const char [8])' is ambiguous
   bthome.begin(DEVICE_NAME);
                           ^
In file included from /home/feiticeir0/Documents/Arduino/BTHome/BTHome.ino:11:
/home/feiticeir0/Documents/Arduino/BTHome/BTHome.h:117:10: note: candidate: 'void BTHome::begin(String, bool, const uint8_t*, bool)'
     void begin(String dname = "DIY-sensor", bool encryption = false, uint8_t const* const key = NULL, bool trigger_based_device = false);
          ^~~~~
/home/feiticeir0/Documents/Arduino/BTHome/BTHome.h:118:10: note: candidate: 'void BTHome::begin(String, bool, String, bool)'
     void begin(String dname = "DIY-sensor", bool encryption = false, String key = "", bool trigger_based_device = false);
          ^~~~~

exit status 1

Compilation error: call of overloaded 'begin(const char [8])' is ambiguous

Per instructions, without encryption, I've commented out DEFINE_ENCRYPTION and BIND_KEY...

The line that gets red in the editor is this one:

bthome.begin(DEVICE_NAME);

Thank you

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