Adafruit_MPR121 icon indicating copy to clipboard operation
Adafruit_MPR121 copied to clipboard

fix compiler warning about deprecated symbol

Open skybrian opened this issue 9 months ago • 3 comments

Here is the warning: "'B10000000' is deprecated: use 0b10000000 instead"

I don't believe this change should have any effect at runtime.

skybrian avatar Jul 05 '25 19:07 skybrian

Looks OK. What was the original board being built for that created the warn?

caternuson avatar Jul 07 '25 16:07 caternuson

I'm using the unofficial Arduino port for the Raspberry Pi Pico: https://github.com/earlephilhower/arduino-pico

And the microcontroller board is this one: https://www.adafruit.com/product/5723

skybrian avatar Jul 08 '25 05:07 skybrian

Thanks, recreated:

/home/user/Arduino/libraries/Adafruit_MPR121/Adafruit_MPR121.cpp:109:7: warning: 'B10000000' is deprecated: use 0b10000000 instead [-Wdeprecated-declarations]
  109 |       B10000000 + 12; // 5 bits for baseline tracking & proximity disabled + X
      |       ^~~~~~~~~

This fix and change is actually part of PR #43, which is ready to be merged but was waiting for the user that opened the original issue to test. I think we'll just merge that one and it'll take care of this.

caternuson avatar Jul 08 '25 14:07 caternuson