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

ExtrusionMenu-Load/UnLoadToMoreMenu #1466

Merged
merged 29 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c274e56
Merge pull request #4 from bigtreetech/master
kisslorand Nov 28, 2020
027126d
Deafult MKS_32_V1_4
kisslorand Nov 28, 2020
52fa0cf
Merge branch 'master' of https://github.com/bigtreetech/BIGTREETECH-T…
kisslorand Nov 30, 2020
81de5ef
PlatformIO.ini defaulted back to BIGTREE_TFT35_V3_0
kisslorand Dec 2, 2020
339d888
Merge pull request #7 from bigtreetech/master
kisslorand Dec 4, 2020
487fe10
Merge pull request #11 from bigtreetech/master
kisslorand Dec 15, 2020
af86e84
Merge pull request #12 from bigtreetech/master
kisslorand Dec 19, 2020
87ccabf
Merge pull request #13 from bigtreetech/master
kisslorand Dec 24, 2020
853df34
Post-merge fixes
kisslorand Dec 24, 2020
a4f3047
Merge branch 'master' of https://github.com/bigtreetech/BIGTREETECH-T…
kisslorand Dec 24, 2020
2b9234b
Post-merge fixes
kisslorand Dec 24, 2020
8439b31
Merge branch 'master' of https://github.com/bigtreetech/BIGTREETECH-T…
kisslorand Dec 26, 2020
158afb5
Merge branch 'master' of https://github.com/bigtreetech/BIGTREETECH-T…
kisslorand Dec 30, 2020
545419a
Merge branch 'master' of https://github.com/bigtreetech/BIGTREETECH-T…
kisslorand Dec 30, 2020
7441718
UnLoad-Extrusion-MoreMenu
kisslorand Dec 31, 2020
5868fe9
Merge pull request #15 from bigtreetech/master
kisslorand Dec 31, 2020
4e11d50
Merge branch 'master' of https://github.com/kisslorand/BIGTREETECH-TFT
kisslorand Dec 31, 2020
c33ae2b
Update prebuilt binaries
Dec 31, 2020
3a495a3
Merge branch 'master' of https://github.com/kisslorand/BIGTREETECH-TF…
kisslorand Dec 31, 2020
105ff58
Delete bin files
kisslorand Dec 31, 2020
992c064
Cleanup (@digant73-extrude.c)
kisslorand Jan 3, 2021
03a27f3
Merge branch 'master' of https://github.com/bigtreetech/BIGTREETECH-T…
kisslorand Jan 5, 2021
1e0985b
Update prebuilt binaries
Jan 5, 2021
b238210
Merge branch 'master' of https://github.com/bigtreetech/BIGTREETECH-T…
kisslorand Jan 8, 2021
8eff380
Merge branch 'master' of https://github.com/kisslorand/BIGTREETECH-TF…
kisslorand Jan 8, 2021
f969f15
Merge Fix
kisslorand Jan 8, 2021
369a727
Merge branch 'master' of https://github.com/bigtreetech/BIGTREETECH-T…
kisslorand Jan 12, 2021
ea612ee
sync
Msq001 Jan 12, 2021
65f4e5c
Merge remote-tracking branch 'origin/master' into Menu-More---Load/Un…
Msq001 Jan 12, 2021
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
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ label_filament_sensor:Filament sensor
label_filament_runout:Filament runout!
label_preheat:Preheat
label_preheat_both:Both
label_is_pause:Unable to extrude when\nprinting.\nPause printing?
label_is_pause:Action not allowed while printing.\n \nPause printing?
label_auto_shut_down:Auto Power
label_unifiedmove:Movement
label_unifiedheat:Heat/Fan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ label_filament_sensor:Filament érzékelő
label_filament_runout:Filament kifutás!
label_preheat:Előfűtés
label_preheat_both:Mindkettő
label_is_pause:Nem sikerült az adagolás\na nyomtatás alatt.\nSzünetelteted a nyomtatást?
label_is_pause:A művelet tiltva van\na nyomtatás alatt.\nSzünetelteted a nyomtatást?
label_auto_shut_down:Automata kikapcsolás
label_unifiedmove:Mozgás
label_unifiedheat:Fűt/Hűt
Expand Down
Empty file modified Copy to SD Card root directory to update/MKSTFT28.bin
100755 → 100644
Empty file.
Empty file modified Copy to SD Card root directory to update/MKS_32_V1_4.26.x.bin
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion TFT/src/User/API/Language/language_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
#define STRING_FILAMENT_RUNOUT "Filament runout!"
#define STRING_PREHEAT "Preheat"
#define STRING_PREHEAT_BOTH "Both"
#define STRING_IS_PAUSE "Unable to extrude when\nprinting.\nPause printing?"
#define STRING_IS_PAUSE "Action not allowed while printing.\n \nPause printing?"
#define STRING_AUTO_SHUT_DOWN "Auto Power"
#define STRING_UNIFIEDMOVE "Movement"
#define STRING_UNIFIEDHEAT "Heat/Fan"
Expand Down
2 changes: 1 addition & 1 deletion TFT/src/User/API/Language/language_hu.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
#define STRING_FILAMENT_RUNOUT "Filament kifutás!"
#define STRING_PREHEAT "Előfűtés"
#define STRING_PREHEAT_BOTH "Mindkettő"
#define STRING_IS_PAUSE "Nem sikerült az adagolás\na nyomtatás alatt.\nSzünetelteted a nyomtatást?"
#define STRING_IS_PAUSE "A művelet tiltva van\na nyomtatás alatt.\nSzünetelteted a nyomtatást?"
#define STRING_AUTO_SHUT_DOWN "Automata kikapcsolás"
#define STRING_UNIFIEDMOVE "Mozgás"
#define STRING_UNIFIEDHEAT "Fűt/Hűt"
Expand Down
36 changes: 31 additions & 5 deletions TFT/src/User/Menu/Extrude.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ void menuExtrude(void)
{ICON_BACKGROUND, LABEL_BACKGROUND},
{ICON_BACKGROUND, LABEL_BACKGROUND},
{ICON_LOAD, LABEL_LOAD},
{ICON_NOZZLE, LABEL_NOZZLE},
{ICON_BACKGROUND, LABEL_BACKGROUND},
{ICON_E_5_MM, LABEL_5_MM},
{ICON_NORMAL_SPEED, LABEL_NORMAL_SPEED},
{ICON_BACK, LABEL_BACK},}
};

extrudeItems.items[KEY_ICON_4].icon = (infoSettings.ext_count > 1) ? ICON_NOZZLE : ICON_HEAT;
extrudeItems.items[KEY_ICON_4].label.index = (infoSettings.ext_count > 1) ? LABEL_NOZZLE : LABEL_HEAT;

while (infoCmd.count != 0)
{
loopProcess();
Expand Down Expand Up @@ -94,8 +97,15 @@ void menuExtrude(void)
break;

case KEY_ICON_4:
curExtruder_index = (curExtruder_index + 1) % infoSettings.ext_count;
extrudeCoordinateReDraw(false);
if (infoSettings.ext_count > 1)
{
curExtruder_index = (curExtruder_index + 1) % infoSettings.ext_count;
extrudeCoordinateReDraw(false);
}
else
{
infoMenu.menu[++infoMenu.cur] = menuHeat;
}
break;

case KEY_ICON_5:
Expand All @@ -111,6 +121,18 @@ void menuExtrude(void)
break;

case KEY_ICON_7:
if (!isPrinting())
{
for (uint8_t i = 0; i < infoSettings.hotend_count; i++)
{
if (heatGetTargetTemp(i) > 0)
{
setDialogText(LABEL_WARNING, LABEL_HEATERS_ON, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, heatCoolDown, NULL, NULL);
break;
}
}
}
infoMenu.cur--;
break;

Expand All @@ -130,11 +152,15 @@ void menuExtrude(void)
storeCmd("%s\n", tool_change[curExtruder_index]);

if (heatGetCurrentTemp(curExtruder_index) < infoSettings.min_ext_temp)
{
{ // low temperature warning
char tempMsg[120];
LABELCHAR(tempStr, LABEL_EXT_TEMPLOW);
sprintf(tempMsg, tempStr, infoSettings.min_ext_temp);
popupReminder(DIALOG_TYPE_ERROR, LABEL_COLD_EXT, (u8 *)tempMsg);
strcat(tempMsg, "\n");
sprintf(tempStr, (char *)textSelect(LABEL_HEAT_HOTEND), infoSettings.min_ext_temp);
strcat(tempMsg, tempStr);
setDialogText(LABEL_WARNING, (uint8_t *)tempMsg, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ERROR, setHotendMinExtTemp, NULL, NULL);
}
else
{
Expand Down
14 changes: 8 additions & 6 deletions TFT/src/User/Menu/LoadUnload.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ void menuLoadUnload(void)

setDialogText(LABEL_WARNING, (uint8_t *)tempMsg, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ERROR, setHotendMinExtTemp, NULL, NULL);
// popupReminder(DIALOG_TYPE_ERROR, LABEL_COLD_EXT, (u8 *)tempMsg);
}
else if (key_num == KEY_ICON_0)
{ // unload
Expand Down Expand Up @@ -112,13 +111,16 @@ void menuLoadUnload(void)
break;

case KEY_ICON_7:
for (uint8_t i = 0; i < infoSettings.hotend_count; i++)
if (!isPrinting())
{
if (heatGetTargetTemp(i) > 0)
for (uint8_t i = 0; i < infoSettings.hotend_count; i++)
{
setDialogText(LABEL_WARNING, LABEL_HEATERS_ON, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, heatCoolDown, NULL, NULL);
break;
if (heatGetTargetTemp(i) > 0)
{
setDialogText(LABEL_WARNING, LABEL_HEATERS_ON, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_QUESTION, heatCoolDown, NULL, NULL);
break;
}
}
}
infoMenu.cur--;
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/Menu/LoadUnload.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extern "C" {
#endif

void menuLoadUnload(void);
void setHotendMinExtTemp(void);


#ifdef __cplusplus
Expand Down
12 changes: 10 additions & 2 deletions TFT/src/User/Menu/MainPage.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ void menuMain(void)
// icon label
{{ICON_HEAT_FAN, LABEL_UNIFIEDHEAT},
{ICON_HOME_MOVE, LABEL_UNIFIEDMOVE},
{ICON_EXTRUDE, LABEL_EXTRUDE},
#ifdef LOAD_UNLOAD_M701_M702
{ICON_EXTRUDE, LABEL_LOAD_UNLOAD_SHORT},
#else
{ICON_EXTRUDE, LABEL_EXTRUDE},
#endif
{ICON_STOP, LABEL_EMERGENCYSTOP},
{ICON_GCODE, LABEL_TERMINAL},
{ICON_CUSTOM, LABEL_CUSTOM},
Expand Down Expand Up @@ -42,7 +46,11 @@ void menuMain(void)
break;

case KEY_ICON_2:
infoMenu.menu[++infoMenu.cur] = menuExtrude;
#ifdef LOAD_UNLOAD_M701_M702
infoMenu.menu[++infoMenu.cur] = menuLoadUnload;
#else
infoMenu.menu[++infoMenu.cur] = menuExtrude;
#endif
break;

case KEY_ICON_3:
Expand Down
30 changes: 26 additions & 4 deletions TFT/src/User/Menu/More.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,26 @@ const MENUITEMS moreItems = {
{ICON_PERCENTAGE, LABEL_PERCENTAGE},
{ICON_FEATURE_SETTINGS, LABEL_FEATURE_SETTINGS},
{ICON_MACHINE_SETTINGS, LABEL_MACHINE_SETTINGS},
{ICON_GCODE, LABEL_TERMINAL},
#ifdef LOAD_UNLOAD_M701_M702
{ICON_EXTRUDE, LABEL_LOAD_UNLOAD_SHORT},
#else
{ICON_GCODE, LABEL_TERMINAL},
#endif
{ICON_BACK, LABEL_BACK},}
};

void isPauseConfirm(void)
void isPauseExtrude(void)
{
if(setPrintPause(true,false))
infoMenu.menu[infoMenu.cur] = menuExtrude;
}

void isPauseLoadUnload(void)
{
if(setPrintPause(true,false))
infoMenu.menu[infoMenu.cur] = menuLoadUnload;
}

void menuMore(void)
{
KEY_VALUES key_num;
Expand All @@ -44,7 +54,7 @@ void menuMore(void)
if (isPrinting() && !isPause()) // need paused before extrude
{
setDialogText(LABEL_WARNING, LABEL_IS_PAUSE, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, isPauseConfirm, NULL, NULL);
showDialog(DIALOG_TYPE_ALERT, isPauseExtrude, NULL, NULL);
}
else
{
Expand All @@ -65,7 +75,19 @@ void menuMore(void)
break;

case KEY_ICON_6:
infoMenu.menu[++infoMenu.cur] = menuSendGcode;
#ifdef LOAD_UNLOAD_M701_M702
if (isPrinting() && !isPause()) // need paused before extrude
{
setDialogText(LABEL_WARNING, LABEL_IS_PAUSE, LABEL_CONFIRM, LABEL_CANCEL);
showDialog(DIALOG_TYPE_ALERT, isPauseLoadUnload, NULL, NULL);
}
else
{
infoMenu.menu[++infoMenu.cur] = menuLoadUnload;
}
#else
infoMenu.menu[++infoMenu.cur] = menuSendGcode;
#endif
break;

case KEY_ICON_7:
Expand Down
28 changes: 10 additions & 18 deletions TFT/src/User/Menu/UnifiedMove.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,20 @@ void menuUnifiedMove(void)
// icon label
{{ICON_HOME, LABEL_HOME},
{ICON_MOVE, LABEL_MOVE},
{ICON_EXTRUDE, LABEL_EXTRUDE},
{ICON_DISABLE_STEPPERS, LABEL_DISABLE_STEPPERS},
{ICON_BABYSTEP, LABEL_BABYSTEP},
{ICON_MANUAL_LEVEL, LABEL_LEVELING},
{ICON_BACKGROUND, LABEL_BACKGROUND},
{ICON_BABYSTEP, LABEL_BABYSTEP},
{ICON_DISABLE_STEPPERS, LABEL_DISABLE_STEPPERS},
#ifdef LOAD_UNLOAD_M701_M702
{ICON_EXTRUDE, LABEL_LOAD_UNLOAD_SHORT},
#else
{ICON_EXTRUDE, LABEL_EXTRUDE},
#endif
{ICON_BACK, LABEL_BACK}}
};

KEY_VALUES key_num = KEY_IDLE;

if (infoMachineSettings.leveling != BL_DISABLED)
{
UnifiedMoveItems.items[3].icon = ICON_LEVELING;
UnifiedMoveItems.items[3].label.index = LABEL_BED_LEVELING;
UnifiedMoveItems.items[6].icon = ICON_LEVELING;
UnifiedMoveItems.items[6].label.index = LABEL_BED_LEVELING;
}

menuDrawPage(&UnifiedMoveItems);
Expand All @@ -46,28 +42,24 @@ void menuUnifiedMove(void)
break;

case KEY_ICON_2:
infoMenu.menu[++infoMenu.cur] = menuManualLeveling;
infoMenu.menu[++infoMenu.cur] = menuExtrude;
break;

case KEY_ICON_3:
if (infoMachineSettings.leveling != BL_DISABLED)
infoMenu.menu[++infoMenu.cur] = menuBedLeveling;
storeCmd("M84\n");
break;

case KEY_ICON_4:
infoMenu.menu[++infoMenu.cur] = menuBabystep;
break;

case KEY_ICON_5:
storeCmd("M84\n");
infoMenu.menu[++infoMenu.cur] = menuManualLeveling;
break;

case KEY_ICON_6:
#ifdef LOAD_UNLOAD_M701_M702
infoMenu.menu[++infoMenu.cur] = menuLoadUnload;
#else
infoMenu.menu[++infoMenu.cur] = menuExtrude;
#endif
if (infoMachineSettings.leveling != BL_DISABLED)
infoMenu.menu[++infoMenu.cur] = menuBedLeveling;
break;

case KEY_ICON_7:
Expand Down