Fix compile warnings, serial alias

This commit is contained in:
Scott Lahteine
2020-11-13 18:27:31 -06:00
parent cb1d2de838
commit 7e535022ab
6 changed files with 19 additions and 8 deletions

View File

@ -774,9 +774,15 @@ void MarlinUI::draw_status_screen() {
mixer.update_mix_from_vtool();
mix_label = PSTR("Mx");
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-overflow"
sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
lcd_put_u8str(X_LABEL_POS, XYZ_BASELINE, mixer_messages);
#pragma GCC diagnostic pop
#else
if (show_e_total) {

View File

@ -217,7 +217,7 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) {
// It is using a hex display for that: It expects BSD coded data in the format xxyyzz
void DGUSScreenHandler::DGUSLCD_SendPrintAccTimeToDisplay(DGUS_VP_Variable &var) {
printStatistics state = print_job_timer.getStats();
char buf[21];
char buf[22];
duration_t elapsed = state.printTime;
elapsed.toString(buf);
dgusdisplay.WriteVariable(VP_PrintAccTime, buf, var.size, true);
@ -225,7 +225,7 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) {
void DGUSScreenHandler::DGUSLCD_SendPrintsTotalToDisplay(DGUS_VP_Variable &var) {
printStatistics state = print_job_timer.getStats();
char buf[21];
char buf[10];
sprintf_P(buf, PSTR("%u"), state.totalPrints);
dgusdisplay.WriteVariable(VP_PrintsTotal, buf, var.size, true);
}