ozzmaker / BerryIMU

Code related to BerryIMU
http://ozzmaker.com
184 stars 110 forks source link

Type Conversion error in base code for ArduinoBerryIMUv3 #25

Open RubYourDuck opened 2 years ago

RubYourDuck commented 2 years ago

Copy pasted folder from https://github.com/ozzmaker/BerryIMU/tree/master/arduino-BerryIMU and ran it and faced this issue. No changes were made in the code. Error below:

C:\Users\F\arduino-BerryIMU\IMU.cpp: In function 'void enableIMU()': C:\Users\F\arduino-BerryIMU\IMU.cpp:52:59: warning: invalid conversion from 'byte {aka unsigned char}' to 'byte {aka unsigned char}' [-fpermissive] readFrom(LSM6DSL_ADDRESS,LIS3MDL_CTRL_REG3,1, temp); ^ C:\Users\F\arduino-BerryIMU\IMU.cpp:20:6: note: initializing argument 4 of 'void readFrom(int, byte, int, byte*)' void readFrom(int device, byte address, int num, byte buff[]) {