Skip to content

Commit

Permalink
LCD menu only sends // action:ready or // action:not_ready via se…
Browse files Browse the repository at this point in the history
…rial

Host has to send back state with `M72 S1|0` to keep printer and host in sync
Changed LCD menu messages to `Set ready` and `Set not ready`
Updated translations
  • Loading branch information
3d-gussner committed Nov 21, 2023
1 parent 30aa006 commit 685bf14
Show file tree
Hide file tree
Showing 17 changed files with 183 additions and 107 deletions.
5 changes: 4 additions & 1 deletion Firmware/messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ 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
const char MSG_SET_READY[] PROGMEM_I1 = ISTR("Set Ready"); ////MSG_SET_READY c=13
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
const char MSG_SELECT_LANGUAGE[] PROGMEM_I1 = ISTR("Select language"); ////MSG_SELECT_LANGUAGE c=18
const char MSG_SORTING_FILES[] PROGMEM_I1 = ISTR("Sorting files"); ////MSG_SORTING_FILES c=20
const char MSG_TOTAL[] PROGMEM_I1 = ISTR("Total"); ////MSG_TOTAL c=6
Expand Down Expand Up @@ -229,6 +230,8 @@ const char MSG_OCTOPRINT_PAUSED[] PROGMEM_N1 = "// action:paused"; ////
const char MSG_OCTOPRINT_ASK_RESUME[] PROGMEM_N1 = "// action:resume"; ////
const char MSG_OCTOPRINT_RESUMED[] PROGMEM_N1 = "// action:resumed"; ////
const char MSG_OCTOPRINT_CANCEL[] PROGMEM_N1 = "// action:cancel"; ////
const char MSG_OCTOPRINT_READY[] PROGMEM_N1 = "// action:ready"; ////
const char MSG_OCTOPRINT_NOT_READY[] PROGMEM_N1 = "// action:not_ready"; ////
const char MSG_FANCHECK_HOTEND[] PROGMEM_N1 = "Err:HOTEND FAN ERROR"; ////c=20
const char MSG_FANCHECK_PRINT[] PROGMEM_N1 = "Err:PRINT FAN ERROR"; ////c=20
const char MSG_M112_KILL[] PROGMEM_N1 = "M112 called. Emergency Stop."; ////c=20
Expand Down
3 changes: 3 additions & 0 deletions Firmware/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ extern const char MSG_SELFTEST_FILAMENT_SENSOR[];
extern const char MSG_SELFTEST_WIRINGERROR[];
extern const char MSG_SETTINGS[];
extern const char MSG_SET_READY[];
extern const char MSG_SET_NOT_READY[];
extern const char MSG_SELECT_LANGUAGE[];
extern const char MSG_SORTING_FILES[];
extern const char MSG_TOTAL[];
Expand Down Expand Up @@ -232,6 +233,8 @@ extern const char MSG_OCTOPRINT_PAUSED[];
extern const char MSG_OCTOPRINT_ASK_RESUME[];
extern const char MSG_OCTOPRINT_RESUMED[];
extern const char MSG_OCTOPRINT_CANCEL[];
extern const char MSG_OCTOPRINT_READY[];
extern const char MSG_OCTOPRINT_NOT_READY[];
extern const char MSG_FANCHECK_HOTEND[];
extern const char MSG_FANCHECK_PRINT[];
extern const char MSG_M112_KILL[];
Expand Down
13 changes: 6 additions & 7 deletions Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5121,13 +5121,12 @@ static void lcd_sheet_menu()
}

//! @brief Set printer state
//! Sets the printer state for next print via LCD menu
//! 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
//! @endcode
static void lcd_printer_status_toggle()
static void lcd_printer_ready_state_toggle()
{
if (GetPrinterState() == PrinterState::IsReady) SetPrinterState(PrinterState::NotReady);
else SetPrinterState(PrinterState::IsReady);
enquecommandf_P(PSTR("M118 A1 action:%S"), (GetPrinterState() == PrinterState::IsReady) ? "ready" : "not_ready");
enquecommandf_P(PSTR("M118 %S"), (GetPrinterState() == PrinterState::IsReady) ? MSG_OCTOPRINT_NOT_READY : MSG_OCTOPRINT_READY);
}

//! @brief Show Main Menu
Expand Down Expand Up @@ -5204,9 +5203,9 @@ static void lcd_main_menu()
}
if (GetPrinterState() < PrinterState::IsSDPrinting && M79_timer_get_status()) {
if(GetPrinterState() == PrinterState::IsReady) {
MENU_ITEM_TOGGLE_P(_T(MSG_SET_READY), _T(MSG_NO), lcd_printer_status_toggle);
MENU_ITEM_FUNCTION_P(_T(MSG_SET_NOT_READY), lcd_printer_ready_state_toggle);
} else {
MENU_ITEM_TOGGLE_P(_T(MSG_SET_READY), _T(MSG_YES), lcd_printer_status_toggle);
MENU_ITEM_FUNCTION_P(_T(MSG_SET_READY), lcd_printer_ready_state_toggle);
}
}
if (mesh_bed_leveling_flag == false && homing_flag == false && !isPrintPaused && !processing_tcode) {
Expand Down
7 changes: 6 additions & 1 deletion lang/po/Firmware.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1939,11 +1939,16 @@ msgstr ""
msgid "Sensor verified, remove the filament now."
msgstr ""

#. MSG_SET_READY c=13
#. MSG_SET_READY c=18
#: ../../Firmware/messages.cpp:104 ../../Firmware/ultralcd.cpp:5204
msgid "Set Ready"
msgstr ""

#. MSG_SET_NOT_READY c=18
#: ../../Firmware/messages.cpp:106 ../../Firmware/ultralcd.cpp:5211
msgid "Set not Ready"
msgstr ""

#. MSG_SET_TEMPERATURE c=20
#: ../../Firmware/ultralcd.cpp:2706
msgid "Set temperature:"
Expand Down
11 changes: 8 additions & 3 deletions lang/po/Firmware_cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -1429,8 +1429,8 @@ msgid ""
"PINDA calibration is finished and active. It can be disabled in menu "
"Settings->PINDA cal."
msgstr ""
"PINDA kalibrace dokončena a je nyní aktivní. Lze deaktivovat v "
"menu Nastavení->Tepl. kal."
"PINDA kalibrace dokončena a je nyní aktivní. Lze deaktivovat v menu "
"Nastavení->Tepl. kal."

#. MSG_TITLE_PULLEY_CANNOT_MOVE c=20
#: ../../Firmware/mmu2/errors_list.h:142 ../../Firmware/mmu2/errors_list.h:196
Expand Down Expand Up @@ -2555,11 +2555,16 @@ msgstr "Citlivost"
msgid "Mesh bed leveling failed. Please run Z calibration."
msgstr "Mesh Bed Leveling selhal. Spusťte kalibraci osy Z."

#. MSG_SET_READY c=13
#. MSG_SET_READY c=18
#: ../../Firmware/messages.cpp:104 ../../Firmware/ultralcd.cpp:5204
msgid "Set Ready"
msgstr "Připravit"

#. MSG_SET_NOT_READY c=18
#: ../../Firmware/messages.cpp:106 ../../Firmware/ultralcd.cpp:5211
msgid "Set not Ready"
msgstr "Zrušit Připravena"

#~ msgid "Remove old filament and press the knob to start loading new filament."
#~ msgstr "Vyjmete stary filament a stisknete tlacitko pro zavedeni noveho."

Expand Down
15 changes: 10 additions & 5 deletions lang/po/Firmware_de.po
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ msgid ""
"FINDA didn't switch off while unloading filament. Try unloading manually. "
"Ensure filament can move and FINDA works."
msgstr ""
"FINDA nicht ausgeschaltet beim Entladen. Entlade Fil. manuell. Bewegt sich"
" Fil.? Funktioniert FINDA?"
"FINDA nicht ausgeschaltet beim Entladen. Entlade Fil. manuell. Bewegt sich "
"Fil.? Funktioniert FINDA?"

#. MSG_DESC_FINDA_DIDNT_TRIGGER c=20 r=8
#: ../../Firmware/mmu2/errors_list.h:241 ../../Firmware/mmu2/errors_list.h:297
Expand Down Expand Up @@ -2519,8 +2519,8 @@ msgid ""
"Selector can't move due to FINDA detecting a filament. Make sure no filament"
" is in Selector and FINDA works properly."
msgstr ""
"Selektor kann sich nicht bewegen, da FINDA Fil. erkannt hat. Stelle sicher,"
" dass sich kein Fil. im Selektor befindet und FINDA richtig funktioniert."
"Selektor kann sich nicht bewegen, da FINDA Fil. erkannt hat. Stelle sicher, "
"dass sich kein Fil. im Selektor befindet und FINDA richtig funktioniert."

#. MSG_DESC_FW_UPDATE_NEEDED c=20 r=8
#: ../../Firmware/mmu2/errors_list.h:289 ../../Firmware/mmu2/errors_list.h:336
Expand Down Expand Up @@ -2583,11 +2583,16 @@ msgstr "Sensitivität"
msgid "Mesh bed leveling failed. Please run Z calibration."
msgstr "MeshBett Ausgleich fehlgeschlagen. Z Kalibrierung ausführen."

#. MSG_SET_READY c=13
#. MSG_SET_READY c=18
#: ../../Firmware/messages.cpp:104 ../../Firmware/ultralcd.cpp:5204
msgid "Set Ready"
msgstr "Bereit setzen"

#. MSG_SET_NOT_READY c=18
#: ../../Firmware/messages.cpp:106 ../../Firmware/ultralcd.cpp:5211
msgid "Set not Ready"
msgstr "Nicht breit setzen"

#~ msgid "Remove old filament and press the knob to start loading new filament."
#~ msgstr "Entferne das alte Fil. und drücke den Knopf, um das neue zu laden."

Expand Down
33 changes: 19 additions & 14 deletions lang/po/Firmware_es.po
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ msgid ""
"Bed leveling failed. Sensor didn't trigger. Debris on nozzle? Waiting for "
"reset."
msgstr ""
"Falló la nivelación. Sensor no funciona. ¿Restos en boquilla? Esperando reset."
"Falló la nivelación. Sensor no funciona. ¿Restos en boquilla? Esperando "
"reset."

#. MSG_SELFTEST_BEDHEATER c=20
#: ../../Firmware/ultralcd.cpp:6596
Expand Down Expand Up @@ -810,8 +811,8 @@ msgid ""
"G-code sliced for a different level. Please re-slice the model again. Print "
"cancelled."
msgstr ""
"Código G laminado para un nivel diferente. Vuelve a laminar el modelo de nuevo. "
"Impresión cancelada."
"Código G laminado para un nivel diferente. Vuelve a laminar el modelo de "
"nuevo. Impresión cancelada."

#. MSG_GCODE_DIFF_PRINTER_CONTINUE c=20 r=3
#: ../../Firmware/messages.cpp:137 ../../Firmware/util.cpp:316
Expand All @@ -826,8 +827,8 @@ msgid ""
"G-code sliced for a different printer type. Please re-slice the model again."
" Print cancelled."
msgstr ""
"Código G laminado para una impresora diferente. Vuelve a laminar el modelo de nuevo."
" Impresión cancelada."
"Código G laminado para una impresora diferente. Vuelve a laminar el modelo "
"de nuevo. Impresión cancelada."

#. MSG_GCODE_NEWER_FIRMWARE_CONTINUE c=20 r=3
#: ../../Firmware/messages.cpp:139 ../../Firmware/util.cpp:366
Expand Down Expand Up @@ -888,8 +889,8 @@ msgid ""
"Hi, I am your Original Prusa i3 printer. Would you like me to guide you "
"through the setup process?"
msgstr ""
"Hola, soy tu impresora Original Prusa i3. ¿Quieres que te guíe a traves de la "
"configuración?"
"Hola, soy tu impresora Original Prusa i3. ¿Quieres que te guíe a traves de "
"la configuración?"

#. MSG_HIGH_POWER c=10
#: ../../Firmware/messages.cpp:108 ../../Firmware/ultralcd.cpp:4146
Expand Down Expand Up @@ -985,8 +986,7 @@ msgstr ""
#: ../../Firmware/mmu2/errors_list.h:282 ../../Firmware/mmu2/errors_list.h:337
msgid ""
"Internal runtime error. Try resetting the MMU or updating the firmware."
msgstr ""
"Error interno de ejecución. Reinicia la MMU o actualiza el firmware."
msgstr "Error interno de ejecución. Reinicia la MMU o actualiza el firmware."

#. MSG_FILAMENT_LOADED c=20 r=3
#: ../../Firmware/messages.cpp:38 ../../Firmware/ultralcd.cpp:3625
Expand Down Expand Up @@ -1527,8 +1527,8 @@ msgid ""
"Please insert filament into the first tube of the MMU, then press the knob "
"to load it."
msgstr ""
"Coloca el filamento en el primer tubo de la MMU, luego presiona el dial "
"para cargarlo."
"Coloca el filamento en el primer tubo de la MMU, luego presiona el dial para"
" cargarlo."

#. MSG_PLEASE_LOAD_PLA c=20 r=4
#: ../../Firmware/ultralcd.cpp:3630
Expand Down Expand Up @@ -1909,8 +1909,8 @@ msgstr "Fallo Selftest"
#: ../../Firmware/Marlin_main.cpp:1523
msgid "Selftest will be run to calibrate accurate sensorless rehoming."
msgstr ""
"Se realizará el selftest para calibrar con precision la vuelta a la "
"posición inicial sin sensores."
"Se realizará el selftest para calibrar con precision la vuelta a la posición"
" inicial sin sensores."

#. MSG_INFO_SENSORS c=18
#: ../../Firmware/ultralcd.cpp:1677
Expand Down Expand Up @@ -2578,11 +2578,16 @@ msgstr "Sensibilidad"
msgid "Mesh bed leveling failed. Please run Z calibration."
msgstr "Nivelación fallida. Ejecute la calibración Z."

#. MSG_SET_READY c=13
#. MSG_SET_READY c=18
#: ../../Firmware/messages.cpp:104 ../../Firmware/ultralcd.cpp:5204
msgid "Set Ready"
msgstr "Listo"

#. MSG_SET_NOT_READY c=18
#: ../../Firmware/messages.cpp:106 ../../Firmware/ultralcd.cpp:5211
msgid "Set not Ready"
msgstr "Conjunto no listo"

#~ msgid "Remove old filament and press the knob to start loading new filament."
#~ msgstr ""
#~ "Retira el fil. viejo y presiona el dial para comenzar a cargar el nuevo."
Expand Down
47 changes: 26 additions & 21 deletions lang/po/Firmware_fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ msgid ""
" Please follow the manual, chapter First steps, section First layer "
"calibration."
msgstr ""
"La distance entre de la buse et du lit n'a pas encore été réglée. Suivez"
" le manuel, chap. Premiers pas."
"La distance entre de la buse et du lit n'a pas encore été réglée. Suivez le "
"manuel, chap. Premiers pas."

#. MSG_WIZARD_REPEAT_V2_CAL c=20 r=7
#: ../../Firmware/ultralcd.cpp:3920
Expand Down Expand Up @@ -577,8 +577,8 @@ msgid ""
"FINDA didn't switch off while unloading filament. Try unloading manually. "
"Ensure filament can move and FINDA works."
msgstr ""
"FINDA non désactivé lors du déchargement du filament. Essayez de décharger "
"à la main. Assurez-vous que le filament peut bouger et que la FINDA "
"FINDA non désactivé lors du déchargement du filament. Essayez de décharger à"
" la main. Assurez-vous que le filament peut bouger et que la FINDA "
"fonctionne."

#. MSG_DESC_FINDA_DIDNT_TRIGGER c=20 r=8
Expand Down Expand Up @@ -770,8 +770,8 @@ msgstr "Cal. 1ere couche"
#: ../../Firmware/ultralcd.cpp:3843
msgid "First, I will run the selftest to check most common assembly problems."
msgstr ""
"Je vais lancer le selftest pour verifier les problèmes d'assemblage les "
"plus communs."
"Je vais lancer le selftest pour verifier les problèmes d'assemblage les plus"
" communs."

#. MSG_FLOW c=15
#: ../../Firmware/ultralcd.cpp:5440
Expand Down Expand Up @@ -814,8 +814,8 @@ msgid ""
"G-code sliced for a different level. Please re-slice the model again. Print "
"cancelled."
msgstr ""
"G-code a été préparé pour un niveau différent. Découpez le modèle à nouveau. "
"Impression annulée."
"G-code a été préparé pour un niveau différent. Découpez le modèle à nouveau."
" Impression annulée."

#. MSG_GCODE_DIFF_PRINTER_CONTINUE c=20 r=3
#: ../../Firmware/messages.cpp:137 ../../Firmware/util.cpp:316
Expand Down Expand Up @@ -892,8 +892,8 @@ msgid ""
"Hi, I am your Original Prusa i3 printer. Would you like me to guide you "
"through the setup process?"
msgstr ""
"Je suis votre imprimante Original Prusa i3. Voulez-vous que je vous "
"guide à travers le processus d'installation?
"Je suis votre imprimante Original Prusa i3. Voulez-vous que je vous guide à "
"travers le processus d'installation"

#. MSG_HIGH_POWER c=10
#: ../../Firmware/messages.cpp:108 ../../Firmware/ultralcd.cpp:4146
Expand Down Expand Up @@ -1389,7 +1389,8 @@ msgstr "Off"
#. MSG_DEFAULT_SETTINGS_LOADED c=20 r=6
#: ../../Firmware/Marlin_main.cpp:1508
msgid "Old settings found. Default PID, Esteps etc. will be set."
msgstr "Anciens réglages trouvés. Le PID, les Esteps, etc. par défaut seront réglés."
msgstr ""
"Anciens réglages trouvés. Le PID, les Esteps, etc. par défaut seront réglés."

#. MSG_ON c=3
#: ../../Firmware/SpoolJoin.cpp:23 ../../Firmware/messages.cpp:130
Expand Down Expand Up @@ -1452,8 +1453,8 @@ msgid ""
"PINDA calibration is finished and active. It can be disabled in menu "
"Settings->PINDA cal."
msgstr ""
"La calibration en PINDA est terminée et activée. Il peut être désactivé "
"dans le menu Réglages-> Calib. PINDA"
"La calibration en PINDA est terminée et activée. Il peut être désactivé dans"
" le menu Réglages-> Calib. PINDA"

#. MSG_TITLE_PULLEY_CANNOT_MOVE c=20
#: ../../Firmware/mmu2/errors_list.h:142 ../../Firmware/mmu2/errors_list.h:196
Expand Down Expand Up @@ -1752,8 +1753,8 @@ msgid ""
"Requested filament tool is not available on this hardware. Check the G-code "
"for tool index out of range (T0-T4)."
msgstr ""
"L'outil de filament demandé n'est pas disponible sur ce matériel. Recherchez "
"dans le G-Code un index d'outil hors plage (T0-T4)"
"L'outil de filament demandé n'est pas disponible sur ce matériel. Recherchez"
" dans le G-Code un index d'outil hors plage (T0-T4)"

#. MSG_RESET c=14
#: ../../Firmware/messages.cpp:85 ../../Firmware/ultralcd.cpp:2689
Expand Down Expand Up @@ -2144,7 +2145,6 @@ msgstr ""
"L'idler ne peut pas se mettre correctement à zéro. Vérifiez s'il y a quoi "
"que ce soit qui bloque son mouvement."


#. MSG_DESC_SELECTOR_CANNOT_HOME c=20 r=8
#: ../../Firmware/mmu2/errors_list.h:249 ../../Firmware/mmu2/errors_list.h:305
msgid ""
Expand All @@ -2168,7 +2168,8 @@ msgstr ""
msgid ""
"There is still a need to make Z calibration. Please follow the manual, "
"chapter First steps, section Calibration flow."
msgstr "Il faut toujours effectuer la calibration Z. Veuillez suivre le manuel."
msgstr ""
"Il faut toujours effectuer la calibration Z. Veuillez suivre le manuel."

#. MSG_SORT_TIME c=8
#: ../../Firmware/messages.cpp:149 ../../Firmware/ultralcd.cpp:4508
Expand Down Expand Up @@ -2366,8 +2367,7 @@ msgstr ""
#: ../../Firmware/ultralcd.cpp:3152
msgid "XYZ calibration failed. Bed calibration point was not found."
msgstr ""
"Échec calibration XYZ. Le point de calibration du lit n'a pas été "
"trouvé."
"Échec calibration XYZ. Le point de calibration du lit n'a pas été trouvé."

#. MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_BOTH_FAR c=20 r=6
#: ../../Firmware/ultralcd.cpp:3158
Expand Down Expand Up @@ -2590,10 +2590,15 @@ msgstr "Sensibilité"
msgid "Mesh bed leveling failed. Please run Z calibration."
msgstr "Mesh bed leveling a échoué. Veuillez procéder à l'étalonnage Z."

#. MSG_SET_READY c=13
#. MSG_SET_READY c=18
#: ../../Firmware/messages.cpp:104 ../../Firmware/ultralcd.cpp:5204
msgid "Set Ready"
msgstr "Ensemb. prête"
msgstr "Ensemble prête"

#. MSG_SET_NOT_READY c=18
#: ../../Firmware/messages.cpp:106 ../../Firmware/ultralcd.cpp:5211
msgid "Set not Ready"
msgstr "Ensemble pas prête"

#~ msgid "Remove old filament and press the knob to start loading new filament."
#~ msgstr ""
Expand Down
7 changes: 6 additions & 1 deletion lang/po/Firmware_hr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2572,11 +2572,16 @@ msgstr "Osjetljivost"
msgid "Mesh bed leveling failed. Please run Z calibration."
msgstr "Niveliranje podloge nije uspijelo. Pokrenite Z kalibraciju."

#. MSG_SET_READY c=13
#. MSG_SET_READY c=18
#: ../../Firmware/messages.cpp:104 ../../Firmware/ultralcd.cpp:5204
msgid "Set Ready"
msgstr "Set spreman"

#. MSG_SET_NOT_READY c=18
#: ../../Firmware/messages.cpp:106 ../../Firmware/ultralcd.cpp:5211
msgid "Set not Ready"
msgstr "Set nije spreman"

#~ msgid "Remove old filament and press the knob to start loading new filament."
#~ msgstr "Uklonite stari fil. i pritisnite gumb za pocetak stavljanja novog."

Expand Down
Loading

0 comments on commit 685bf14

Please sign in to comment.