Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
aa595f5
Merge pull request #1 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 11, 2020
d5d325c
Merge pull request #2 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 13, 2020
d8d5c0f
Merge pull request #4 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 14, 2020
a1055dd
Merge pull request #6 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 18, 2020
8b349b1
Merge pull request #7 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 22, 2020
8c42e50
Merge pull request #14 from MarlinFirmware/bugfix-2.0.x
makerbase-mks Jun 27, 2020
626ed70
Merge pull request #15 from MarlinFirmware/bugfix-2.0.x
makerbase-mks Jul 1, 2020
80a2552
Merge pull request #16 from MarlinFirmware/bugfix-2.0.x
MKS-Sean Jul 2, 2020
a6946ed
Merge pull request #27 from MarlinFirmware/bugfix-2.0.x
MKS-Sean Nov 18, 2020
1b13d2e
Increase the MKS WI-FI module function of TFT_LVGL_UI
MKS-Sean Nov 18, 2020
344eeeb
Clean up formatting
thinkyhead Nov 19, 2020
2ba2365
Fix formatting, option name
thinkyhead Nov 19, 2020
6ad9aeb
also
thinkyhead Nov 19, 2020
d575f30
Fix typos
thinkyhead Nov 19, 2020
9b61b49
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20191
thinkyhead Nov 19, 2020
e3c705c
Cleanup
thinkyhead Nov 19, 2020
6bd9270
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20191
thinkyhead Nov 19, 2020
81e1070
Misc cleanup
thinkyhead Nov 19, 2020
5f68a59
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20191
thinkyhead Nov 19, 2020
ba0f8c3
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20191
thinkyhead Nov 19, 2020
8acb969
Fix indent
thinkyhead Nov 19, 2020
8575d73
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20191
rhapsodyv Dec 7, 2020
c4ec312
use uint8_t for binary data
rhapsodyv Dec 7, 2020
3b869a7
minor cleanup
rhapsodyv Dec 9, 2020
40dcbd8
save some bytes
rhapsodyv Dec 9, 2020
95541e6
fix typo
rhapsodyv Dec 9, 2020
748edf6
more cleanup
rhapsodyv Dec 9, 2020
0951192
mks-ui cleanup
thinkyhead Dec 12, 2020
3749da8
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20191
thinkyhead Dec 12, 2020
cd3f614
buf => cmd_wifi_list
thinkyhead Dec 12, 2020
de97876
match types / sizes
thinkyhead Dec 12, 2020
6b48301
spacing and spelling
thinkyhead Dec 12, 2020
1c7a4f3
Consolidate buffers
thinkyhead Dec 12, 2020
cb3dda6
Fix sign on babystep_dist
thinkyhead Dec 16, 2020
1c92d73
Exit if cur_name is null
thinkyhead Dec 16, 2020
f73fda1
Merge the revised code of X-Ryl669
MKS-Sean Dec 17, 2020
c676bc1
Restore default configuration
MKS-Sean Dec 17, 2020
e3ba265
Delete the comment code and modify the code format
MKS-Sean Dec 17, 2020
eaf2b66
Resolve conflicting files
MKS-Sean Dec 23, 2020
ffcf818
Resolve conflicting files
MKS-Sean Dec 23, 2020
13d769f
lvgl ui adds calibration function
MKS-Sean Dec 23, 2020
06d0f57
Resolve file conflicts
MKS-Sean Dec 23, 2020
b2c3dd5
Merge pull request #29 from MarlinFirmware/bugfix-2.0.x
MKS-Sean Dec 23, 2020
66fc496
Merge pull request #30 from MarlinFirmware/bugfix-2.0.x
makerbase-mks Dec 23, 2020
790b5fe
Fix bugs in the file selector screen and icon not being displayed cor…
X-Ryl669 Dec 22, 2020
9191169
Fix missing stack return causing infinite usage of display stack
X-Ryl669 Dec 27, 2020
b4d2972
Fix autoleveling clearing screen when not appropriate
X-Ryl669 Dec 27, 2020
83377d3
Adding current position to the move menu (not finished yet)
X-Ryl669 Dec 26, 2020
70246bb
[FIX] Case sensitive include on Linux
Rockman18 Dec 27, 2020
7f69306
Merge pull request #34 from Rockman18/fix-wifi
MKS-Sean Dec 28, 2020
282167a
Merge pull request #33 from X-Ryl669/AddStatusInMoveMenu
MKS-Sean Dec 28, 2020
89a4a2e
Merge pull request #31 from X-Ryl669/FixIcon
MKS-Sean Dec 28, 2020
4b26ffe
Fix CI check problem
MKS-Sean Dec 28, 2020
761af97
public_bufpublic_buf
MKS-Sean Dec 28, 2020
d9836f7
resolve conflict
MKS-Sean Dec 28, 2020
021dba1
resolve conflicts
MKS-Sean Dec 29, 2020
da05663
resolve conflicts
MKS-Sean Dec 29, 2020
b8483be
Fix wifi transmission problem
MKS-Sean Dec 30, 2020
a6f92df
resolve conflicts
MKS-Sean Dec 30, 2020
e005f9c
resolve conflicts
MKS-Sean Dec 30, 2020
7564305
file added by mistake?
rhapsodyv Dec 30, 2020
4b5f362
Keep comments for future test env
rhapsodyv Dec 30, 2020
6bd6aae
obsolete tft code
rhapsodyv Dec 30, 2020
35b37c5
Fix bug reported by Malderin about motor off
X-Ryl669 Jan 10, 2021
94a5365
WIP: Add GCode input method to the graphical menu (so the printer can…
X-Ryl669 Jan 11, 2021
cae277c
WIP: Add GCode dialog to UI so it's possible to enter GCode command d…
X-Ryl669 Jan 11, 2021
ead9585
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20755
thinkyhead Jan 13, 2021
edcd4f8
Merge bugfix-2.0.x into pr/20755
thinkyhead Jan 13, 2021
3286ed2
General cleanup
thinkyhead Jan 13, 2021
1173187
Add missing files
X-Ryl669 Jan 13, 2021
2b07871
MKS UI general cleanup
thinkyhead Jan 14, 2021
ddbd5e2
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20755
thinkyhead Jan 14, 2021
a70a623
more cleanup
thinkyhead Jan 14, 2021
acac74f
minor tweaks
thinkyhead Jan 14, 2021
ba549cc
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20755
thinkyhead Jan 14, 2021
f1b5a2c
Misc. g-code injection fixes
thinkyhead Jan 14, 2021
ac04234
inline G91/G90
thinkyhead Jan 14, 2021
b20af93
Use G90/G91
thinkyhead Jan 14, 2021
1b83e4d
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20755
thinkyhead Jan 14, 2021
7df5c18
Use memcmp_P
thinkyhead Jan 14, 2021
e968c7a
Add memcmp_P to HALs
thinkyhead Jan 14, 2021
bad6289
outdent
thinkyhead Jan 14, 2021
681a3ed
Start implementing a generic serial hook class.
X-Ryl669 Jan 14, 2021
e85bb2f
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20755
thinkyhead Jan 16, 2021
ed95bde
General serial cleanup
thinkyhead Jan 16, 2021
41b64c7
etc.
thinkyhead Jan 16, 2021
ac52624
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20755
thinkyhead Jan 28, 2021
faf3a5b
merge followup
thinkyhead Jan 28, 2021
c59b6a3
comment
thinkyhead Jan 28, 2021
c8aa7eb
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/20755
thinkyhead Jan 28, 2021
0fc1326
[cron] Bump distribution date (2021-01-29)
thinkyhead Jan 29, 2021
49008a1
Fix LED_CONTROL_MENU compile (#20914)
ellensp Jan 29, 2021
1597dcc
Fix undefined G28_STR (#20912)
ellensp Jan 29, 2021
0b9ca9b
FYSETC Cheetah 2.0 (#20897)
GerogeFu Jan 29, 2021
e4d05bc
Optimize serial output code for size (#20911)
X-Ryl669 Jan 29, 2021
3033e8f
AutoReport class (Temperature, Cardreader) (#20913)
thinkyhead Jan 29, 2021
09c3ec8
MPX_ARM_MINI board (Mingda MD-16) (#20711)
rafaljot Jan 29, 2021
9d54d81
[cron] Bump distribution date (2021-01-30)
thinkyhead Jan 30, 2021
9f0b693
Fix G28_STR (#20925)
ellensp Jan 30, 2021
3651c98
KILL, BEEPER pins for LCD_FOR_MELZI (#20924)
ellensp Jan 30, 2021
09f9889
Language selection auto-save option (#20915)
ConstantijnCrijnen Jan 30, 2021
656a450
Fix merge issue
X-Ryl669 Jan 30, 2021
b7c43ee
Update to use new serial hook code
X-Ryl669 Jan 31, 2021
094f3c5
Merge branch 'bugfix-2.0.x' into AddGCodeMenu
X-Ryl669 Jan 31, 2021
fe3a00c
Clean up
thinkyhead Feb 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Marlin/src/HAL/AVR/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ typedef int8_t pin_t;

// Serial ports
#ifdef USBCON
#include "../../core/serial_hook.h"
#include "../../core/serial_hook.h"
typedef ForwardSerial0Type< decltype(Serial) > DefaultSerial;
extern DefaultSerial MSerial;
#ifdef BLUETOOTH
typedef ForwardSerial0Type< decltype(bluetoothSerial) > BTSerial;
extern BTSerial btSerial;
#endif

#define MYSERIAL0 TERN(BLUETOOTH, btSerial, MSerial)
#else
#if !WITHIN(SERIAL_PORT, -1, 3)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/AVR/MarlinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ MSerialT customizedSerial1(MSerialT::HasEmergencyParser);

template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
MSerialT4 lcdSerial(MSerialT4::HasEmergencyParser);

#if HAS_DGUS_LCD
template<typename Cfg>
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/HAL/AVR/MarlinSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
};

typedef Serial0Type< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT;
typedef Serial0Type< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT;
extern MSerialT customizedSerial1;

#ifdef SERIAL_PORT_2
typedef Serial0Type< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> > > MSerialT2;
typedef Serial0Type< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> > > MSerialT2;
extern MSerialT2 customizedSerial2;
#endif

Expand All @@ -262,7 +262,7 @@
static constexpr bool RX_OVERRUNS = false;
};

typedef Serial0Type< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialT3;
typedef Serial0Type< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialT3;
extern MSerial3 mmuSerial;
#endif

Expand Down Expand Up @@ -292,7 +292,7 @@
};


typedef Serial0Type< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialT4;
typedef Serial0Type< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialT4;
extern MSerialT4 lcdSerial;
#endif

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#ifdef USBCON
#include <USBSerial.h>
#include "../../core/serial_hook.h"
#include "../../core/serial_hook.h"
typedef ForwardSerial0Type< decltype(SerialUSB) > DefaultSerial;
extern DefaultSerial MSerial;
#endif
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@
GPIO_InitStruct.Pin = GPIO_PIN_2;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);


#if DISABLED(STM32F1xx)
// TODO: use __HAL_RCC_SDIO_RELEASE_RESET() and __HAL_RCC_SDIO_CLK_ENABLE();
RCC->APB2RSTR &= ~RCC_APB2RSTR_SDIORST_Msk; // take SDIO out of reset
Expand Down
26 changes: 26 additions & 0 deletions Marlin/src/HAL/STM32F1/MarlinSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
#include "../../inc/MarlinConfigPre.h"
#include "../../core/serial_hook.h"

#if HAS_TFT_LVGL_UI
extern "C" { extern char public_buf_m[100]; }
#endif

// Increase priority of serial interrupts, to reduce overflow errors
#define UART_IRQ_PRIO 1

Expand All @@ -45,6 +49,28 @@ struct MarlinSerial : public HardwareSerial {
nvic_irq_set_priority(c_dev()->irq_num, UART_IRQ_PRIO);
}
#endif

#if HAS_TFT_LVGL_UI
// Hook the serial write method to capture the output of GCode command sent via LCD
uint32_t current_wpos;
void (*line_callback)(void *, const char * msg);
void *user_pointer;

void set_hook(void (*hook)(void *, const char *), void * that) { line_callback = hook; user_pointer = that; current_wpos = 0; }

size_t write(uint8_t c) {
if (line_callback) {
if (c == '\n' || current_wpos == sizeof(public_buf_m) - 1) { // End of line, probably end of command anyway
public_buf_m[current_wpos] = 0;
line_callback(user_pointer, public_buf_m);
current_wpos = 0;
}
else
public_buf_m[current_wpos++] = c;
}
return HardwareSerial::write(c);
}
#endif
};

typedef Serial0Type<MarlinSerial> MSerialT;
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/core/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@
template<bool, typename _Tp = void> struct enable_if { };
template<typename _Tp> struct enable_if<true, _Tp> { typedef _Tp type; };
}
// C++11 solution using SFINAE to detect the existance of a member in a class at compile time.
// It creates a HasMember<Type> structure containing 'value' set to true if the member exists
// C++11 solution using SFINAE to detect the existance of a member in a class at compile time.
// It creates a HasMember<Type> structure containing 'value' set to true if the member exists
#define HAS_MEMBER_IMPL(Member) \
namespace Private { \
template <typename Type, typename Yes=char, typename No=long> struct HasMember_ ## Member { \
Expand Down
7 changes: 4 additions & 3 deletions Marlin/src/core/serial_hook.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ struct RuntimeSerial : public SerialBase< RuntimeSerial<SerialT> >, public Seria
using BaseClassT::print;
using BaseClassT::println;


// Underlying implementation might use Arduino's bool operator
bool connected() {
return Private::HasMember_connected<SerialT>::value ? CALL_IF_EXISTS(bool, static_cast<SerialT*>(this), connected) : static_cast<SerialT*>(this)->operator bool();
}
bool connected() {
return Private::HasMember_connected<SerialT>::value ? CALL_IF_EXISTS(bool, static_cast<SerialT*>(this), connected) : static_cast<SerialT*>(this)->operator bool();
}

void setHook(WriteHook writeHook = 0, EndOfMessageHook eofHook = 0, void * userPointer = 0) {
// Order is important here as serial code can be called inside interrupts
Expand Down
109 changes: 109 additions & 0 deletions Marlin/src/lcd/extui/lib/mks_ui/draw_gcode.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#include "../../../../inc/MarlinConfigPre.h"

#if HAS_TFT_LVGL_UI

#include "draw_ui.h"
#include <lv_conf.h>

#include "../../../../inc/MarlinConfig.h"

extern lv_group_t *g;
static lv_obj_t *scr,*outL,*outV = 0;
static int currentWritePos = 0;
extern uint8_t public_buf[513];
extern "C" { extern char public_buf_m[100]; }

enum {
ID_GCODE_RETURN = 1,
ID_GCODE_COMMAND,
};

static void event_handler(lv_obj_t *obj, lv_event_t event) {
if (event != LV_EVENT_RELEASED) return;
lv_clear_gcode();
switch (obj->mks_obj_id) {
case ID_GCODE_RETURN:
lv_draw_more();
return;
case ID_GCODE_COMMAND:
keyboard_value = GCodeCommand;
lv_draw_keyboard();
break;
}
}

void lv_show_gcode_output(void * that, const char * txt) {
// Ignore echo of command
if (!memcmp(txt, "echo:", 5)) {
public_buf[0] = 0; // Clear output buffer
return;
}

// Avoid overflow if the answer is too large
size_t len = strlen((const char*)public_buf), tlen = strlen(txt);
if (len + tlen + 1 < sizeof(public_buf)) {
memcpy(public_buf + len, txt, tlen);
public_buf[len + tlen] = '\n';
}
}

void lv_serial_capt_hook(void * userPointer, uint8_t c)
{
if (c == '\n' || currentWritePos == sizeof(public_buf_m) - 1) { // End of line, probably end of command anyway
public_buf_m[currentWritePos] = 0;
lv_show_gcode_output(userPointer, public_buf_m);
currentWritePos = 0;
}
else public_buf_m[currentWritePos++] = c;
}
void lv_eom_hook(void *)
{
// Message is done, let's remove the hook now
MYSERIAL0.setHook();
// We are back from the keyboard, so let's redraw ourselves
draw_return_ui();
}

void lv_draw_gcode(bool clear) {
if (clear) {
currentWritePos = 0;
public_buf[0] = 0;
}
scr = lv_screen_create(GCODE_UI, more_menu.gcode);
lv_screen_menu_item(scr, more_menu.entergcode, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_GCODE_COMMAND, 1);
outL = lv_label_create(scr, PARA_UI_POS_X, PARA_UI_POS_Y * 2, "Result:");
outV = lv_label_create(scr, PARA_UI_POS_X, PARA_UI_POS_Y * 3, (const char*)public_buf);

lv_big_button_create(scr, "F:/bmp_back70x40.bin", common_menu.text_back, PARA_UI_BACL_POS_X + 10, PARA_UI_BACL_POS_Y, event_handler, ID_GCODE_RETURN, true);
}

void lv_clear_gcode() {
#if HAS_ROTARY_ENCODER
if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g);
#endif
lv_obj_del(scr);
outV = 0;
}

#endif // HAS_TFT_LVGL_UI
33 changes: 33 additions & 0 deletions Marlin/src/lcd/extui/lib/mks_ui/draw_gcode.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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

#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
#endif

extern void lv_draw_gcode(bool clear = false);
extern void lv_clear_gcode();

#ifdef __cplusplus
} /* C-declarations for C++ */
#endif
24 changes: 20 additions & 4 deletions Marlin/src/lcd/extui/lib/mks_ui/draw_keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <lv_conf.h>

#include "../../../../inc/MarlinConfig.h"
#include "../../../../gcode/queue.h"

extern lv_group_t *g;
static lv_obj_t *scr;
Expand Down Expand Up @@ -153,13 +154,22 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) {
lv_draw_wifi_tips();
break;
#endif // MKS_WIFI_MODULE
case gcodeCommand:
case autoLevelGcodeCommand:
uint8_t buf[100];
strncpy((char *)buf,ret_ta_txt,sizeof(buf));
update_gcode_command(AUTO_LEVELING_COMMAND_ADDR,buf);
lv_clear_keyboard();
draw_return_ui();
break;
case GCodeCommand:
if (queue.length <= (BUFSIZE - 3)) {
// Hook anything that goes to the serial port
MYSERIAL0.setHook(lv_serial_capt_hook, lv_eom_hook, 0);
queue.enqueue_one_now(ret_ta_txt);
}
lv_clear_keyboard();
// draw_return_ui is called in the end of message hook
break;
default: break;
}
}
Expand Down Expand Up @@ -238,12 +248,18 @@ void lv_draw_keyboard() {
// Create a text area. The keyboard will write here
lv_obj_t *ta = lv_ta_create(scr, nullptr);
lv_obj_align(ta, nullptr, LV_ALIGN_IN_TOP_MID, 0, 10);
if (keyboard_value == gcodeCommand) {
switch (keyboard_value) {
case autoLevelGcodeCommand:
get_gcode_command(AUTO_LEVELING_COMMAND_ADDR,(uint8_t *)public_buf_m);
public_buf_m[sizeof(public_buf_m)-1] = 0;
lv_ta_set_text(ta, public_buf_m);
}
else {
break;
case GCodeCommand:
// Start with uppercase by default
lv_btnm_set_map(kb, kb_map_uc);
lv_btnm_set_ctrl_map(kb, kb_ctrl_uc_map);
// Fallthrough
default:
lv_ta_set_text(ta, "");
}

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/lib/mks_ui/draw_level_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
lv_draw_manual_level_pos_settings();
break;
case ID_LEVEL_COMMAND:
keyboard_value = gcodeCommand;
keyboard_value = autoLevelGcodeCommand;
lv_draw_keyboard();
break;
#if HAS_BED_PROBE
Expand Down
Loading