Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: 'B111' is deprecated: use 0b111 instead #99

Open
lennon101 opened this issue Nov 25, 2024 · 0 comments
Open

warning: 'B111' is deprecated: use 0b111 instead #99

lennon101 opened this issue Nov 25, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@lennon101
Copy link

Running latest version of Arduino (v2.3.3) and installed the ina.h library via sketch --> include library --> add .zip. Then opened the DisplayReadings.ino example. Selected the raspberry pi pico as the board and hit compile and got the below message:

In file included from C:\Users\dane\AppData\Local\Temp\.arduinoIDE-unsaved20241025-209860-1ly8v0c.xin9\DisplayReadings\DisplayReadings.ino:69:
c:\Users\dane\Documents\Arduino\libraries\INA2xx\src/INA.h:240:43: warning: 'B111' is deprecated: use 0b111 instead [-Wdeprecated-declarations]
  240 | const uint8_t  INA_DEFAULT_OPERATING_MODE{B111};    ///< Default continuous mode
      |                                           ^~~~
In file included from C:/Users/dane/AppData/Local/Arduino15/packages/rp2040/hardware/rp2040/4.1.1/ArduinoCore-API/api/ArduinoAPI.h:26,
                 from C:\Users\dane\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\4.1.1\cores\rp2040/api/ArduinoAPI.h:2,
                 from C:\Users\dane\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\4.1.1\cores\rp2040/Arduino.h:28,
                 from C:\Users\dane\AppData\Local\Temp\.arduinoIDE-unsaved20241025-209860-1ly8v0c.xin9\DisplayReadings\DisplayReadings.ino:65:
C:/Users/dane/AppData/Local/Arduino15/packages/rp2040/hardware/rp2040/4.1.1/ArduinoCore-API/api/Binary.h:86:3: note: declared here
   86 |   B111      DEPRECATED(0b111     ) = 7,
      |   ^~~~
In file included from c:\Users\dane\Documents\Arduino\libraries\INA2xx\src\INA.cpp:10:
c:\Users\dane\Documents\Arduino\libraries\INA2xx\src/INA.h:240:43: warning: 'B111' is deprecated: use 0b111 instead [-Wdeprecated-declarations]
  240 | const uint8_t  INA_DEFAULT_OPERATING_MODE{B111};    ///< Default continuous mode
      |                                           ^~~~
In file included from C:/Users/dane/AppData/Local/Arduino15/packages/rp2040/hardware/rp2040/4.1.1/ArduinoCore-API/api/ArduinoAPI.h:26,
                 from C:\Users\dane\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\4.1.1\cores\rp2040/api/ArduinoAPI.h:2,
                 from C:\Users\dane\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\4.1.1\cores\rp2040/Arduino.h:28,
                 from c:\Users\dane\Documents\Arduino\libraries\INA2xx\src/INA.h:159:
C:/Users/dane/AppData/Local/Arduino15/packages/rp2040/hardware/rp2040/4.1.1/ArduinoCore-API/api/Binary.h:86:3: note: declared here
   86 |   B111      DEPRECATED(0b111     ) = 7,
      |   ^~~~
c:\Users\dane\Documents\Arduino\libraries\INA2xx\src\INA.cpp: In member function 'void INA_Class::setMode(uint8_t, uint8_t)':
c:\Users\dane\Documents\Arduino\libraries\INA2xx\src\INA.cpp:747:27: warning: 'B00000111' is deprecated: use 0b00000111 instead [-Wdeprecated-declarations]
  747 |       ina.operatingMode = B00000111 & mode;                                // Mask off unused bits
      |                           ^~~~~~~~~
C:/Users/dane/AppData/Local/Arduino15/packages/rp2040/hardware/rp2040/4.1.1/ArduinoCore-API/api/Binary.h:91:3: note: declared here
   91 |   B00000111 DEPRECATED(0b00000111) = 7,
      |   ^~~~~~~~~
Sketch uses 68628 bytes (3%) of program storage space. Maximum is 2093056 bytes.
Global variables use 10732 bytes (4%) of dynamic memory, leaving 251412 bytes for local variables. Maximum is 262144 bytes.

Specifications

  • Library Version:
  • IDE Version: 2.3.3
  • Platform: Windows 10

2024-11-25_11 15 50_ShareX Arduino_IDE

@lennon101 lennon101 added the bug Something isn't working label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants