Skip to content

Conversation

@Robert-Proaps
Copy link

I changed the code at line 706 from

uint8_t length = version.length();
uint8_t data[length + 2] = {length};

to

uint8_t length = version.length();
uint8_t data[length +2];
data[0]=length;

This change fixes the following error

"libraries\HUSKYLENS/HUSKYLENS.h:706:43: error: variable-sized object 'data' may not be initialized
uint8_t data[length + 2] = {length};
^"

This error would prevent any code that includes the HUSKYLENS.h library from compiling.

I changed the code at line 706 from

uint8_t length = version.length();
uint8_t data[length + 2] = {length};

to

uint8_t length = version.length();
uint8_t data[length +2];
data[0]=length;

This change fixes the following error

"libraries\HUSKYLENS/HUSKYLENS.h:706:43: error: variable-sized object 'data' may not be initialized
         uint8_t data[length + 2] = {length};
                                           ^"

This error would prevent any code that includes the HUSKYLENS.h library from compiling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant