Skip to content

Commit

Permalink
Merge pull request prusa3d#4737 from sarusani/ReplaceSetReadyMenuEntry
Browse files Browse the repository at this point in the history
Allow to replace Set Ready menu entry
  • Loading branch information
3d-gussner authored Aug 23, 2024
2 parents 7d66cd1 + a9e7f38 commit c27fb61
Show file tree
Hide file tree
Showing 29 changed files with 169 additions and 13 deletions.
4 changes: 4 additions & 0 deletions Firmware/messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ const char MSG_SELFTEST_MOTOR[] PROGMEM_I1 = ISTR("Motor"); ////MSG_SELFTEST_MOT
const char MSG_SELFTEST_FILAMENT_SENSOR[] PROGMEM_I1 = ISTR("Filament sensor"); ////MSG_SELFTEST_FILAMENT_SENSOR c=17
const char MSG_SELFTEST_WIRINGERROR[] PROGMEM_I1 = ISTR("Wiring error"); ////MSG_SELFTEST_WIRINGERROR c=18
const char MSG_SETTINGS[] PROGMEM_I1 = ISTR("Settings"); ////MSG_SETTINGS c=18
#ifndef REPLACE_SETREADY
const char MSG_SET_READY[] PROGMEM_I1 = ISTR("Set Ready"); ////MSG_SET_READY c=18
const char MSG_SET_NOT_READY[] PROGMEM_I1 = ISTR("Set not Ready"); ////MSG_SET_NOT_READY c=18
#else
const char MSG_HOSTPRINT[] PROGMEM_I1 = ISTR("Print from host"); ////MSG_HOSTPRINT c=18
#endif //REPLACE_SETREADY
#ifdef HOST_SHUTDOWN
const char MSG_SHUTDOWN_HOST[] PROGMEM_I1 = ISTR("Shutdown host"); ////MSG_SHUTDOWN_HOST c=18
#endif //HOST_SHUTOWN
Expand Down
4 changes: 4 additions & 0 deletions Firmware/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,12 @@ extern const char MSG_SELFTEST_MOTOR[];
extern const char MSG_SELFTEST_FILAMENT_SENSOR[];
extern const char MSG_SELFTEST_WIRINGERROR[];
extern const char MSG_SETTINGS[];
#ifndef REPLACE_SETREADY
extern const char MSG_SET_READY[];
extern const char MSG_SET_NOT_READY[];
#else
extern const char MSG_HOSTPRINT[];
#endif
#ifdef HOST_SHUTDOWN
extern const char MSG_SHUTDOWN_HOST[];
#endif //HOST_SHUTOWN
Expand Down
6 changes: 6 additions & 0 deletions Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5165,6 +5165,7 @@ static void lcd_sheet_menu()
MENU_END();
}

#ifndef REPLACE_SETREADY
//! @brief Set printer state
//! Sends the printer state for next print via LCD menu to host
//! The host has to set the printer ready state with `M72` to keep printer in sync with the host
Expand All @@ -5178,6 +5179,7 @@ static void lcd_printer_ready_state_toggle()
SERIAL_ECHOLNRPGM(MSG_HOST_ACTION_READY);
}
}
#endif

#ifdef HOST_SHUTDOWN
static void lcd_shutdown_menu()
Expand Down Expand Up @@ -5278,11 +5280,15 @@ static void lcd_main_menu()
} else if (!Stopped) {
MENU_ITEM_SUBMENU_P(_T(MSG_PREHEAT), lcd_preheat_menu);
if (M79_timer_get_status()) {
#ifndef REPLACE_SETREADY
if(GetPrinterState() == PrinterState::IsReady) {
MENU_ITEM_FUNCTION_P(_T(MSG_SET_NOT_READY), lcd_printer_ready_state_toggle);
} else {
MENU_ITEM_FUNCTION_P(_T(MSG_SET_READY), lcd_printer_ready_state_toggle);
}
#else
MENU_ITEM_FUNCTION_P(_T(MSG_HOSTPRINT), lcd_send_action_start);
#endif //REPLACE_SETREADY
}
}
if (mesh_bed_leveling_flag == false && homing_flag == false && !printingIsPaused() && !processing_tcode) {
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK25-RAMBo10a.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK25-RAMBo13a.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK25S-RAMBo10a.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK25S-RAMBo13a.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK3-E3DREVO.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK3-E3DREVO_HF_60W.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK3.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK3S-E3DREVO.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK3S-E3DREVO_HF_60W.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/MK3S.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,13 @@
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/obsolete/1_75mm_MK2-RAMBo10a-E3Dv6full.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,13 @@ ADDITIONAL FEATURES SETTINGS
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
8 changes: 7 additions & 1 deletion Firmware/variants/obsolete/1_75mm_MK2-RAMBo13a-E3Dv6full.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,13 @@ ADDITIONAL FEATURES SETTINGS
HOST FEATURES
*------------------------------------*/

//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
//#define HOST_SHUTDOWN

// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
// "Print from host" and send '//action:start' instead.
//#define REPLACE_SETREADY

/*------------------------------------
MOTOR CURRENT SETTINGS
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1970,6 +1970,11 @@ msgstr ""
msgid "Set not Ready"
msgstr ""

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr ""

#. MSG_SET_TEMPERATURE c=20
#: ../../Firmware/messages.cpp:262 ../../Firmware/ultralcd.cpp:2730
msgid "Set temperature:"
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -2573,6 +2573,11 @@ msgstr "Připravit"
msgid "Set not Ready"
msgstr "Zrušit Připravena"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Tisk z hosta"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_de.po
Original file line number Diff line number Diff line change
Expand Up @@ -2601,6 +2601,11 @@ msgstr "Bereit setzen"
msgid "Set not Ready"
msgstr "Nicht breit setzen"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Drucken vom Host"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_es.po
Original file line number Diff line number Diff line change
Expand Up @@ -2596,6 +2596,11 @@ msgstr "Listo"
msgid "Set not Ready"
msgstr "Conjunto no listo"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Imprimir host"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2608,6 +2608,11 @@ msgstr "Ensemble prête"
msgid "Set not Ready"
msgstr "Ensemble pas prête"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Impr depuis l'hôte"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_hr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2590,6 +2590,11 @@ msgstr "Set spreman"
msgid "Set not Ready"
msgstr "Set nije spreman"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Printaj sa host"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
7 changes: 6 additions & 1 deletion lang/po/Firmware_hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -2593,7 +2593,12 @@ msgstr "Készen áll"
#. MSG_SET_NOT_READY c=18
#: ../../Firmware/messages.cpp:106 ../../Firmware/ultralcd.cpp:5263
msgid "Set not Ready"
msgstr "Készen nem áll"
msgstr "Nem áll készen"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Nyomtatás gépről"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_it.po
Original file line number Diff line number Diff line change
Expand Up @@ -2596,6 +2596,11 @@ msgstr "Imposta pronta"
msgid "Set not Ready"
msgstr "Imposta non pronta"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Stampa da host"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -2598,6 +2598,11 @@ msgstr "Gereed zetten"
msgid "Set not Ready"
msgstr "Niet gereed zetten"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Print van host"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_no.po
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,11 @@ msgstr "Gjør klar"
msgid "Set not Ready"
msgstr "Sett ikke klar"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Print fra vert"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_pl.po
Original file line number Diff line number Diff line change
Expand Up @@ -2588,6 +2588,11 @@ msgstr "Ustaw gotowość"
msgid "Set not Ready"
msgstr "Cofnij gotowość"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Drukuj z hosta"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_ro.po
Original file line number Diff line number Diff line change
Expand Up @@ -2597,6 +2597,11 @@ msgstr "Printer pregătit"
msgid "Set not Ready"
msgstr "Print. nu pregătit"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Print. de pe gazdă"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
5 changes: 5 additions & 0 deletions lang/po/Firmware_sk.po
Original file line number Diff line number Diff line change
Expand Up @@ -2578,6 +2578,11 @@ msgstr "Pripravené"
msgid "Set not Ready"
msgstr "Nie je pripravené"

#. MSG_HOSTPRINT c=18
#: ../../Firmware/messages.cpp:107 ../../Firmware/ultralcd.cpp:5285
msgid "Print from host"
msgstr "Tlač z hostiteľa"

#. MSG_REPRINT c=18
#: ../../Firmware/messages.cpp:196 ../../Firmware/ultralcd.cpp:5243
#: ../../Firmware/ultralcd.cpp:5245
Expand Down
Loading

0 comments on commit c27fb61

Please sign in to comment.