Skip to content

Commit

Permalink
compiled size reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
kisslorand committed Jan 6, 2021
1 parent 999a49b commit 9e5e449
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions TFT/src/User/Menu/ABL.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void ablUpdateStatus(bool succeeded)
savingEnabled = false;
tempTitle.index = LABEL_ABL_SETTINGS_UBL;

sprintf(&tempMsg[strlen(tempMsg)], "\n %s", textSelect(LABEL_BL_SMART_FILL));
sprintf(tempMsg, "%s\n %s", tempMsg, textSelect(LABEL_BL_SMART_FILL));
break;
}
default:
Expand All @@ -39,7 +39,7 @@ void ablUpdateStatus(bool succeeded)

if (savingEnabled && infoMachineSettings.EEPROM == 1)
{
sprintf(&tempMsg[strlen(tempMsg)], "\n %s", textSelect(LABEL_EEPROM_SAVE_INFO));
sprintf(tempMsg, "%s\n %s", tempMsg, textSelect(LABEL_EEPROM_SAVE_INFO));
setDialogText(tempTitle.index, (u8 *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_SUCCESS, saveEepromSettings, NULL, NULL);
}
Expand Down
4 changes: 2 additions & 2 deletions TFT/src/User/Menu/MBL.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void mblUpdateStatus(bool succeeded)

if (infoMachineSettings.EEPROM == 1)
{
sprintf(&tempMsg[strlen(tempMsg)], "\n %s", textSelect(LABEL_EEPROM_SAVE_INFO));
sprintf(tempMsg, "%s\n %s", tempMsg, textSelect(LABEL_EEPROM_SAVE_INFO));

setDialogText(LABEL_MBL_SETTINGS, (u8 *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_SUCCESS, saveEepromSettings, NULL, NULL);
Expand All @@ -48,7 +48,7 @@ void mblNotifyError(void)
{
LABELCHAR(tempMsg, LABEL_MBL);

sprintf(&tempMsg[strlen(tempMsg)], " %s", textSelect(LABEL_OFF));
sprintf(tempMsg, "%s %s", tempMsg, textSelect(LABEL_OFF));

addToast(DIALOG_TYPE_ERROR, tempMsg);
}
Expand Down
2 changes: 1 addition & 1 deletion TFT/src/User/Menu/MeshEditor.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ void meshUpdateData(char *dataRow)

LABELCHAR(tempMsg, LABEL_PROCESS_ABORTED);

sprintf(&tempMsg[strlen(tempMsg)], "\n %s", dataRow);
sprintf(tempMsg, "%s\n %s", tempMsg, dataRow);

popupReminder(DIALOG_TYPE_ERROR, LABEL_MESH_EDITOR, (u8 *) tempMsg);

Expand Down
8 changes: 4 additions & 4 deletions TFT/src/User/Menu/Pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ void pidUpdateStatus(bool succeeded)

if (succeeded)
{
sprintf(&tempMsg[strlen(tempMsg)], " %s", textSelect(LABEL_PROCESS_COMPLETED));
sprintf(tempMsg, "%s %s", tempMsg, textSelect(LABEL_PROCESS_COMPLETED));

BUZZER_PLAY(sound_notify);

addToast(DIALOG_TYPE_INFO, tempMsg);
}
else
{
sprintf(&tempMsg[strlen(tempMsg)], " %s", textSelect(LABEL_PROCESS_ABORTED));
sprintf(tempMsg, "%s %s", tempMsg, textSelect(LABEL_PROCESS_ABORTED));

BUZZER_PLAY(sound_error);

Expand All @@ -72,7 +72,7 @@ void pidUpdateStatus(bool succeeded)

if (infoMachineSettings.EEPROM == 1)
{
sprintf(&tempMsg[strlen(tempMsg)], "\n %s", textSelect(LABEL_EEPROM_SAVE_INFO));
sprintf(tempMsg, "%s\n %s", tempMsg, textSelect(LABEL_EEPROM_SAVE_INFO));

setDialogText(LABEL_PID_TITLE, (u8 *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_SUCCESS, saveEepromSettings, NULL, NULL);
Expand Down Expand Up @@ -104,7 +104,7 @@ static inline void pidCheckTimeout(void)

LABELCHAR(tempMsg, LABEL_TIMEOUT_REACHED);

sprintf(&tempMsg[strlen(tempMsg)], "\n %s", textSelect(LABEL_PROCESS_ABORTED));
sprintf(tempMsg, "%s\n %s", tempMsg, textSelect(LABEL_PROCESS_ABORTED));

BUZZER_PLAY(sound_error);

Expand Down
2 changes: 1 addition & 1 deletion TFT/src/User/Menu/ProbeOffset.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void probeNotifyError(void)
{
LABELCHAR(tempMsg, LABEL_Z_OFFSET);

sprintf(&tempMsg[strlen(tempMsg)], " %s", textSelect(LABEL_OFF));
sprintf(tempMsg, "%s %s", tempMsg, textSelect(LABEL_OFF));

addToast(DIALOG_TYPE_ERROR, tempMsg);
}
Expand Down

0 comments on commit 9e5e449

Please sign in to comment.