You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that these are not technically bugs, since the angle loops from [0..255] and then back to zero, which matches the behavior of uint8_t. However, it would be good to remove the warnings.
@jasoncoon -- can you confirm that the right fix is to store these values modulo 256?
Or, given that all the values range from 0..359, were the values accidentally left in degrees (rather than units where 256 == 360 degrees)?
Build warnings / errors
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '256' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
const uint8_t angles[NUM_PIXELS] { 179, 192, 176, 175, 195, 212, 225, 210, 188, 158, 146, 141, 139, 211, 226, 187, 209, 233, 95, 85, 89, 226, 243, 244, 246, 256, 259, 274, 313, 274, 269, 278, 282, 298, 288, 299, 318, 299, 317, 312, 312, 326, 341, 340, 346, 31, 65, 79, 332, 345, 0, 15, 30, 43, 55, 61, 61, 41, 22, 27, 45, 54, 44, 40 };
^
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '259' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '274' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '313' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '274' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '269' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '278' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '282' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '298' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '288' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '299' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '318' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '299' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '317' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '312' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '312' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '326' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '341' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '340' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '346' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '332' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
esp8266-fastled-webserver\Map.cpp:122:350: warning: narrowing conversion of '345' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]
esp8266-fastled-webserver\Map.cpp:122:350: warning: large integer implicitly truncated to unsigned type [-Woverflow]
The text was updated successfully, but these errors were encountered:
I think that these are not technically bugs, since the angle loops from [0..255] and then back to zero, which matches the behavior of
uint8_t
. However, it would be good to remove the warnings.@jasoncoon -- can you confirm that the right fix is to store these values modulo 256?
Or, given that all the values range from
0..359
, were the values accidentally left in degrees (rather than units where 256 == 360 degrees)?Build warnings / errors
The text was updated successfully, but these errors were encountered: