temp is a global char buffer to this function. When I pour in numbers to this method all I get from my debugging is val : ?
What in the world am I missing here?
void label::setValue(double val) {
Serial.print(val); Serial.print(" : ");
int num = sprintf(temp,"%f",val);
Serial.println(temp);
setValue(temp);
setRefresh();
}
Have you enabled the patch to use floating point format specifiers?
Hint int num = sprintf(temp,"%f",val); if you don't want to use the returned length, you don't have to. If you want to make it clear, (void)sprintf(temp,"%f",val); would be sufficient.