Hello,
this is my first request for help.
So far I've managed to solve all my microcontroller problems on my own, or using the benefits of the internet
But I'm carving out a project on the ESP8266 - a perpetual clock (NTP) on a 7seg - for now a module with two 595 registers.
I've come across a problem like this, which I'm stuck on so far.
I am complicating such a piece of code:
And I get a multitude of warnings about invalid conversion:
"warning: narrowing conversion of '-33' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]"
That is, from #define it takes an int (it comes out negative) and tries to stuff it into an array as a uint8_t.
Of course, there are some weird characters after this conversion.
I've coped by quickly creating an array of concrete values and it's almost fine, only the "dot" still lights up for me, but that's not a problem.
I would like to be able to have a "friendly" character design, and here something like this....
The code compiles under g++ in eclipse and gives correct results.
Maybe someone has an idea about this problem?
Greetings
Jurek
Added after 11 [minutes]:
Problem solved by explicit casting. Sorry for bothering you!
Added after 3 [hours] 37 [minutes]:
I'm not closing for now, maybe something new will emerge on the ESP topic.
this is my first request for help.
So far I've managed to solve all my microcontroller problems on my own, or using the benefits of the internet
But I'm carving out a project on the ESP8266 - a perpetual clock (NTP) on a 7seg - for now a module with two 595 registers.
I've come across a problem like this, which I'm stuck on so far.
I am complicating such a piece of code:
Code: C / C++
And I get a multitude of warnings about invalid conversion:
"warning: narrowing conversion of '-33' from 'int' to 'const uint8_t {aka const unsigned char}' inside { } [-Wnarrowing]"
That is, from #define it takes an int (it comes out negative) and tries to stuff it into an array as a uint8_t.
Of course, there are some weird characters after this conversion.
I've coped by quickly creating an array of concrete values and it's almost fine, only the "dot" still lights up for me, but that's not a problem.
I would like to be able to have a "friendly" character design, and here something like this....
The code compiles under g++ in eclipse and gives correct results.
Maybe someone has an idea about this problem?
Greetings
Jurek
Added after 11 [minutes]:
Problem solved by explicit casting. Sorry for bothering you!
Added after 3 [hours] 37 [minutes]:
I'm not closing for now, maybe something new will emerge on the ESP topic.