I'm using the ATMega128 micro for a project and CodeVisionAVR. It seems as if when I try a += with 2 floats, it doesn't calculate properly. For example, if I'm doing a PI loop for the integrator and do something like :
float iTemp = 0; float countOffset = 0; iTemp += countOffset;
If I do that in my code, it gives very weird numbers that make no sense (expecting ~50, normally something like DC3D, but it changes everytime I print the numbers), I'm not even able to think of where they came from since they are inconsistant. My main question, are you allowed to use the += operator with floats?
*Side note: What about a ++ with a float?