Fix code attempting to sprintf %f (#14869)

Arduino doesn't (always) support `float` formatting in strings. So either cast to `int` or use `dtostrf()` to fix these usages.
This commit is contained in:
Scott Lahteine
2019-08-08 01:51:37 -05:00
committed by GitHub
parent 3e5620283e
commit c8e30b6639
8 changed files with 75 additions and 76 deletions

View File

@ -252,8 +252,7 @@ void GcodeSuite::M48() {
#if HAS_SPI_LCD
// Display M48 results in the status bar
char sigma_str[8];
dtostrf(sigma, 2, 6, sigma_str);
ui.status_printf_P(0, PSTR(MSG_M48_DEVIATION ": %s"), sigma_str);
ui.status_printf_P(0, PSTR(MSG_M48_DEVIATION ": %s"), dtostrf(sigma, 2, 6, sigma_str));
#endif
}