This is a little vague, but my programming skills came to an end here, so i cannot say exactly where and what the problem is. This is what i observe in 1.1.0-RCBugFix.
Printer in standby:
When i open the "Printer Stats" screen the "Extruded total" value is somewhere, lets say 30000m (which is pretty much!! Realistic would be 20m)
When i turn the encoder clockwise the menu scrolls down. When the last line shows nothing happens.
Printer printing:
When i open the "Printer Stats" screen the "Extruded total" value is somewhere, lets say 30000m
When i turn the encoder clockwise the menu scrolls down. As soon as the menu reaches the last line the "Extruded total" value can be altered by turning the encoder. The value jumps, also in negative direction.
The "Extruded total" value changes by itself while extruding, but it can't be a meter value.
I attached a video to make it a little clearer...
Extruded total error.zip
Here's the problem. First, let's see the definition of filamentUsed:
double filamentUsed;
And here's where it is printed:
sprintf_P(buffer, PSTR("%im"), stats.filamentUsed / 1000);
Formatting a double (i.e., a float) as an integer won't do! So first we need to patch that… then we can see whether the value is being changed by rotating the knob, or if it's actually changing by a tiny amount, but the conversion to int makes it look like more.
Our fix will be:
sprintf_P(buffer, PSTR("%ldm"), long(stats.filamentUsed / 1000));
These where the two lines i expected to be the cause, but, like mentioned above, my coding skills are limited :)
I will test the fix as soon as i'm home and report back.
have you had time to test the fix?
@boelle: Yes and no, i can confirm that the Extruded total value was 56m yesterday evening (which is realistic) with the most recent RCBugFix. I forgot to check what turning the encoder does to it. I expect it will be what @thinkyhead mentioned:
then we can see whether the value is being changed by rotating the knob, or if it's actually changing by a tiny amount, but the conversion to int makes it look like more.
Further i didn't see a decimal place, it was just "56m". Maybe because of beeing exactly 56.0m and the 0 won't show or the decimal place isn't there always. I would appreciate at least one decimal place.
But i will verify this today and report back.
I had to revert back to a preview branch because i experienced PWM not worling for PIN4 fan. I will try to figure out why today, but this got nothing to do with the Extruded total thing.
@thinkyhead Everything is fine now. The Extruded total value shows a realistic value and it doesn't change when turning the encoder. Thanks!
It would be nice to have at least one decimal place. I guess this should be possible, i just don't know how without breaking something :)
It would be nice to have at least one decimal place
sprintf_P(buffer, PSTR("%ld.%im"), long(stats.filamentUsed / 1000), int(stats.filamentUsed / 100) % 10);
Works like a charme. This looks really good now. Many thanks!
I would suggest to merge this line to RCBugFix.

so now we can close this one?
Absolutely. Thanks for the support.