Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup macros #2593

Merged
merged 3 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions TFT/src/User/API/AddonHardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ void FIL_FE_CheckRunout(void)
if (printPause(true, PAUSE_NORMAL) && !getRunoutAlarm()) // If not printing, printPause() function will always fail
{ // so no useless error message is displayed
setRunoutAlarmTrue();
setDialogText(LABEL_WARNING, LABEL_FILAMENT_RUNOUT, LABEL_CONFIRM, LABEL_NULL);
showDialog(DIALOG_TYPE_ALERT, setRunoutAlarmFalse, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_WARNING, LABEL_FILAMENT_RUNOUT, LABEL_CONFIRM, LABEL_NULL, setRunoutAlarmFalse, NULL, NULL);
}

if ((OS_GetTimeMs() > nextReminderTime) && (getRunoutAlarm() == true))
Expand Down
6 changes: 2 additions & 4 deletions TFT/src/User/API/Printing.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ void shutdownStart(void)
mustStoreCmd(fanCmd[i], infoSettings.fan_max[i]);
}

setDialogText(LABEL_SHUT_DOWN, (uint8_t *)tempstr, LABEL_FORCE_SHUT_DOWN, LABEL_CANCEL);
showDialog(DIALOG_TYPE_INFO, shutdown, NULL, shutdownLoop);
popupDialog(DIALOG_TYPE_INFO, LABEL_SHUT_DOWN, (uint8_t *)tempstr, LABEL_FORCE_SHUT_DOWN, LABEL_CANCEL, shutdown, NULL, shutdownLoop);
}

void initPrintSummary(void)
Expand Down Expand Up @@ -542,8 +541,7 @@ void printAbort(void)
request_M0(); // M524 is not supported in RepRap firmware
}

setDialogText(LABEL_SCREEN_INFO, LABEL_BUSY, LABEL_NULL, LABEL_NULL);
showDialog(DIALOG_TYPE_INFO, NULL, NULL, NULL);
popupSplash(DIALOG_TYPE_INFO, LABEL_SCREEN_INFO, LABEL_BUSY);

// let setPrintPause() (that will be called in parseAck.c by parsing ACK message for M524, M25 or M27)
// notify the print as aborted/completed (infoHost.status set to "HOST_STATUS_IDLE") instead of paused
Expand Down
28 changes: 12 additions & 16 deletions TFT/src/User/API/parseACK.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,20 +382,18 @@ void hostActionCommands(void)
switch (hostAction.button)
{
case 0:
setDialogText((uint8_t *)"Message", (uint8_t *)hostAction.prompt_begin, LABEL_CONFIRM, LABEL_NULL);
showDialog(DIALOG_TYPE_ALERT, setRunoutAlarmFalse, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, (uint8_t *)"Message", (uint8_t *)hostAction.prompt_begin,
LABEL_CONFIRM, LABEL_NULL, setRunoutAlarmFalse, NULL, NULL);
break;

case 1:
setDialogText((uint8_t *)"Action command", (uint8_t *)hostAction.prompt_begin,
(uint8_t *)hostAction.prompt_button[0], LABEL_NULL);
showDialog(DIALOG_TYPE_ALERT, breakAndContinue, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, (uint8_t *)"Action command", (uint8_t *)hostAction.prompt_begin,
(uint8_t *)hostAction.prompt_button[0], LABEL_NULL, breakAndContinue, NULL, NULL);
break;

case 2:
setDialogText((uint8_t *)"Action command", (uint8_t *)hostAction.prompt_begin,
(uint8_t *)hostAction.prompt_button[0], (uint8_t *)hostAction.prompt_button[1]);
showDialog(DIALOG_TYPE_ALERT, resumeAndPurge, resumeAndContinue, NULL);
popupDialog(DIALOG_TYPE_ALERT, (uint8_t *)"Action command", (uint8_t *)hostAction.prompt_begin,
(uint8_t *)hostAction.prompt_button[0], (uint8_t *)hostAction.prompt_button[1], resumeAndPurge, resumeAndContinue, NULL);
break;
}
}
Expand Down Expand Up @@ -647,8 +645,8 @@ void parseACK(void)
// parse pause message
else if (!infoMachineSettings.promptSupport && ack_seen("paused for user"))
{
setDialogText((uint8_t *)"Printer is Paused", (uint8_t *)"Paused for user\ncontinue?", LABEL_CONFIRM, LABEL_NULL);
showDialog(DIALOG_TYPE_QUESTION, breakAndContinue, NULL, NULL);
popupDialog(DIALOG_TYPE_QUESTION, (uint8_t *)"Printer is Paused", (uint8_t *)"Paused for user\ncontinue?",
LABEL_CONFIRM, LABEL_NULL, breakAndContinue, NULL, NULL);
}
// parse host action commands. Required "HOST_ACTION_COMMANDS" and other settings in Marlin
else if (ack_seen("//action:"))
Expand Down Expand Up @@ -744,8 +742,7 @@ void parseACK(void)
if (ack_seen("Max: ")) sprintf(&tmpMsg[strlen(tmpMsg)], "\nMax: %0.5f", ack_value());
if (ack_seen("Range: ")) sprintf(&tmpMsg[strlen(tmpMsg)], "\nRange: %0.5f", ack_value());

setDialogText((uint8_t *)"Repeatability Test", (uint8_t *)tmpMsg, LABEL_CONFIRM, LABEL_NULL);
showDialog(DIALOG_TYPE_INFO, NULL, NULL, NULL);
popupReminder(DIALOG_TYPE_INFO, (uint8_t *)"Repeatability Test", (uint8_t *)tmpMsg);
}
// parse M48, standard deviation
else if (ack_seen("Standard Deviation: "))
Expand All @@ -760,8 +757,7 @@ void parseACK(void)
levelingSetProbedPoint(-1, -1, ack_value()); // save probed Z value
sprintf(tmpMsg, "%s\nStandard Deviation: %0.5f", (char *)getDialogMsgStr(), ack_value());

setDialogText((uint8_t *)"Repeatability Test", (uint8_t *)tmpMsg, LABEL_CONFIRM, LABEL_NULL);
showDialog(DIALOG_TYPE_INFO, NULL, NULL, NULL);
popupReminder(DIALOG_TYPE_INFO, (uint8_t *)"Repeatability Test", (uint8_t *)tmpMsg);
}
}
// parse and store M211 or M503, software endstops state (e.g. from Probe Offset, MBL, Mesh Editor menus)
Expand Down Expand Up @@ -879,8 +875,8 @@ void parseACK(void)

if (infoMachineSettings.EEPROM == 1)
{
setDialogText(LABEL_DELTA_CONFIGURATION, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_SUCCESS, saveEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_SUCCESS, LABEL_DELTA_CONFIGURATION, LABEL_EEPROM_SAVE_INFO,
LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
}
else
{
Expand Down
11 changes: 3 additions & 8 deletions TFT/src/User/Menu/ABL.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ void ablUpdateStatus(bool succeeded)
if (savingEnabled && infoMachineSettings.EEPROM == 1)
{
sprintf(&tempMsg[strlen(tempMsg)], "\n %s", textSelect(LABEL_EEPROM_SAVE_INFO));
setDialogText(tempTitle.index, (uint8_t *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_SUCCESS, saveEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_SUCCESS, tempTitle.index, (uint8_t *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
}
else
{
Expand Down Expand Up @@ -138,18 +137,14 @@ void menuUBLSaveLoad(void)
case KEY_ICON_2:
case KEY_ICON_3:
ublSlot = key_num;

setDialogText(UBLSaveLoadItems.title.index, LABEL_CONFIRMATION, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, ublSaveloadConfirm, NULL, NULL);
popupDialog(DIALOG_TYPE_QUESTION, UBLSaveLoadItems.title.index, LABEL_CONFIRMATION, LABEL_CONFIRM, LABEL_CANCEL, ublSaveloadConfirm, NULL, NULL);
break;

case KEY_ICON_7:
if (ublSlotSaved == true && infoMachineSettings.EEPROM == 1)
{
ublSlotSaved = false;

setDialogText(LABEL_ABL_SETTINGS_UBL, LABEL_ABL_SLOT_EEPROM, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, saveEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_QUESTION, LABEL_ABL_SETTINGS_UBL, LABEL_ABL_SLOT_EEPROM, LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
}
else
{
Expand Down
4 changes: 1 addition & 3 deletions TFT/src/User/Menu/Babystep.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ void menuBabystep(void)
if (infoMachineSettings.EEPROM == 1)
{
orig_z_offset = offsetSetValue(new_z_offset); // set new Z offset. Required if current Z offset is not changed applying babystep changes (e.g. no BABYSTEP_ZPROBE_OFFSET is set in Marlin FW)

setDialogText(babyStepItems.title.index, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, saveEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_QUESTION, babyStepItems.title.index, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
}
break;

Expand Down
9 changes: 3 additions & 6 deletions TFT/src/User/Menu/BedLeveling.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ void menuBedLeveling(void)
#if DELTA_PROBE_TYPE != 2 // if not removable probe
ablStart();
#else // if removable probe
setDialogText(LABEL_WARNING, LABEL_CONNECT_PROBE, LABEL_CONTINUE, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, ablStart, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_WARNING, LABEL_CONNECT_PROBE, LABEL_CONTINUE, LABEL_CANCEL, ablStart, NULL, NULL);
#endif
}
#endif
Expand All @@ -113,8 +112,7 @@ void menuBedLeveling(void)
#if DELTA_PROBE_TYPE != 2
OPEN_MENU(menuMeshEditor);
#else
setDialogText(LABEL_WARNING, LABEL_DISCONNECT_PROBE, LABEL_CONTINUE, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, deltaMeshEditor, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_WARNING, LABEL_DISCONNECT_PROBE, LABEL_CONTINUE, LABEL_CANCEL, deltaMeshEditor, NULL, NULL);
#endif
break;

Expand Down Expand Up @@ -154,8 +152,7 @@ void menuBedLeveling(void)
zOffsetSetMenu(true); // use Probe Offset menu
OPEN_MENU(menuZOffset);
#else
setDialogText(LABEL_WARNING, LABEL_DISCONNECT_PROBE, LABEL_CONTINUE, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, deltaZOffset, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_WARNING, LABEL_DISCONNECT_PROBE, LABEL_CONTINUE, LABEL_CANCEL, deltaZOffset, NULL, NULL);
#endif
}
break;
Expand Down
3 changes: 1 addition & 2 deletions TFT/src/User/Menu/BedLevelingLayer2.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ void menuBedLevelingLayer2(void)
#if DELTA_PROBE_TYPE != 2 // if not removable probe
ablStart();
#else // if removable probe
setDialogText(LABEL_WARNING, LABEL_CONNECT_PROBE, LABEL_CONTINUE, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, ablStart, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_WARNING, LABEL_CONNECT_PROBE, LABEL_CONTINUE, LABEL_CANCEL, ablStart, NULL, NULL);
#endif
}
else // if MBL
Expand Down
3 changes: 1 addition & 2 deletions TFT/src/User/Menu/FeatureSettings.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ void updateFeatureSettings(uint8_t item_index)
break;

case SKEY_RESET_SETTINGS:
setDialogText(LABEL_SETTINGS_RESET, LABEL_SETTINGS_RESET_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, resetSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_SETTINGS_RESET, LABEL_SETTINGS_RESET_INFO, LABEL_CONFIRM, LABEL_CANCEL, resetSettings, NULL, NULL);
break;

default:
Expand Down
5 changes: 1 addition & 4 deletions TFT/src/User/Menu/LevelCorner.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ void menuLevelCorner(void)
getLevelEdgeDefault(), infoSettings.level_edge);

if (curLevelEdge >= getLevelEdgeMin() && infoSettings.level_edge < getLevelEdgeMin()) // if new value is below min limit
{
setDialogText(LABEL_WARNING, LABEL_LEVEL_CORNER_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, setLevelEdgeMin, NULL, NULL);
}
popupDialog(DIALOG_TYPE_QUESTION, LABEL_WARNING, LABEL_LEVEL_CORNER_INFO, LABEL_CONFIRM, LABEL_CANCEL, setLevelEdgeMin, NULL, NULL);

break;
}
Expand Down
4 changes: 1 addition & 3 deletions TFT/src/User/Menu/MBL.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ void mblUpdateStatus(bool succeeded)
if (infoMachineSettings.EEPROM == 1)
{
sprintf(&tempMsg[strlen(tempMsg)], "\n %s", textSelect(LABEL_EEPROM_SAVE_INFO));

setDialogText(LABEL_MBL_SETTINGS, (uint8_t *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_SUCCESS, saveEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_SUCCESS, LABEL_MBL_SETTINGS, (uint8_t *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
}
else
{
Expand Down
12 changes: 3 additions & 9 deletions TFT/src/User/Menu/MPC.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ void menuMPC(void)
break;

case KEY_ICON_6:
setDialogText(mpcItems.title.index, LABEL_TUNE_START_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, mpcStart, NULL, NULL);
popupDialog(DIALOG_TYPE_QUESTION, mpcItems.title.index, LABEL_TUNE_START_INFO, LABEL_CONFIRM, LABEL_CANCEL, mpcStart, NULL, NULL);
break;

case KEY_ICON_7:
Expand All @@ -224,10 +223,7 @@ void menuMPC(void)
else if (mpcTuning.status == ONGOING)
{
if (getMenuType() != MENU_TYPE_SPLASH)
{
setDialogText(LABEL_SCREEN_INFO, LABEL_BUSY, LABEL_NULL, LABEL_NULL);
showDialog(DIALOG_TYPE_INFO, NULL, NULL, NULL);
}
popupSplash(DIALOG_TYPE_INFO, LABEL_SCREEN_INFO, LABEL_BUSY);

if (mpcTuning.result != NO_RESULT)
{
Expand All @@ -246,9 +242,7 @@ void menuMPC(void)
if (infoMachineSettings.EEPROM == 1)
{
sprintf(&tempMsg[strlen(tempMsg)], "\n %s", textSelect(LABEL_EEPROM_SAVE_INFO));

setDialogText(LABEL_MPC_TITLE, (uint8_t *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_SUCCESS, saveEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_SUCCESS, LABEL_MPC_TITLE, (uint8_t *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
}
else
{
Expand Down
18 changes: 6 additions & 12 deletions TFT/src/User/Menu/MachineSettings.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,22 @@ void menuEepromSettings(void)
case KEY_ICON_0:
// save to EEPROM
if (infoMachineSettings.EEPROM == 1)
{
setDialogText(eepromSettingsItems.title.index, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, saveEepromSettings, NULL, NULL);
}
popupDialog(DIALOG_TYPE_QUESTION, eepromSettingsItems.title.index, LABEL_EEPROM_SAVE_INFO,
LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
break;

case KEY_ICON_1:
// restore from EEPROM
if (infoMachineSettings.EEPROM == 1)
{
setDialogText(eepromSettingsItems.title.index, LABEL_EEPROM_RESTORE_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, restoreEepromSettings, NULL, NULL);
}
popupDialog(DIALOG_TYPE_QUESTION, eepromSettingsItems.title.index, LABEL_EEPROM_RESTORE_INFO,
LABEL_CONFIRM, LABEL_CANCEL, restoreEepromSettings, NULL, NULL);
break;

case KEY_ICON_2:
// reset EEPROM
if (infoMachineSettings.EEPROM == 1)
{
setDialogText(eepromSettingsItems.title.index, LABEL_EEPROM_RESET_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, resetEepromSettings, NULL, NULL);
}
popupDialog(DIALOG_TYPE_QUESTION, eepromSettingsItems.title.index, LABEL_EEPROM_RESET_INFO,
LABEL_CONFIRM, LABEL_CANCEL, resetEepromSettings, NULL, NULL);
break;

case KEY_ICON_7:
Expand Down
5 changes: 1 addition & 4 deletions TFT/src/User/Menu/MeshEditor.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,7 @@ void meshSave(bool saveOnChange)
return;

if (infoMachineSettings.EEPROM == 1)
{
setDialogText((uint8_t *) meshData->saveTitle, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, meshSaveCallback, NULL, NULL);
}
popupDialog(DIALOG_TYPE_QUESTION, (uint8_t *) meshData->saveTitle, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL, meshSaveCallback, NULL, NULL);
}

bool meshIsWaitingFirstData(void)
Expand Down
6 changes: 2 additions & 4 deletions TFT/src/User/Menu/More.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ void menuMore(void)
case KEY_ICON_2:
if (isPrinting() && !isPaused()) // need paused before extrude
{
setDialogText(LABEL_WARNING, LABEL_IS_PAUSE, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, isPauseExtrude, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_WARNING, LABEL_IS_PAUSE, LABEL_CONFIRM, LABEL_CANCEL, isPauseExtrude, NULL, NULL);
}
else
{
Expand All @@ -80,8 +79,7 @@ void menuMore(void)
#ifdef LOAD_UNLOAD_M701_M702
if (isPrinting() && !isPaused()) // need paused before extrude
{
setDialogText(LABEL_WARNING, LABEL_IS_PAUSE, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, isPauseLoadUnload, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_WARNING, LABEL_IS_PAUSE, LABEL_CONFIRM, LABEL_CANCEL, isPauseLoadUnload, NULL, NULL);
}
else
{
Expand Down
12 changes: 4 additions & 8 deletions TFT/src/User/Menu/ParameterSettings.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ void menuParameterSettings(void)
case KEY_BACK:
if (parametersChanged && infoMachineSettings.EEPROM == 1)
{
setDialogText(title.index, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, saveEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_QUESTION, title.index, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
parametersChanged = false;
}
else
Expand Down Expand Up @@ -296,21 +295,18 @@ void menuParameterSettings(void)
uint8_t curIndex_e = (curIndex - enabledParameterCount);
if (curIndex_e == P_SAVE_SETTINGS)
{
setDialogText(title.index, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, saveEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, title.index, LABEL_EEPROM_SAVE_INFO, LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
parametersChanged = false;
break;
}
else if (curIndex_e == P_RESET_SETTINGS)
{
setDialogText(LABEL_SETTINGS_RESET, LABEL_SETTINGS_RESET_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, resetEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_SETTINGS_RESET, LABEL_SETTINGS_RESET_INFO, LABEL_CONFIRM, LABEL_CANCEL, resetEepromSettings, NULL, NULL);
break;
}
else if (curIndex_e == P_RESTORE_SETTINGS)
{
setDialogText(LABEL_SETTINGS_RESTORE, LABEL_EEPROM_RESTORE_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, restoreEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_ALERT, LABEL_SETTINGS_RESTORE, LABEL_EEPROM_RESTORE_INFO, LABEL_CONFIRM, LABEL_CANCEL, restoreEepromSettings, NULL, NULL);
break;
}
}
Expand Down
12 changes: 3 additions & 9 deletions TFT/src/User/Menu/Pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ void pidResultAction(void)
if (infoMachineSettings.EEPROM == 1)
{
sprintf(&tempMsg[strlen(tempMsg)], "\n %s", textSelect(LABEL_EEPROM_SAVE_INFO));

setDialogText(LABEL_PID_TITLE, (uint8_t *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_SUCCESS, saveEepromSettings, NULL, NULL);
popupDialog(DIALOG_TYPE_SUCCESS, LABEL_PID_TITLE, (uint8_t *) tempMsg, LABEL_CONFIRM, LABEL_CANCEL, saveEepromSettings, NULL, NULL);
}
else
{
Expand Down Expand Up @@ -215,8 +213,7 @@ void menuPid(void)
}
else
{
setDialogText(pidItems.title.index, LABEL_TUNE_START_INFO, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, pidStart, NULL, NULL);
popupDialog(DIALOG_TYPE_QUESTION, pidItems.title.index, LABEL_TUNE_START_INFO, LABEL_CONFIRM, LABEL_CANCEL, pidStart, NULL, NULL);
}
break;

Expand All @@ -235,10 +232,7 @@ void menuPid(void)
else
{
if (getMenuType() != MENU_TYPE_SPLASH)
{
setDialogText(LABEL_SCREEN_INFO, LABEL_BUSY, LABEL_NULL, LABEL_NULL);
showDialog(DIALOG_TYPE_INFO, NULL, NULL, NULL);
}
popupSplash(DIALOG_TYPE_INFO, LABEL_SCREEN_INFO, LABEL_BUSY);

if (OS_GetTimeMs() > pidTimeout)
pidUpdateStatus(PID_TIMEOUT);
Expand Down
Loading