mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2026-03-05 09:34:47 -07:00
Merge branch 'bugfix-2.1.x' into bugfix-2.1.x-February2
This commit is contained in:
commit
3ce0fdeb6d
38 changed files with 445 additions and 160 deletions
|
|
@ -2754,10 +2754,10 @@
|
|||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cz, da, de, el, el_CY, es, eu, fi, fr, gl, hr, hu, it,
|
||||
* en, an, bg, ca, cz, da, de, el, el_CY, es, eu, fi, fr, gl, hg, hr, hu, id, it,
|
||||
* jp_kana, ko_KR, nl, pl, pt, pt_br, ro, ru, sk, sv, tr, uk, vi, zh_CN, zh_TW
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek (Greece)', 'el_CY':'Greek (Cyprus)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek (Greece)', 'el_CY':'Greek (Cyprus)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hg':'Hinglish (Hindi-Latin)', 'hr':'Croatian', 'hu':'Hungarian', 'id':'Indonesian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2026-02-19"
|
||||
//#define STRING_DISTRIBUTION_DATE "2026-02-28"
|
||||
|
||||
/**
|
||||
* The protocol for communication to the host. Protocol indicates communication
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ int8_t digital_pin_to_analog_pin(pin_t pin) {
|
|||
}
|
||||
|
||||
bool isAnalogPin(const pin_t pin) {
|
||||
return digital_pin_to_analog_pin(pin) != -1;
|
||||
return digital_pin_to_analog_pin(pin) >= 0;
|
||||
}
|
||||
|
||||
#define digitalRead_mod(A) extDigitalRead(A) // must use Arduino pin numbers when doing reads
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
#define getPinByIndex(x) pin_array[x].pin
|
||||
#define getPinIsDigitalByIndex(x) pin_array[x].is_digital
|
||||
#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL))
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) != -1)
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0)
|
||||
#define pwm_status(P) digitalPinHasPWM(P)
|
||||
#define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
#define getPinByIndex(x) pin_array[x].pin
|
||||
#define getPinIsDigitalByIndex(x) pin_array[x].is_digital
|
||||
#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL))
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) != -1)
|
||||
#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0)
|
||||
#define pwm_status(P) digitalPinHasPWM(P)
|
||||
#define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin
|
||||
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ void Marlin::manage_inactivity(const bool no_stepper_sleep/*=false*/) {
|
|||
motion.position.e += EXTRUDER_RUNOUT_EXTRUDE;
|
||||
motion.goto_current_position(MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED));
|
||||
motion.position.e = olde;
|
||||
planner.set_e_position_mm(olde);
|
||||
motion.sync_plan_position_e();
|
||||
planner.synchronize();
|
||||
|
||||
if (e_off) stepper.DISABLE_EXTRUDER(e_stepper);
|
||||
|
|
|
|||
|
|
@ -57,8 +57,10 @@
|
|||
// fr French
|
||||
// fr_na French without accents (DWIN T5UID1 touchscreen)
|
||||
// gl Galician
|
||||
// hg Hinglish (Hindi in Latin script)
|
||||
// hr Croatian
|
||||
// hu Hungarian
|
||||
// id Indonesian (Bahasa)
|
||||
// it Italian
|
||||
// jp_kana Japanese
|
||||
// ko_KR Korean (South Korea)
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@
|
|||
// Array shorthand
|
||||
#define COUNT(a) (sizeof(a)/sizeof(*a))
|
||||
#define ZERO(a) memset((void*)a,0,sizeof(a))
|
||||
#define OBJZERO(a) memset(&a,0,sizeof(a))
|
||||
#define COPY(a,b) do{ \
|
||||
static_assert(sizeof(a[0]) == sizeof(b[0]), "COPY: '" STRINGIFY(a) "' and '" STRINGIFY(b) "' types (sizes) don't match!"); \
|
||||
memcpy(&a[0],&b[0],_MIN(sizeof(a),sizeof(b))); \
|
||||
|
|
|
|||
|
|
@ -731,7 +731,8 @@ void resume_print(
|
|||
|
||||
// Now all extrusion positions are resumed and ready to be confirmed
|
||||
// Set extruder to saved position
|
||||
planner.set_e_position_mm((motion.destination.e = motion.position.e = resume_position.e));
|
||||
motion.destination.e = motion.position.e = resume_position.e;
|
||||
motion.sync_plan_position_e();
|
||||
|
||||
ui.pause_show_message(PAUSE_MESSAGE_STATUS);
|
||||
#if ENABLED(SOVOL_SV06_RTS)
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@
|
|||
#define HAS_CLASSIC_E_JERK 1
|
||||
#endif
|
||||
// E jerk is derived from JD factors
|
||||
#if ALL(HAS_JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#if HAS_JUNCTION_DEVIATION && ANY(LIN_ADVANCE, FTM_HAS_LIN_ADVANCE)
|
||||
#define HAS_LINEAR_E_JERK 1
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2026-02-19"
|
||||
#define STRING_DISTRIBUTION_DATE "2026-02-28"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
11
Marlin/src/lcd/dogm/fontdata/langdata_hg.h
Normal file
11
Marlin/src/lcd/dogm/fontdata/langdata_hg.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* 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"
|
||||
|
||||
// Hinglish uses the base ISO10646-1 pages, so no extra glyphs are needed.
|
||||
static const uxg_fontinfo_t g_fontinfo_hg[] PROGMEM = {};
|
||||
11
Marlin/src/lcd/dogm/fontdata/langdata_id.h
Normal file
11
Marlin/src/lcd/dogm/fontdata/langdata_id.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* 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"
|
||||
|
||||
// Indonesian reuses the base ISO10646-1 font set; no extra glyphs needed.
|
||||
static const uxg_fontinfo_t g_fontinfo_id[] PROGMEM = {};
|
||||
|
|
@ -311,7 +311,7 @@ void MarlinUI::init_lcd() {
|
|||
|
||||
#if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED, K3D_242_OLED_CONTROLLER)
|
||||
|
||||
#if defined(LCD_PINS_DC) && LCD_PINS_DC != -1
|
||||
#if defined(LCD_PINS_DC) && LCD_PINS_DC >= 0
|
||||
#if IS_I2C_LCD
|
||||
I2C_TypeDef *i2cInstance1 = (I2C_TypeDef *)pinmap_peripheral(digitalPinToPinName(DOGLCD_SDA_PIN), PinMap_I2C_SDA);
|
||||
I2C_TypeDef *i2cInstance2 = (I2C_TypeDef *)pinmap_peripheral(digitalPinToPinName(DOGLCD_SCL_PIN), PinMap_I2C_SCL);
|
||||
|
|
@ -454,18 +454,21 @@ void MarlinUI::clear_for_drawing() {
|
|||
// Mark a menu item and set font color if selected.
|
||||
// Return 'false' if the item is not on screen.
|
||||
static bool mark_as_selected(const uint8_t row, const bool sel) {
|
||||
row_y1 = row * (MENU_FONT_HEIGHT) + 1;
|
||||
row_y2 = row_y1 + MENU_FONT_HEIGHT - 1;
|
||||
// Menu page has 2px top margin
|
||||
row_y1 = 2 + row * (MENU_LINE_HEIGHT);
|
||||
row_y2 = row_y1 + MENU_FONT_HEIGHT;
|
||||
|
||||
if (!PAGE_CONTAINS(row_y1 + 1, row_y2 + 2)) return false;
|
||||
// Nothing at all to draw?
|
||||
if (!PAGE_CONTAINS(row_y1, row_y2)) return false;
|
||||
|
||||
// Selected or not, draw background and set foreground color
|
||||
if (sel) {
|
||||
#if ENABLED(MENU_HOLLOW_FRAME)
|
||||
u8g.drawHLine(0, row_y1 + 1, LCD_PIXEL_WIDTH);
|
||||
u8g.drawHLine(0, row_y2 + 2, LCD_PIXEL_WIDTH);
|
||||
u8g.drawHLine(0, row_y1, LCD_PIXEL_WIDTH); // solid line top
|
||||
u8g.drawHLine(0, row_y2, LCD_PIXEL_WIDTH); // solid line bottom
|
||||
#else
|
||||
u8g.setColorIndex(1); // solid outline
|
||||
u8g.drawBox(0, row_y1 + 2, LCD_PIXEL_WIDTH, MENU_FONT_HEIGHT - 1);
|
||||
u8g.setColorIndex(1); // solid fill
|
||||
u8g.drawBox(0, row_y1 + 1, LCD_PIXEL_WIDTH, MENU_FONT_HEIGHT - 1);
|
||||
u8g.setColorIndex(0); // inverted text
|
||||
#endif
|
||||
}
|
||||
|
|
@ -473,9 +476,11 @@ void MarlinUI::clear_for_drawing() {
|
|||
else u8g.setColorIndex(1); // solid text
|
||||
#endif
|
||||
|
||||
if (!PAGE_CONTAINS(row_y1, row_y2)) return false;
|
||||
// Will text not fit? Return false.
|
||||
if (!PAGE_CONTAINS(row_y1 - 1, row_y2 - MENU_FONT_DESCENT)) return false;
|
||||
|
||||
lcd_moveto(0, row_y2);
|
||||
// Place the cursor at X = 0, Y = row, return true
|
||||
lcd_moveto(0, row_y2 - MENU_FONT_DESCENT);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
|
||||
#if ENABLED(ALTERNATIVE_LCD)
|
||||
#define U8G_CLASS U8GLIB_DOGM128_2X // 4 stripes
|
||||
#define FORCE_SOFT_SPI // SW-SPI
|
||||
#define DOGM_FORCE_SOFT_SPI // SW-SPI
|
||||
#else
|
||||
#define U8G_CLASS U8GLIB_DOGM128_2X // 4 stripes (HW-SPI)
|
||||
#endif
|
||||
|
|
@ -105,8 +105,8 @@
|
|||
#define SMART_RAMPS MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF)
|
||||
#define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI)
|
||||
|
||||
#if (SMART_RAMPS && defined(__SAM3X8E__)) || (defined(DOGLCD_SCK) && (DOGLCD_SCK != -1 && DOGLCD_SCK != SD_SCK_PIN)) || (defined(DOGLCD_MOSI) && (DOGLCD_MOSI != -1 && DOGLCD_MOSI != SD_MOSI_PIN))
|
||||
#define FORCE_SOFT_SPI // SW-SPI
|
||||
#if (SMART_RAMPS && defined(__SAM3X8E__)) || (defined(DOGLCD_SCK) && (DOGLCD_SCK >= 0 && DOGLCD_SCK != SD_SCK_PIN)) || (defined(DOGLCD_MOSI) && (DOGLCD_MOSI >= 0 && DOGLCD_MOSI != SD_MOSI_PIN))
|
||||
#define DOGM_FORCE_SOFT_SPI // SW-SPI
|
||||
#endif
|
||||
|
||||
#elif ANY(FYSETC_MINI_12864, MKS_MINI_12864, ENDER2_STOCKDISPLAY)
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
#if IS_I2C_LCD
|
||||
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE // I2C
|
||||
#else
|
||||
#define FORCE_SOFT_SPI // SW-SPI
|
||||
#define DOGM_FORCE_SOFT_SPI // SW-SPI
|
||||
#if ENABLED(ALTERNATIVE_LCD)
|
||||
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X // 4 stripes
|
||||
#else
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
// FYSETC OLED 2.42" 128 × 64 Full Graphics Controller
|
||||
// or K3D OLED 2.42" 128 × 64 Full Graphics Controller
|
||||
|
||||
#define FORCE_SOFT_SPI // SW-SPI
|
||||
#define DOGM_FORCE_SOFT_SPI // SW-SPI
|
||||
|
||||
#if ENABLED(ALTERNATIVE_LCD)
|
||||
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X // 4 stripes
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
|
||||
// Zonestar SSD1306 OLED SPI LCD
|
||||
|
||||
#define FORCE_SOFT_SPI // SW-SPI
|
||||
#define DOGM_FORCE_SOFT_SPI // SW-SPI
|
||||
#if ENABLED(ALTERNATIVE_LCD)
|
||||
#define U8G_CLASS U8GLIB_SH1306_128X64_2X // 4 stripes
|
||||
#else
|
||||
|
|
@ -177,7 +177,7 @@
|
|||
// Zonestar SH1106 OLED SPI LCD
|
||||
|
||||
#if !IS_I2C_LCD
|
||||
#define FORCE_SOFT_SPI // SW-SPI
|
||||
#define DOGM_FORCE_SOFT_SPI // SW-SPI
|
||||
#endif
|
||||
#if ENABLED(ALTERNATIVE_LCD)
|
||||
#define U8G_CLASS U8GLIB_SH1106_128X64_2X // 4 stripes
|
||||
|
|
@ -246,6 +246,11 @@
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(DOGM_FORCE_SOFT_SPI) && !defined(FORCE_SOFT_SPI)
|
||||
#define FORCE_SOFT_SPI
|
||||
#endif
|
||||
#undef DOGM_FORCE_SOFT_SPI
|
||||
|
||||
// Use HW-SPI if no other option is specified
|
||||
#ifndef U8G_PARAM
|
||||
#if IS_I2C_LCD
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ int uxg_GetUtf8StrPixelWidth(u8g_t *pu8g, const char *utf8_msg) {
|
|||
|
||||
if (!uxg_Utf8FontIsInited()) return -1;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
OBJZERO(data);
|
||||
data.pu8g = pu8g;
|
||||
data.adv = 0;
|
||||
fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_ram, (void*)&data, fontgroup_cb_draw_u8gstrlen);
|
||||
|
|
@ -326,7 +326,7 @@ int uxg_GetUtf8StrPixelWidthP(u8g_t *pu8g, PGM_P utf8_msg) {
|
|||
|
||||
if (!uxg_Utf8FontIsInited()) return -1;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
OBJZERO(data);
|
||||
data.pu8g = pu8g;
|
||||
data.adv = 0;
|
||||
fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_rom, (void*)&data, fontgroup_cb_draw_u8gstrlen);
|
||||
|
|
|
|||
|
|
@ -4594,12 +4594,8 @@ void JyersDWIN::printScreenControl() {
|
|||
card.startOrResumeFilePrinting();
|
||||
TERN_(POWER_LOSS_RECOVERY, recovery.prepare());
|
||||
#else
|
||||
#if HAS_HEATED_BED
|
||||
queue.inject(TS(F("M140 S"), pausebed));
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
queue.inject(TS(F("M109 S"), pausetemp));
|
||||
#endif
|
||||
TERN_(HAS_HEATED_BED, queue.inject(TS(F("M140 S"), pausebed)));
|
||||
TERN_(HAS_EXTRUDERS, queue.inject(TS(F("M109 S"), pausetemp)));
|
||||
TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan);
|
||||
planner.synchronize();
|
||||
TERN_(HAS_MEDIA, queue.inject(FPSTR(M24_STR)));
|
||||
|
|
@ -4635,9 +4631,7 @@ void JyersDWIN::popupControl() {
|
|||
case Popup_Pause:
|
||||
if (selection == 0) {
|
||||
if (sdprint) {
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
if (recovery.enabled) recovery.save(true);
|
||||
#endif
|
||||
TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true));
|
||||
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
||||
popupHandler(Popup_Home, true);
|
||||
#if HAS_MEDIA
|
||||
|
|
|
|||
|
|
@ -75,4 +75,4 @@
|
|||
|
||||
#include "../common/dwin_color.h"
|
||||
|
||||
#define Color_Bg_Heading 0x3344 // Static Heading
|
||||
#define COLOR_BG_HEADING 0x3344 // Static Heading
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
|||
if (y >= LCD_PIXEL_HEIGHT) return false;
|
||||
|
||||
if (is_static && sel)
|
||||
dwinDrawBox(1, Color_Bg_Heading, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1);
|
||||
dwinDrawBox(1, COLOR_BG_HEADING, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1);
|
||||
else {
|
||||
#if ENABLED(MENU_HOLLOW_FRAME)
|
||||
dwinDrawBox(1, COLOR_BG_BLACK, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1);
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ void RTS::sendData() {
|
|||
delay_us(1);
|
||||
}
|
||||
|
||||
memset(&snddat, 0, sizeof(snddat));
|
||||
OBJZERO(snddat);
|
||||
ZERO(databuf);
|
||||
snddat.head[0] = FHONE;
|
||||
snddat.head[1] = FHTWO;
|
||||
|
|
@ -626,7 +626,7 @@ void RTS::sendData(const unsigned long n, uint32_t addr, uint8_t cmd/*=VarAddr_W
|
|||
void RTS::handleData() {
|
||||
int16_t Checkkey = -1;
|
||||
if (waitway > 0) { // for waiting
|
||||
memset(&recdat, 0, sizeof(recdat));
|
||||
OBJZERO(recdat);
|
||||
recdat.head[0] = FHONE;
|
||||
recdat.head[1] = FHTWO;
|
||||
return;
|
||||
|
|
@ -684,7 +684,7 @@ void RTS::handleData() {
|
|||
}
|
||||
|
||||
if (Checkkey < 0) {
|
||||
memset(&recdat, 0, sizeof(recdat));
|
||||
OBJZERO(recdat);
|
||||
recdat.head[0] = FHONE;
|
||||
recdat.head[1] = FHTWO;
|
||||
return;
|
||||
|
|
@ -1639,7 +1639,7 @@ void RTS::handleData() {
|
|||
default: break;
|
||||
}
|
||||
|
||||
memset(&recdat, 0, sizeof(recdat));
|
||||
OBJZERO(recdat);
|
||||
recdat.head[0] = FHONE;
|
||||
recdat.head[1] = FHTWO;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "../../../gcode/queue.h"
|
||||
#include "../../../module/temperature.h"
|
||||
#include "../../../module/planner.h"
|
||||
#include "../../../module/motion.h"
|
||||
#include "../../../gcode/gcode.h"
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
|
|
@ -75,9 +76,7 @@ extern bool temps_update_flag;
|
|||
static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) {
|
||||
if (event != LV_EVENT_RELEASED) return;
|
||||
if (DIALOG_IS(TYPE_PRINT_FILE)) {
|
||||
#if HAS_GCODE_PREVIEW
|
||||
preview_gcode_prehandle(list_file.file_name[sel_id]);
|
||||
#endif
|
||||
TERN_(HAS_GCODE_PREVIEW, preview_gcode_prehandle(list_file.file_name[sel_id]));
|
||||
reset_print_time();
|
||||
start_print_time();
|
||||
|
||||
|
|
@ -128,10 +127,12 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) {
|
|||
lv_draw_ready_print();
|
||||
}
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
else if (DIALOG_IS(PAUSE_MESSAGE_WAITING, PAUSE_MESSAGE_INSERT, PAUSE_MESSAGE_HEAT))
|
||||
else if (DIALOG_IS(PAUSE_MESSAGE_WAITING, PAUSE_MESSAGE_INSERT, PAUSE_MESSAGE_HEAT)) {
|
||||
marlin.user_resume();
|
||||
else if (DIALOG_IS(PAUSE_MESSAGE_OPTION))
|
||||
}
|
||||
else if (DIALOG_IS(PAUSE_MESSAGE_OPTION)) {
|
||||
pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE;
|
||||
}
|
||||
else if (DIALOG_IS(PAUSE_MESSAGE_RESUME)) {
|
||||
goto_previous_ui();
|
||||
}
|
||||
|
|
@ -162,13 +163,24 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) {
|
|||
uiCfg.configWifi = true;
|
||||
goto_previous_ui();
|
||||
}
|
||||
else if (DIALOG_IS(TYPE_FILAMENT_HEAT_LOAD_COMPLETED))
|
||||
else if (DIALOG_IS(TYPE_FILAMENT_HEAT_LOAD_COMPLETED)) {
|
||||
uiCfg.filament_heat_completed_load = true;
|
||||
else if (DIALOG_IS(TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED))
|
||||
}
|
||||
else if (DIALOG_IS(TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED)) {
|
||||
uiCfg.filament_heat_completed_unload = true;
|
||||
}
|
||||
else if (DIALOG_IS(TYPE_FILAMENT_LOAD_COMPLETED, TYPE_FILAMENT_UNLOAD_COMPLETED)) {
|
||||
goto_previous_ui();
|
||||
}
|
||||
else if (DIALOG_IS(TYPE_FILAMENT_NO_PRESS)) {
|
||||
if (uiCfg.print_state == PAUSED) {
|
||||
uiCfg.hotendTargetTempBak = thermalManager.degTargetHotend(motion.extruder);
|
||||
uiCfg.moveSpeed_bak = (uint16_t)motion.feedrate_mm_s;
|
||||
lv_clear_dialog();
|
||||
disp_state_stack._disp_index--;
|
||||
lv_draw_filament_change();
|
||||
}
|
||||
}
|
||||
#if ENABLED(MKS_WIFI_MODULE)
|
||||
else if (DIALOG_IS(TYPE_UNBIND)) {
|
||||
cloud_unbind();
|
||||
|
|
@ -184,10 +196,10 @@ static void btn_cancel_event_cb(lv_obj_t *btn, lv_event_t event) {
|
|||
if (event != LV_EVENT_RELEASED) return;
|
||||
if (DIALOG_IS(PAUSE_MESSAGE_OPTION)) {
|
||||
TERN_(ADVANCED_PAUSE_FEATURE, pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT);
|
||||
return;
|
||||
}
|
||||
else if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT, TYPE_FILAMENT_UNLOAD_HEAT, TYPE_FILAMENT_HEAT_LOAD_COMPLETED, TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED)) {
|
||||
if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT, TYPE_FILAMENT_UNLOAD_HEAT, TYPE_FILAMENT_HEAT_LOAD_COMPLETED, TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED)) {
|
||||
thermalManager.setTargetHotend(uiCfg.hotendTargetTempBak, uiCfg.extruderIndex);
|
||||
goto_previous_ui();
|
||||
}
|
||||
else if (DIALOG_IS(TYPE_FILAMENT_LOADING, TYPE_FILAMENT_UNLOADING)) {
|
||||
queue.enqueue_one(F("M410"));
|
||||
|
|
@ -199,11 +211,8 @@ static void btn_cancel_event_cb(lv_obj_t *btn, lv_event_t event) {
|
|||
uiCfg.filament_unloading_time_flg = false;
|
||||
uiCfg.filament_unloading_time_cnt = 0;
|
||||
thermalManager.setTargetHotend(uiCfg.hotendTargetTempBak, uiCfg.extruderIndex);
|
||||
goto_previous_ui();
|
||||
}
|
||||
else {
|
||||
goto_previous_ui();
|
||||
}
|
||||
goto_previous_ui();
|
||||
}
|
||||
|
||||
void lv_draw_dialog(uint8_t type) {
|
||||
|
|
@ -437,6 +446,10 @@ void lv_draw_dialog(uint8_t type) {
|
|||
lv_label_set_text(labelDialog, filament_menu.filament_dialog_unloading);
|
||||
lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -70);
|
||||
}
|
||||
else if (DIALOG_IS(TYPE_FILAMENT_NO_PRESS)) {
|
||||
lv_label_set_text(labelDialog, print_file_dialog_menu.filament_no_press);
|
||||
lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20);
|
||||
}
|
||||
#if ENABLED(MKS_WIFI_MODULE)
|
||||
else if (DIALOG_IS(TYPE_UNBIND)) {
|
||||
lv_label_set_text(labelDialog, common_menu.unbind_printer_tips);
|
||||
|
|
|
|||
|
|
@ -97,8 +97,10 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
|||
gcode.process_subcommands_now(uiCfg.extruderIndexBak == 1 ? F("T1") : F("T0"));
|
||||
#endif
|
||||
motion.feedrate_mm_s = (float)uiCfg.moveSpeed_bak;
|
||||
if (uiCfg.print_state == PAUSED)
|
||||
planner.set_e_position_mm((motion.destination.e = motion.position.e = uiCfg.current_e_position_bak));
|
||||
if (uiCfg.print_state == PAUSED) {
|
||||
motion.destination.e = motion.position.e = uiCfg.current_position_bak.e;
|
||||
motion.sync_plan_position_e();
|
||||
}
|
||||
thermalManager.setTargetHotend(uiCfg.hotendTargetTempBak, uiCfg.extruderIndex);
|
||||
|
||||
goto_previous_ui();
|
||||
|
|
|
|||
|
|
@ -156,9 +156,9 @@ static void disp_key_value() {
|
|||
case E0current: TERN_(E0_IS_TRINAMIC, dtostrf(stepperE0.getMilliamps(), 1, 1, public_buf_m)); break;
|
||||
case E1current: TERN_(E1_IS_TRINAMIC, dtostrf(stepperE1.getMilliamps(), 1, 1, public_buf_m)); break;
|
||||
|
||||
case pause_pos_x: dtostrf(gCfgItems.pausePosX, 1, 1, public_buf_m); break;
|
||||
case pause_pos_y: dtostrf(gCfgItems.pausePosY, 1, 1, public_buf_m); break;
|
||||
case pause_pos_z: dtostrf(gCfgItems.pausePosZ, 1, 1, public_buf_m); break;
|
||||
case pause_pos_x: dtostrf(gCfgItems.pausePos.x, 1, 1, public_buf_m); break;
|
||||
case pause_pos_y: dtostrf(gCfgItems.pausePos.y, 1, 1, public_buf_m); break;
|
||||
case pause_pos_z: dtostrf(gCfgItems.pausePos.z, 1, 1, public_buf_m); break;
|
||||
|
||||
case level_pos_x1: itoa(gCfgItems.trammingPos[0].x, public_buf_m, 10); break;
|
||||
case level_pos_y1: itoa(gCfgItems.trammingPos[0].y, public_buf_m, 10); break;
|
||||
|
|
@ -271,9 +271,9 @@ static void set_value_confirm() {
|
|||
case E0current: TERN_(E0_IS_TRINAMIC, stepperE0.rms_current(atoi(key_value))); break;
|
||||
case E1current: TERN_(E1_IS_TRINAMIC, stepperE1.rms_current(atoi(key_value))); break;
|
||||
|
||||
case pause_pos_x: gCfgItems.pausePosX = atof(key_value); update_spi_flash(); break;
|
||||
case pause_pos_y: gCfgItems.pausePosY = atof(key_value); update_spi_flash(); break;
|
||||
case pause_pos_z: gCfgItems.pausePosZ = atof(key_value); update_spi_flash(); break;
|
||||
case pause_pos_x: gCfgItems.pausePos.x = atof(key_value); update_spi_flash(); break;
|
||||
case pause_pos_y: gCfgItems.pausePos.y = atof(key_value); update_spi_flash(); break;
|
||||
case pause_pos_z: gCfgItems.pausePos.z = atof(key_value); update_spi_flash(); break;
|
||||
|
||||
case level_pos_x1: gCfgItems.trammingPos[0].x = atoi(key_value); update_spi_flash(); break;
|
||||
case level_pos_y1: gCfgItems.trammingPos[0].y = atoi(key_value); update_spi_flash(); break;
|
||||
|
|
|
|||
|
|
@ -63,13 +63,13 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
|||
void lv_draw_pause_position() {
|
||||
scr = lv_screen_create(PAUSE_POS_UI, machine_menu.PausePosText);
|
||||
|
||||
dtostrf(gCfgItems.pausePosX, 1, 1, public_buf_l);
|
||||
dtostrf(gCfgItems.pausePos.x, 1, 1, public_buf_l);
|
||||
lv_screen_menu_item_1_edit(scr, machine_menu.xPos, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_PAUSE_X, 0, public_buf_l);
|
||||
|
||||
dtostrf(gCfgItems.pausePosY, 1, 1, public_buf_l);
|
||||
dtostrf(gCfgItems.pausePos.y, 1, 1, public_buf_l);
|
||||
lv_screen_menu_item_1_edit(scr, machine_menu.yPos, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_PAUSE_Y, 1, public_buf_l);
|
||||
|
||||
dtostrf(gCfgItems.pausePosZ, 1, 1, public_buf_l);
|
||||
dtostrf(gCfgItems.pausePos.z, 1, 1, public_buf_l);
|
||||
lv_screen_menu_item_1_edit(scr, machine_menu.zPos, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_PAUSE_Z, 2, public_buf_l);
|
||||
|
||||
lv_big_button_create(scr, "F:/bmp_back70x40.bin", common_menu.text_back, PARA_UI_BACK_POS_X, PARA_UI_BACK_POS_Y, event_handler, ID_PAUSE_RETURN, true);
|
||||
|
|
|
|||
|
|
@ -116,9 +116,7 @@ void gCfgItems_init() {
|
|||
gCfgItems.curFilesize = 0;
|
||||
gCfgItems.finish_power_off = false;
|
||||
gCfgItems.pause_reprint = false;
|
||||
gCfgItems.pausePosX = -1;
|
||||
gCfgItems.pausePosY = -1;
|
||||
gCfgItems.pausePosZ = 5;
|
||||
gCfgItems.pausePos.set(-1, -1, 5);
|
||||
gCfgItems.trammingPos[0].x = X_MIN_POS + 30;
|
||||
gCfgItems.trammingPos[0].y = Y_MIN_POS + 30;
|
||||
gCfgItems.trammingPos[1].x = X_MAX_POS - 30;
|
||||
|
|
@ -194,8 +192,8 @@ void ui_cfg_init() {
|
|||
uiCfg.filament_unloading_time_cnt = 0;
|
||||
|
||||
#if ENABLED(MKS_WIFI_MODULE)
|
||||
memset(&wifiPara, 0, sizeof(wifiPara));
|
||||
memset(&ipPara, 0, sizeof(ipPara));
|
||||
OBJZERO(wifiPara);
|
||||
OBJZERO(ipPara);
|
||||
strcpy_P(wifiPara.ap_name, PSTR(WIFI_AP_NAME));
|
||||
strcpy_P(wifiPara.keyCode, PSTR(WIFI_KEY_CODE));
|
||||
// client
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ typedef struct {
|
|||
filamentchange_unload_length,
|
||||
filamentchange_unload_speed;
|
||||
celsius_t filament_limit_temp;
|
||||
float pausePosX, pausePosY, pausePosZ;
|
||||
xyz_pos_t pausePos;
|
||||
uint32_t curFilesize;
|
||||
} CFG_ITMES;
|
||||
|
||||
|
|
@ -255,10 +255,7 @@ typedef struct UI_Config_Struct {
|
|||
filament_unloading_time_cnt;
|
||||
float move_dist;
|
||||
celsius_t hotendTargetTempBak;
|
||||
float current_x_position_bak,
|
||||
current_y_position_bak,
|
||||
current_z_position_bak,
|
||||
current_e_position_bak;
|
||||
xyze_pos_t current_position_bak;
|
||||
} UI_CFG;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
#include "../../../feature/powerloss.h"
|
||||
#endif
|
||||
#include "../../../module/printcounter.h"
|
||||
|
||||
#define FILAMENT_IS_OUT(N...) (READ(FIL_RUNOUT##N##_PIN) == FIL_RUNOUT##N##_STATE)
|
||||
#ifndef FILAMENT_RUNOUT_THRESHOLD
|
||||
|
|
@ -48,7 +49,6 @@ extern uint32_t To_pre_view;
|
|||
extern bool flash_preview_begin, default_preview_flg, gcode_preview_over;
|
||||
|
||||
void printer_state_polling() {
|
||||
char str_1[16];
|
||||
if (uiCfg.print_state == PAUSING) {
|
||||
#if HAS_MEDIA
|
||||
if (!planner.has_blocks_queued() && card.getIndex() > MIN_FILE_PRINTED)
|
||||
|
|
@ -58,23 +58,21 @@ void printer_state_polling() {
|
|||
uiCfg.waitEndMoves = 0;
|
||||
planner.synchronize();
|
||||
|
||||
gcode.process_subcommands_now(F("M25"));
|
||||
card.pauseSDPrint();
|
||||
print_job_timer.pause();
|
||||
|
||||
TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true));
|
||||
|
||||
// save the position
|
||||
uiCfg.current_x_position_bak = motion.position.x;
|
||||
uiCfg.current_y_position_bak = motion.position.y;
|
||||
uiCfg.current_z_position_bak = motion.position.z;
|
||||
uiCfg.current_position_bak = motion.position;
|
||||
|
||||
if (gCfgItems.pausePosZ != (float)-1) {
|
||||
sprintf_P(public_buf_l, PSTR("G91\nG1 Z%s\nG90"), dtostrf(gCfgItems.pausePosZ, 1, 1, str_1));
|
||||
gcode.process_subcommands_now(public_buf_l);
|
||||
if (gCfgItems.pausePos.z != -1.0f) {
|
||||
gcode.process_subcommands_now(TS(F("G91\nG1Z"), p_float_t(gCfgItems.pausePos.z, 1), F("\nG90")));
|
||||
}
|
||||
if (gCfgItems.pausePosX != (float)-1 && gCfgItems.pausePosY != (float)-1) {
|
||||
sprintf_P(public_buf_l, PSTR("G1 X%s Y%s"), dtostrf(gCfgItems.pausePosX, 1, 1, str_1), dtostrf(gCfgItems.pausePosY, 1, 1, str_1));
|
||||
gcode.process_subcommands_now(public_buf_l);
|
||||
if (gCfgItems.pausePos.x != -1.0f && gCfgItems.pausePos.y != -1.0f) {
|
||||
gcode.process_subcommands_now(TS(F("G1X"), p_float_t(gCfgItems.pausePos.x, 1), C('Y'), p_float_t(gCfgItems.pausePos.y, 1)));
|
||||
}
|
||||
uiCfg.print_state = PAUSED;
|
||||
uiCfg.current_e_position_bak = motion.position.e;
|
||||
|
||||
gCfgItems.pause_reprint = true;
|
||||
update_spi_flash();
|
||||
|
|
@ -89,16 +87,13 @@ void printer_state_polling() {
|
|||
|
||||
if (uiCfg.print_state == RESUMING) {
|
||||
if (card.isPaused()) {
|
||||
if (gCfgItems.pausePosX != (float)-1 && gCfgItems.pausePosY != (float)-1) {
|
||||
sprintf_P(public_buf_m, PSTR("G1 X%s Y%s"), dtostrf(uiCfg.current_x_position_bak, 1, 1, str_1), dtostrf(uiCfg.current_y_position_bak, 1, 1, str_1));
|
||||
gcode.process_subcommands_now(public_buf_m);
|
||||
}
|
||||
if (gCfgItems.pausePosZ != (float)-1) {
|
||||
ZERO(public_buf_m);
|
||||
sprintf_P(public_buf_m, PSTR("G1 Z%s"), dtostrf(uiCfg.current_z_position_bak, 1, 1, str_1));
|
||||
gcode.process_subcommands_now(public_buf_m);
|
||||
}
|
||||
gcode.process_subcommands_now(FPSTR(M24_STR));
|
||||
if (gCfgItems.pausePos.x != -1.0f && gCfgItems.pausePos.y != -1.0f)
|
||||
gcode.process_subcommands_now(TS(F("G1X"), p_float_t(uiCfg.current_position_bak.x, 1), C('Y'), p_float_t(uiCfg.current_position_bak.y, 1)));
|
||||
if (gCfgItems.pausePos.z != -1.0f)
|
||||
gcode.process_subcommands_now(TS(F("G1Z"), p_float_t(uiCfg.current_position_bak.z, 1)));
|
||||
card.startOrResumeFilePrinting();
|
||||
marlin.startOrResumeJob();
|
||||
TERN_(POWER_LOSS_RECOVERY, recovery.prepare());
|
||||
uiCfg.print_state = WORKING;
|
||||
start_print_time();
|
||||
|
||||
|
|
@ -113,12 +108,8 @@ void printer_state_polling() {
|
|||
HOTEND_LOOP() {
|
||||
const int16_t et = recovery.info.target_temperature[e];
|
||||
if (et) {
|
||||
#if HAS_MULTI_HOTEND
|
||||
sprintf_P(public_buf_m, PSTR("T%i"), e);
|
||||
gcode.process_subcommands_now(public_buf_m);
|
||||
#endif
|
||||
sprintf_P(public_buf_m, PSTR("M109 S%i"), et);
|
||||
gcode.process_subcommands_now(public_buf_m);
|
||||
TERN_(HAS_MULTI_HOTEND, gcode.process_subcommands_now(TS(C('T'), e)));
|
||||
gcode.process_subcommands_now(TS(F("M109S"), et));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -127,17 +118,9 @@ void printer_state_polling() {
|
|||
|
||||
#if 0
|
||||
// Move back to the saved XY
|
||||
char str_1[16], str_2[16];
|
||||
sprintf_P(public_buf_m, PSTR("G1 X%s Y%s F2000"),
|
||||
dtostrf(recovery.info.current_position.x, 1, 3, str_1),
|
||||
dtostrf(recovery.info.current_position.y, 1, 3, str_2)
|
||||
);
|
||||
gcode.process_subcommands_now(public_buf_m);
|
||||
|
||||
if (gCfgItems.pause_reprint && gCfgItems.pausePosZ != -1.0f) {
|
||||
sprintf_P(public_buf_l, PSTR("G91\nG1 Z-%s\nG90"), dtostrf(gCfgItems.pausePosZ, 1, 1, str_2));
|
||||
gcode.process_subcommands_now(public_buf_l);
|
||||
}
|
||||
gcode.process_subcommands_now(TS(F("G1F2000X"), p_float_t(recovery.info.current_position.x, 3), C('Y'), p_float_t(recovery.info.current_position.y, 3)));
|
||||
if (gCfgItems.pause_reprint && gCfgItems.pausePos.z != -1.0f)
|
||||
gcode.process_subcommands_now(TS(F("G91\nG1Z-"), p_float_t(gCfgItems.pausePos.z, 1), F("\nG90")));
|
||||
#endif
|
||||
uiCfg.print_state = WORKING;
|
||||
start_print_time();
|
||||
|
|
@ -210,7 +193,7 @@ void filament_check() {
|
|||
else
|
||||
default_preview_flg = true;
|
||||
|
||||
lv_draw_printing();
|
||||
lv_draw_dialog(DIALOG_TYPE_FILAMENT_NO_PRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1376,7 +1376,7 @@ static void net_msg_handle(const uint8_t * const msg, const uint16_t msgLen) {
|
|||
ZERO(wifiPara.ap_name);
|
||||
memcpy(wifiPara.ap_name, &msg[9], wifiNameLen);
|
||||
|
||||
memset(&wifi_list.wifiConnectedName, 0, sizeof(wifi_list.wifiConnectedName));
|
||||
OBJZERO(wifi_list.wifiConnectedName);
|
||||
memcpy(&wifi_list.wifiConnectedName, &msg[9], wifiNameLen);
|
||||
|
||||
// WiFi key
|
||||
|
|
@ -1556,8 +1556,10 @@ static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgL
|
|||
|
||||
if (msgLen != fileNameLen + 5) return;
|
||||
|
||||
// Reset file_writer completely to prevent stale state from a previous transfer
|
||||
OBJZERO(file_writer);
|
||||
|
||||
file_writer.fileLen = *((uint32_t *)(msg + 1));
|
||||
ZERO(file_writer.saveFileName);
|
||||
|
||||
memcpy(file_writer.saveFileName, msg + 5, fileNameLen);
|
||||
|
||||
|
|
@ -1571,7 +1573,17 @@ static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgL
|
|||
ZERO(saveFilePath);
|
||||
|
||||
if (gCfgItems.fileSysType == FILE_SYS_SD) {
|
||||
TERN_(HAS_MEDIA, card.mount());
|
||||
#if HAS_MEDIA
|
||||
card.mount();
|
||||
if (!card.isMounted()) {
|
||||
clear_cur_ui();
|
||||
upload_result = 2;
|
||||
wifiTransError.flag = 1;
|
||||
wifiTransError.start_tick = getWifiTick();
|
||||
lv_draw_dialog(DIALOG_TYPE_UPLOAD_FILE);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (gCfgItems.fileSysType == FILE_SYS_USB) {
|
||||
// nothing
|
||||
|
|
@ -1602,9 +1614,11 @@ static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgL
|
|||
|
||||
card.cdroot();
|
||||
upload_file.close();
|
||||
|
||||
upload_file = MediaFile();
|
||||
const char * const fname = card.diveToFile(false, upload_curDir, saveFilePath);
|
||||
|
||||
if (!upload_file.open(upload_curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
|
||||
if (!upload_file.open(upload_curDir, fname, O_CREAT | O_WRITE | O_TRUNC)) {
|
||||
clear_cur_ui();
|
||||
upload_result = 2;
|
||||
|
||||
|
|
@ -1615,6 +1629,7 @@ static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgL
|
|||
return;
|
||||
}
|
||||
|
||||
upload_file.getpos(&pos);
|
||||
#endif // HAS_MEDIA
|
||||
|
||||
wifi_link_state = WIFI_TRANS_FILE;
|
||||
|
|
@ -1636,6 +1651,7 @@ static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgL
|
|||
static void file_fragment_msg_handle(const uint8_t * const msg, const uint16_t msgLen) {
|
||||
const uint32_t frag = *((uint32_t *)msg);
|
||||
if ((frag & FRAG_MASK) != (uint32_t)(lastFragment + 1)) {
|
||||
upload_file.close(); // Close file before aborting to prevent FAT corruption
|
||||
ZERO(public_buf);
|
||||
file_writer.write_index = 0;
|
||||
wifi_link_state = WIFI_CONNECTED;
|
||||
|
|
@ -1643,6 +1659,7 @@ static void file_fragment_msg_handle(const uint8_t * const msg, const uint16_t m
|
|||
}
|
||||
else {
|
||||
if (write_to_file((char *)msg + 4, msgLen - 4) < 0) {
|
||||
upload_file.close(); // Close file before aborting to prevent FAT corruption
|
||||
ZERO(public_buf);
|
||||
file_writer.write_index = 0;
|
||||
wifi_link_state = WIFI_CONNECTED;
|
||||
|
|
@ -1662,22 +1679,23 @@ static void file_fragment_msg_handle(const uint8_t * const msg, const uint16_t m
|
|||
res = upload_file.write(public_buf, file_writer.write_index);
|
||||
}
|
||||
}
|
||||
upload_file.sync();
|
||||
upload_file.close();
|
||||
|
||||
ZERO(public_buf);
|
||||
file_writer.write_index = 0;
|
||||
|
||||
MediaFile file, *curDir;
|
||||
const char * const fname = card.diveToFile(false, curDir, saveFilePath);
|
||||
if (file.open(curDir, fname, O_RDWR)) {
|
||||
gCfgItems.curFilesize = file.fileSize();
|
||||
file.close();
|
||||
}
|
||||
else {
|
||||
ZERO(public_buf);
|
||||
file_writer.write_index = 0;
|
||||
const bool success = file.open(curDir, fname, O_READ);
|
||||
if (!success) {
|
||||
wifi_link_state = WIFI_CONNECTED;
|
||||
upload_result = 2;
|
||||
return;
|
||||
}
|
||||
ZERO(public_buf);
|
||||
file_writer.write_index = 0;
|
||||
gCfgItems.curFilesize = file.fileSize();
|
||||
file.close();
|
||||
|
||||
file_writer.tick_end = getWifiTick();
|
||||
upload_time_sec = getWifiTickDiff(file_writer.tick_begin, file_writer.tick_end) / 1000;
|
||||
upload_size = gCfgItems.curFilesize;
|
||||
|
|
@ -1815,6 +1833,7 @@ void stopEspTransfer() {
|
|||
if (wifi_link_state == WIFI_TRANS_FILE)
|
||||
wifi_link_state = WIFI_CONNECTED;
|
||||
|
||||
upload_file.close();
|
||||
TERN_(HAS_MEDIA, card.closefile());
|
||||
|
||||
if (upload_result != 3) {
|
||||
|
|
@ -1823,6 +1842,26 @@ void stopEspTransfer() {
|
|||
card.removeFile((const char *)saveFilePath);
|
||||
}
|
||||
|
||||
// Reset all transfer state to init-like condition for a clean next transfer
|
||||
ZERO(esp_msg_buf);
|
||||
esp_msg_index = 0;
|
||||
OBJZERO(file_writer);
|
||||
ZERO(public_buf);
|
||||
ZERO(saveFilePath);
|
||||
lastFragment = 0;
|
||||
upload_result = 0;
|
||||
upload_time_sec = 0;
|
||||
upload_size = 0;
|
||||
esp_state = TRANSFER_IDLE;
|
||||
need_ok_later = false;
|
||||
|
||||
// Reset DMA receive FIFO so no stale buffers leak into the next transfer
|
||||
for (uint8_t i = 0; i < TRANS_RCV_FIFO_BLOCK_NUM; i++)
|
||||
wifiDmaRcvFifo.state[i] = udisk_buf_empty;
|
||||
wifiDmaRcvFifo.read_cur = 0;
|
||||
wifiDmaRcvFifo.write_cur = 0;
|
||||
wifiDmaRcvFifo.receiveEspData = false;
|
||||
|
||||
wifi_delay(200);
|
||||
WIFI_IO1_SET();
|
||||
|
||||
|
|
|
|||
|
|
@ -676,7 +676,7 @@ namespace ExtUI {
|
|||
|
||||
void setJunctionDeviation_mm(const float value) {
|
||||
planner.junction_deviation_mm = constrain(value, 0.001, 0.3);
|
||||
TERN_(HAS_LIN_ADVANCE_K, planner.recalculate_max_e_jerk());
|
||||
TERN_(HAS_LINEAR_E_JERK, planner.recalculate_max_e_jerk());
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
|
|||
107
Marlin/src/lcd/language/language_hg.h
Normal file
107
Marlin/src/lcd/language/language_hg.h
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2026 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Hinglish (Hindi-Latin)
|
||||
*
|
||||
* LCD Menu Messages
|
||||
* See also https://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* Substitutions are applied for the following characters when used in menu items titles:
|
||||
*
|
||||
* $ displays an inserted string
|
||||
* { displays '0'....'10' for indexes 0 - 10
|
||||
* ~ displays '1'....'11' for indexes 0 - 10
|
||||
* * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL)
|
||||
* @ displays an axis name such as XYZUVW, or E for an extruder
|
||||
*/
|
||||
|
||||
/**
|
||||
* Imported from out-csv/language_hg.csv on 2026-02-27 at 14:31:47
|
||||
*/
|
||||
|
||||
#define DISPLAY_CHARSET_ISO10646_1
|
||||
#define NOT_EXTENDED_ISO10646_1_5X7
|
||||
|
||||
namespace LanguageNarrow_hg {
|
||||
using namespace Language_en; // Inherit undefined strings from English
|
||||
|
||||
constexpr uint8_t CHARSIZE = 2;
|
||||
LSTR LANGUAGE = _UxGT("Hinglish");
|
||||
|
||||
LSTR WELCOME_MSG = MACHINE_NAME_SUBST _UxGT(" taiyaar.");
|
||||
LSTR MSG_MEDIA_INSERTED = _UxGT("Card lagi");
|
||||
LSTR MSG_MEDIA_REMOVED = _UxGT("Card nikal gayi");
|
||||
LSTR MSG_MAIN_MENU = _UxGT("Mukhya Menu");
|
||||
LSTR MSG_DISABLE_STEPPERS = _UxGT("Motor band");
|
||||
LSTR MSG_AUTO_HOME = _UxGT("Auto Ghar");
|
||||
LSTR MSG_AUTO_HOME_X = _UxGT("Ghar X");
|
||||
LSTR MSG_AUTO_HOME_Y = _UxGT("Ghar Y");
|
||||
LSTR MSG_AUTO_HOME_Z = _UxGT("Ghar Z");
|
||||
LSTR MSG_LEVEL_BED_WAITING = _UxGT("Start ke liye click");
|
||||
LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Agla point");
|
||||
LSTR MSG_LEVEL_BED_DONE = _UxGT("Leveling ho gaya!");
|
||||
LSTR MSG_SET_HOME_OFFSETS = _UxGT("Home offset set karo");
|
||||
LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets lage");
|
||||
LSTR MSG_PREHEAT_1_ALL = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" Sab");
|
||||
LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" Bed");
|
||||
LSTR MSG_COOLDOWN = _UxGT("Thanda karo");
|
||||
LSTR MSG_SWITCH_PS_ON = _UxGT("Power chalu");
|
||||
LSTR MSG_SWITCH_PS_OFF = _UxGT("Power band");
|
||||
LSTR MSG_EXTRUDE = _UxGT("Nikalna");
|
||||
LSTR MSG_RETRACT = _UxGT("Wapas lena");
|
||||
LSTR MSG_MOVE_AXIS = _UxGT("Axis hilaao");
|
||||
LSTR MSG_LEVEL_BED = _UxGT("Bed Satao");
|
||||
LSTR MSG_MOVE_X = _UxGT("X hilaao");
|
||||
LSTR MSG_MOVE_Y = _UxGT("Y hilaao");
|
||||
LSTR MSG_MOVE_Z = _UxGT("Z hilaao");
|
||||
LSTR MSG_MOVE_E = _UxGT("Extruder");
|
||||
LSTR MSG_FAN_SPEED = _UxGT("Pankha gati");
|
||||
LSTR MSG_CONTROL = _UxGT("Niyantran");
|
||||
LSTR MSG_TEMPERATURE = _UxGT("Tapmaan");
|
||||
LSTR MSG_STOP_PRINT = _UxGT("Print roko");
|
||||
LSTR MSG_YES = _UxGT("Haan");
|
||||
LSTR MSG_NO = _UxGT("Nahi");
|
||||
LSTR MSG_BACK = _UxGT("Peeche");
|
||||
LSTR MSG_CONFIGURATION = _UxGT("Settings");
|
||||
LSTR MSG_BUTTON_NEXT = _UxGT("Aage");
|
||||
LSTR MSG_BUTTON_INIT = _UxGT("Shuru");
|
||||
LSTR MSG_HOME_ALL = _UxGT("Sab Ghar");
|
||||
}
|
||||
|
||||
namespace LanguageWide_hg {
|
||||
using namespace LanguageNarrow_hg;
|
||||
#if LCD_WIDTH > 20 || HAS_DWIN_E3V2
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace LanguageTall_hg {
|
||||
using namespace LanguageWide_hg;
|
||||
#if LCD_HEIGHT >= 4
|
||||
// Filament Change screens show up to 3 lines on a 4-line display
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace Language_hg {
|
||||
using namespace LanguageTall_hg;
|
||||
}
|
||||
114
Marlin/src/lcd/language/language_id.h
Normal file
114
Marlin/src/lcd/language/language_id.h
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2026 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Indonesian
|
||||
*
|
||||
* LCD Menu Messages
|
||||
* See also https://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* Substitutions are applied for the following characters when used in menu items titles:
|
||||
*
|
||||
* $ displays an inserted string
|
||||
* { displays '0'....'10' for indexes 0 - 10
|
||||
* ~ displays '1'....'11' for indexes 0 - 10
|
||||
* * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL)
|
||||
* @ displays an axis name such as XYZUVW, or E for an extruder
|
||||
*/
|
||||
|
||||
/**
|
||||
* Imported from out-csv/language_id.csv on 2026-02-27 at 14:31:51
|
||||
*/
|
||||
|
||||
#define DISPLAY_CHARSET_ISO10646_1
|
||||
#define NOT_EXTENDED_ISO10646_1_5X7
|
||||
|
||||
namespace LanguageNarrow_id {
|
||||
using namespace Language_en; // Inherit undefined strings from English
|
||||
|
||||
constexpr uint8_t CHARSIZE = 2;
|
||||
LSTR LANGUAGE = _UxGT("Bahasa Indonesia");
|
||||
|
||||
LSTR WELCOME_MSG = MACHINE_NAME_SUBST _UxGT(" siap.");
|
||||
LSTR MSG_MEDIA_INSERTED = _UxGT("Kartu terpasang");
|
||||
LSTR MSG_MEDIA_REMOVED = _UxGT("Kartu dilepas");
|
||||
LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstop");
|
||||
LSTR MSG_MAIN_MENU = _UxGT("Menu Utama");
|
||||
LSTR MSG_DISABLE_STEPPERS = _UxGT("Matikan motor");
|
||||
LSTR MSG_LEVEL_BED_HOMING = _UxGT("Homing XYZ");
|
||||
LSTR MSG_LEVEL_BED_WAITING = _UxGT("Klik untuk mulai");
|
||||
LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Titik berikutnya");
|
||||
LSTR MSG_LEVEL_BED_DONE = _UxGT("Perataan selesai!");
|
||||
LSTR MSG_SET_HOME_OFFSETS = _UxGT("Setel offset home");
|
||||
LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offset diterapkan");
|
||||
LSTR MSG_PREHEAT_1 = _UxGT("Panaskan ") PREHEAT_1_LABEL;
|
||||
LSTR MSG_PREHEAT_1_ALL = _UxGT("Panaskan ") PREHEAT_1_LABEL _UxGT(" semua");
|
||||
LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Panaskan ") PREHEAT_1_LABEL _UxGT(" bed");
|
||||
LSTR MSG_COOLDOWN = _UxGT("Dinginkan");
|
||||
LSTR MSG_SWITCH_PS_ON = _UxGT("Hidupkan daya");
|
||||
LSTR MSG_SWITCH_PS_OFF = _UxGT("Matikan daya");
|
||||
LSTR MSG_EXTRUDE = _UxGT("Ekstrusi");
|
||||
LSTR MSG_RETRACT = _UxGT("Tarik balik");
|
||||
LSTR MSG_MOVE_AXIS = _UxGT("Gerak sumbu");
|
||||
LSTR MSG_LEVEL_BED = _UxGT("Ratakan bed");
|
||||
LSTR MSG_MOVE_X = _UxGT("Gerak X");
|
||||
LSTR MSG_MOVE_Y = _UxGT("Gerak Y");
|
||||
LSTR MSG_MOVE_Z = _UxGT("Gerak Z");
|
||||
LSTR MSG_MOVE_E = _UxGT("Ekstruder");
|
||||
LSTR MSG_FAN_SPEED = _UxGT("Kecep. kipas");
|
||||
LSTR MSG_FLOW = _UxGT("Aliran");
|
||||
LSTR MSG_CONTROL = _UxGT("Kontrol");
|
||||
LSTR MSG_TEMPERATURE = _UxGT("Suhu");
|
||||
LSTR MSG_STOP_PRINT = _UxGT("Hentikan cetak");
|
||||
LSTR MSG_DEBUG_MENU = _UxGT("Menu debug");
|
||||
LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Tes bar kemajuan");
|
||||
LSTR MSG_YES = _UxGT("Ya");
|
||||
LSTR MSG_NO = _UxGT("Tidak");
|
||||
LSTR MSG_BACK = _UxGT("Kembali");
|
||||
LSTR MSG_MEDIA_READ_ERROR = _UxGT("Kesalahan baca media");
|
||||
LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Endstop lunak");
|
||||
LSTR MSG_ADVANCED_SETTINGS = _UxGT("Pengaturan lanjut");
|
||||
LSTR MSG_CONFIGURATION = _UxGT("Konfigurasi");
|
||||
LSTR MSG_BUTTON_NEXT = _UxGT("Lanjut");
|
||||
LSTR MSG_BUTTON_INIT = _UxGT("Mulai");
|
||||
LSTR MSG_HOME_ALL = _UxGT("Home semua");
|
||||
LSTR MSG_PREHEAT_2 = _UxGT("Panaskan ") PREHEAT_2_LABEL;
|
||||
LSTR MSG_PREHEAT = _UxGT("Panaskan");
|
||||
}
|
||||
|
||||
namespace LanguageWide_id {
|
||||
using namespace LanguageNarrow_id;
|
||||
#if LCD_WIDTH > 20 || HAS_DWIN_E3V2
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace LanguageTall_id {
|
||||
using namespace LanguageWide_id;
|
||||
#if LCD_HEIGHT >= 4
|
||||
// Filament Change screens show up to 3 lines on a 4-line display
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace Language_id {
|
||||
using namespace LanguageTall_id;
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ void RTS::sdCardInit() {
|
|||
for (uint8_t j = 0; j < MAX_NUM_FILES; j++)
|
||||
for (uint8_t i = 0; i < FILENAME_LEN; i++)
|
||||
sendData(0, cardRec.addr[j] + i);
|
||||
ZERO(&cardRec);
|
||||
OBJZERO(cardRec);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -221,7 +221,7 @@ void RTS::sdCardUpdate() {
|
|||
sendData(0, PRINT_FILE_TEXT_VP + j);
|
||||
sendData(0, SELECT_FILE_TEXT_VP + j);
|
||||
}
|
||||
ZERO(&cardRec);
|
||||
OBJZERO(cardRec);
|
||||
}
|
||||
lcd_sd_status = sd_status;
|
||||
}
|
||||
|
|
@ -422,7 +422,7 @@ void RTS::sendData() {
|
|||
for (uint16_t i = 0; i < snddat.len + 3; i++)
|
||||
LCD_SERIAL.write(databuf[i]);
|
||||
|
||||
ZERO(&snddat);
|
||||
OBJZERO(snddat);
|
||||
ZERO(databuf);
|
||||
snddat.head[0] = FHONE;
|
||||
snddat.head[1] = FHTWO;
|
||||
|
|
@ -543,7 +543,7 @@ void RTS::handleData() {
|
|||
int16_t checkKey = -1;
|
||||
// For waiting
|
||||
if (waitway > 0) {
|
||||
memset(&recdat, 0, sizeof(recdat));
|
||||
OBJZERO(recdat);
|
||||
recdat.head[0] = FHONE;
|
||||
recdat.head[1] = FHTWO;
|
||||
return;
|
||||
|
|
@ -556,7 +556,7 @@ void RTS::handleData() {
|
|||
}
|
||||
|
||||
if (checkKey < 0) {
|
||||
ZERO(&recdat);
|
||||
OBJZERO(recdat);
|
||||
recdat.head[0] = FHONE;
|
||||
recdat.head[1] = FHTWO;
|
||||
return;
|
||||
|
|
@ -1512,7 +1512,7 @@ void RTS::handleData() {
|
|||
|
||||
default: break;
|
||||
}
|
||||
ZERO(&recdat);
|
||||
OBJZERO(recdat);
|
||||
recdat.head[0] = FHONE;
|
||||
recdat.head[1] = FHTWO;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1968,8 +1968,8 @@ void Motion::prepare_line_to_destination() {
|
|||
#endif
|
||||
|
||||
if (ignore_e) {
|
||||
position.e = destination.e; // Behave as if the E move really took place
|
||||
planner.set_e_position_mm(destination.e); // Prevent the planner from complaining too
|
||||
position.e = destination.e; // Behave as if the E move really took place
|
||||
sync_plan_position_e(); // Prevent the planner from complaining too
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1094,7 +1094,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.
|
|||
if (motion.position.e < 0) motion.unscaled_e_move(motion.position.e, MMM_TO_MMS(toolchange_settings.retract_speed));
|
||||
|
||||
planner.synchronize();
|
||||
planner.set_e_position_mm(motion.position.e); // Extruder primed and ready
|
||||
motion.sync_plan_position_e(); // Extruder primed and ready
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1630,7 +1630,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
|||
motion.position.e = resume_current_e;
|
||||
|
||||
planner.synchronize();
|
||||
planner.set_e_position_mm(motion.position.e); // New extruder primed and ready
|
||||
motion.sync_plan_position_e(); // New extruder primed and ready
|
||||
|
||||
DEBUG_ECHOLNPGM("Migration Complete");
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ void CardReader::ls(const uint8_t lsflags/*=0*/) {
|
|||
char *segment = &path[i]; // The segment after most slashes
|
||||
|
||||
// If a segment is empty (extra-slash) then exit
|
||||
if (!*segment) break;
|
||||
if (!segment[0]) break;
|
||||
|
||||
// Go to the next segment
|
||||
while (path[++i]) { }
|
||||
|
|
@ -440,7 +440,7 @@ void CardReader::ls(const uint8_t lsflags/*=0*/) {
|
|||
// Zero out slashes to make segments
|
||||
for (i = 0; i < pathLen; i++) if (bufShort[i] == '/') bufShort[i] = '\0';
|
||||
|
||||
SdFile diveDir = root; // start from the root for segment 1
|
||||
MediaFile diveDir = root; // start from the root for segment 1
|
||||
for (i = 0; i < pathLen;) {
|
||||
|
||||
if (bufShort[i] == '\0') i++; // move past a single nul
|
||||
|
|
@ -448,7 +448,7 @@ void CardReader::ls(const uint8_t lsflags/*=0*/) {
|
|||
char *segment = &bufShort[i]; // The segment after most slashes
|
||||
|
||||
// If a segment is empty (extra-slash) then exit
|
||||
if (!*segment) break;
|
||||
if (!segment[0]) break;
|
||||
|
||||
//SERIAL_ECHOLNPGM("Looking for segment: ", segment);
|
||||
|
||||
|
|
@ -839,11 +839,11 @@ void CardReader::openFileRead(const char * const path, const uint8_t subcall_typ
|
|||
|
||||
abortFilePrintNow();
|
||||
|
||||
MediaFile *diveDir;
|
||||
const char * const fname = diveToFile(true, diveDir, path);
|
||||
MediaFile *diveDirPtr;
|
||||
const char * const fname = diveToFile(true, diveDirPtr, path);
|
||||
if (!fname) return openFailed(path);
|
||||
|
||||
if (myfile.open(diveDir, fname, O_READ)) {
|
||||
if (myfile.open(diveDirPtr, fname, O_READ)) {
|
||||
filesize = myfile.fileSize();
|
||||
sdpos = 0;
|
||||
|
||||
|
|
@ -878,12 +878,12 @@ void CardReader::openFileWrite(const char * const path) {
|
|||
|
||||
abortFilePrintNow();
|
||||
|
||||
MediaFile *diveDir;
|
||||
const char * const fname = diveToFile(false, diveDir, path);
|
||||
MediaFile *diveDirPtr;
|
||||
const char * const fname = diveToFile(false, diveDirPtr, path);
|
||||
if (!fname) return openFailed(path);
|
||||
|
||||
#if DISABLED(SDCARD_READONLY)
|
||||
if (myfile.open(diveDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
|
||||
if (myfile.open(diveDirPtr, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
|
||||
flag.saving = true;
|
||||
selectFileByName(fname);
|
||||
TERN_(EMERGENCY_PARSER, emergency_parser.disable());
|
||||
|
|
@ -906,18 +906,18 @@ bool CardReader::fileExists(const char * const path) {
|
|||
DEBUG_ECHOLNPGM("fileExists: ", path);
|
||||
|
||||
// Dive to the file's directory and get the base name
|
||||
MediaFile *diveDir = nullptr;
|
||||
const char * const fname = diveToFile(false, diveDir, path);
|
||||
MediaFile *diveDirPtr = nullptr;
|
||||
const char * const fname = diveToFile(false, diveDirPtr, path);
|
||||
if (!fname) return false;
|
||||
|
||||
// Get the longname of the checked file
|
||||
//diveDir->rewind();
|
||||
//selectByName(*diveDir, fname);
|
||||
//diveDir->close();
|
||||
//diveDirPtr->rewind();
|
||||
//selectByName(*diveDirPtr, fname);
|
||||
//diveDirPtr->close();
|
||||
|
||||
// Try to open the file and return the result
|
||||
MediaFile tmpFile;
|
||||
const bool success = tmpFile.open(diveDir, fname, O_READ);
|
||||
const bool success = tmpFile.open(diveDirPtr, fname, O_READ);
|
||||
if (success) tmpFile.close();
|
||||
return success;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ fi
|
|||
#
|
||||
# By default loop through all languages
|
||||
#
|
||||
LANGS_DEFAULT="an bg ca cz da de el el_CY en es eu fi fr fr_na gl hr hu it jp_kana ko_KR nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test"
|
||||
LANGS_DEFAULT="an bg ca cz da de el el_CY en es eu fi fr fr_na gl hg hr hu id it jp_kana ko_KR nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test"
|
||||
|
||||
DN_WORK=$(mktemp -d)
|
||||
open "$DN_WORK"
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@ LANGNAME = {
|
|||
'fr': { 'size':2, 'iso': "1", 'name':"French" },
|
||||
'fr_na': { 'size':1, 'iso': "1", 'name':"French (no accent)", 'noext':1 },
|
||||
'gl': { 'size':1, 'iso': "1", 'name':"Galician" },
|
||||
'hg': { 'size':2, 'iso': "1", 'name':"Hinglish (Hindi-Latin)", 'noext':1 },
|
||||
'hr': { 'size':2, 'iso': "1", 'name':"Croatian (Hrvatski)" },
|
||||
'hu': { 'size':2, 'name':"Hungarian / Magyar" },
|
||||
'id': { 'size':2, 'iso': "1", 'name':"Indonesian", 'noext':1 },
|
||||
'it': { 'size':1, 'iso': "1", 'name':"Italian" },
|
||||
'jp_kana': { 'size':3, 'iso': "KANA", 'name':"Japanese (Kana)" },
|
||||
'ko_KR': { 'size':1, 'name':"Korean" },
|
||||
|
|
|
|||
|
|
@ -251,11 +251,11 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping
|
|||
#
|
||||
#restore_configs
|
||||
#opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
|
||||
#for lang in an bg ca cz da de el el_CY en es eu fi fr gl hr hu it jp_kana nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff" "$3"; done
|
||||
#for lang in an bg ca cz da de el el_CY en es eu fi fr gl hg hr hu id it jp_kana nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff" "$3"; done
|
||||
#
|
||||
#restore_configs
|
||||
#opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT
|
||||
#for lang in an bg ca cz da de el el_CY en es eu fi fr gl hr hu it jp_kana nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff" "$3"; done
|
||||
#for lang in an bg ca cz da de el el_CY en es eu fi fr gl hg hr hu id it jp_kana nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff" "$3"; done
|
||||
|
||||
######## Example Configurations ##############
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue