adafruit / Adafruit_VL53L0X

Arduino library for Adafruit VL53L0X
149 stars 118 forks source link

Fix ESP32 v2.0.5 BSP Compilation #59

Closed brentru closed 1 year ago

brentru commented 1 year ago

Fixes https://github.com/adafruit/Adafruit_VL53L0X/issues/58 caused by ESP32 v2.0.5 GCC not liking aggregate list initialization of a struct by initializing the struct with default values (identical to init within: https://github.com/adafruit/Adafruit_VL53L0X/blob/master/src/core/src/vl53l0x_api.cpp#L349)

@hathach This warning was thrown within adabot's bsp v2.0.5 run, but uncaught (see: https://github.com/adafruit/Adafruit_VL53L0X/actions/runs/3290641110/jobs/5423754538#step:6:5974). Was it supposed to be?

hathach commented 1 year ago

Look good, please check if we need to use memset() to clear the variable.