Good day,
I just got a Zumo for Arduino kit from online shop, I can get it to work, but when I compiling the code form ZumoShield called: LineFollower, I got an error message:
/Arduino/libraries/ZumoShield/ZumoIMU.cpp: In member function ‘void ZumoIMU::readMag()’:
/Arduino/libraries/ZumoShield/ZumoIMU.cpp:272:22: warning: narrowing conversion of ‘((ZumoIMU*)this)->ZumoIMU::swapBytes(((uint16_t)((ZumoIMU*)this)->ZumoIMU::m.ZumoIMU::vector::x))’ from ‘uint16_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
m = { swapBytes(m.x), swapBytes(m.z), swapBytes(m.y) };
~~~~~^
/Arduino/libraries/ZumoShield/ZumoIMU.cpp:272:38: warning: narrowing conversion of ‘((ZumoIMU*)this)->ZumoIMU::swapBytes(((uint16_t)((ZumoIMU*)this)->ZumoIMU::m.ZumoIMU::vector::z))’ from ‘uint16_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
m = { swapBytes(m.x), swapBytes(m.z), swapBytes(m.y) };
~~~~~^
/Arduino/libraries/ZumoShield/ZumoIMU.cpp:272:54: warning: narrowing conversion of ‘((ZumoIMU*)this)->ZumoIMU::swapBytes(((uint16_t)((ZumoIMU*)this)->ZumoIMU::m.ZumoIMU::vector::y))’ from ‘uint16_t {aka unsigned int}’ to ‘int’ inside { } [-Wnarrowing]
m = { swapBytes(m.x), swapBytes(m.z), swapBytes(m.y) };
~~~~~^
my zumo still able to follow the line just fine, just wondering what are those message showing when I compiling the code? How can I fix it?
Thank you
Sam