This commit is contained in:
stijn
2021-04-06 16:58:14 +02:00
parent ac6d6cc604
commit 558e681689
9 changed files with 2737 additions and 2736 deletions

View File

@@ -146,10 +146,10 @@ void lcd_write_ultrasonic_value(float number)
int length = snprintf(NULL, 0, " cm");
char temp[5];
char temp[6];
dtostrf(number , 2, 2, temp);
char str[length + 1];
snprintf(str, length + 6, "%s cm", temp);
snprintf(str, length + 7, "%s cm", temp);
lcd_write_string(str);
}