Int, int8_t, int16_t values
-
Hello
I have am developing an application. It takes values from a PCB. A thread checks values and passes them accross to the main application. I am having a problem where the value changes then reverts back to -52. I have found a fix where instead on declaring the int8_t temperature in the .h I have just set it up in at the top of the .cpp. The setters and setters are still all declared in the .h.
Any ideas as to wat I was doing wrong in the first instance and why it doesn't work when the int8_t is declared in the .h?
Thanks
-
It's impossible to give any answer without more information. Please show your code and explain how you are setting those values.
From what you describe it seems to me that you have several instances of your class and read the value from one of them but are setting it on another one. But it's impossible for me to verify this.