Skip to content

Commit

Permalink
🌐 DGUS Reloaded non-accented French (MarlinFirmware#25443)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
  • Loading branch information
2 people authored and Andy-Big committed Jul 9, 2023
1 parent 983303f commit ee93745
Show file tree
Hide file tree
Showing 16 changed files with 804 additions and 110 deletions.
1 change: 1 addition & 0 deletions Marlin/src/core/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
// eu Basque-Euskera
// fi Finnish
// fr French
// fr_na French without accents (DWIN T5UID1 touchscreen)
// gl Galician
// hr Croatian
// hu Hungarian
Expand Down
10 changes: 10 additions & 0 deletions Marlin/src/lcd/dogm/fontdata/langdata_fr_na.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#pragma once

#include "langdata.h"

static const uxg_fontinfo_t g_fontinfo_fr_na[] PROGMEM = {};
80 changes: 34 additions & 46 deletions Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) {

if (vp.addr == DGUS_Addr::SCREENCHANGE_Idle
&& (ExtUI::isPrinting() || ExtUI::isPrintingPaused())) {
dgus_screen_handler.SetStatusMessage(F("Impossible while printing"));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_NOT_WHILE_PRINTING));
return;
}

if (vp.addr == DGUS_Addr::SCREENCHANGE_Printing
&& (!ExtUI::isPrinting() && !ExtUI::isPrintingPaused())) {
dgus_screen_handler.SetStatusMessage(F("Impossible while idle"));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_NOT_WHILE_IDLE));
return;
}

Expand Down Expand Up @@ -137,7 +137,7 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) {
UNUSED(data_ptr);

if (dgus_screen_handler.filelist_selected < 0) {
dgus_screen_handler.SetStatusMessage(F("No file selected"));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_NO_FILE_SELECTED));
return;
}

Expand All @@ -147,7 +147,7 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) {
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand Down Expand Up @@ -205,7 +205,7 @@ void DGUSRxHandler::PrintResume(DGUS_VP &vp, void *data_ptr) {
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand Down Expand Up @@ -362,7 +362,7 @@ void DGUSRxHandler::TempCool(DGUS_VP &vp, void *data_ptr) {
#endif
}

dgus_screen_handler.SetStatusMessage(F("Cooling..."));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(MSG_COOLING));

dgus_screen_handler.TriggerFullUpdate();
}
Expand All @@ -388,12 +388,12 @@ void DGUSRxHandler::ZOffset(DGUS_VP &vp, void *data_ptr) {
UNUSED(vp);

if (!ExtUI::isAxisPositionKnown(ExtUI::Z)) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_HOMING_REQUIRED));
return;
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand All @@ -412,12 +412,12 @@ void DGUSRxHandler::ZOffsetStep(DGUS_VP &vp, void *data_ptr) {
UNUSED(vp);

if (!ExtUI::isAxisPositionKnown(ExtUI::Z)) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_HOMING_REQUIRED));
return;
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand Down Expand Up @@ -454,12 +454,12 @@ void DGUSRxHandler::MoveToPoint(DGUS_VP &vp, void *data_ptr) {
UNUSED(vp);

if (!ExtUI::isPositionKnown()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_HOMING_REQUIRED));
return;
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand Down Expand Up @@ -509,12 +509,12 @@ void DGUSRxHandler::Probe(DGUS_VP &vp, void *data_ptr) {
#endif

if (!ExtUI::isPositionKnown()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_HOMING_REQUIRED));
return;
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand All @@ -533,7 +533,7 @@ void DGUSRxHandler::DisableABL(DGUS_VP &vp, void *data_ptr) {
UNUSED(data_ptr);

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand Down Expand Up @@ -574,7 +574,7 @@ void DGUSRxHandler::FilamentMove(DGUS_VP &vp, void *data_ptr) {
UNUSED(vp);

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand All @@ -598,7 +598,7 @@ void DGUSRxHandler::FilamentMove(DGUS_VP &vp, void *data_ptr) {
}

if (ExtUI::getActualTemp_celsius(extruder) < (float)EXTRUDE_MINTEMP) {
dgus_screen_handler.SetStatusMessage(F("Temperature too low"));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_TEMP_TOO_LOW));
return;
}

Expand All @@ -618,17 +618,13 @@ void DGUSRxHandler::Home(DGUS_VP &vp, void *data_ptr) {
UNUSED(vp);

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

DGUS_Data::Axis axis = (DGUS_Data::Axis)((uint8_t*)data_ptr)[1];

dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLinePGM(DGUS_MSG_HOMING, 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(dgus_screen_handler.GetCurrentScreen());
dgus_screen_handler.ShowWaitScreen(GET_TEXT_F(DGUS_MSG_HOMING), dgus_screen_handler.GetCurrentScreen());

switch (axis) {
case DGUS_Data::Axis::X_Y_Z:
Expand Down Expand Up @@ -662,7 +658,7 @@ void DGUSRxHandler::Move(DGUS_VP &vp, void *data_ptr) {
}

if (!ExtUI::isAxisPositionKnown(axis)) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_HOMING_REQUIRED));
return;
}

Expand Down Expand Up @@ -718,7 +714,7 @@ void DGUSRxHandler::MoveStep(DGUS_VP &vp, void *data_ptr) {
}

if (!ExtUI::isAxisPositionKnown(axis)) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_HOMING_REQUIRED));
return;
}

Expand Down Expand Up @@ -755,15 +751,11 @@ void DGUSRxHandler::GcodeExecute(DGUS_VP &vp, void *data_ptr) {
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLinePGM(PSTR("Executing command..."), 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(DGUS_Screen::GCODE);
dgus_screen_handler.ShowWaitScreen(GET_TEXT_F(DGUS_MSG_EXECUTING_COMMAND), DGUS_Screen::GCODE);

queue.enqueue_one_now(dgus_screen_handler.gcode);
}
Expand All @@ -778,7 +770,7 @@ void DGUSRxHandler::ResetEEPROM(DGUS_VP &vp, void *data_ptr) {
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand All @@ -796,7 +788,7 @@ void DGUSRxHandler::SettingsExtra(DGUS_VP &vp, void *data_ptr) {
case DGUS_Data::Extra::BUTTON1:
#if ENABLED(BLTOUCH)
if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand Down Expand Up @@ -842,7 +834,7 @@ void DGUSRxHandler::PIDSetTemp(DGUS_VP &vp, void *data_ptr) {
UNUSED(vp);

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand Down Expand Up @@ -873,7 +865,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) {
UNUSED(data_ptr);

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand All @@ -887,15 +879,15 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) {
heater = H_BED;
break;
#else
dgus_screen_handler.SetStatusMessage(F("Bed PID disabled"));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BED_PID_DISABLED));
return;
#endif
case DGUS_Data::Heater::H0:
#if ENABLED(PIDTEMP)
heater = H_E0;
break;
#else
dgus_screen_handler.SetStatusMessage(F("PID disabled"));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_PID_DISABLED));
return;
#endif
#if HAS_MULTI_HOTEND
Expand All @@ -904,7 +896,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) {
heater = H_E1;
break;
#else
dgus_screen_handler.SetStatusMessage(F("PID disabled"));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_PID_DISABLED));
return;
#endif
#endif
Expand All @@ -913,11 +905,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) {
char buffer[24];
snprintf_P(buffer, sizeof(buffer), PSTR("M303C%dE%dS%dU1"), cycles, heater, dgus_screen_handler.pid_temp);

dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLinePGM(PSTR("PID autotuning..."), 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(DGUS_Screen::PID);
dgus_screen_handler.ShowWaitScreen(GET_TEXT_F(DGUS_MSG_PID_AUTOTUNING), DGUS_Screen::PID);

queue.enqueue_one_now(buffer);
queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE);
Expand All @@ -934,7 +922,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) {
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

Expand All @@ -953,12 +941,12 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) {
}

if (!dgus_screen_handler.IsPrinterIdle()) {
dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_BUSY));
return;
}

if (!recovery.valid()) {
dgus_screen_handler.SetStatusMessage(F("Invalid recovery data"));
dgus_screen_handler.SetStatusMessage(GET_TEXT_F(DGUS_MSG_INVALID_RECOVERY_DATA));
return;
}

Expand Down
Loading

0 comments on commit ee93745

Please sign in to comment.