Cleanup before MKS changes

This commit is contained in:
Scott Lahteine 2020-09-20 19:07:59 -05:00
parent 76d8d1742c
commit 60ab7a1ddb
66 changed files with 294 additions and 318 deletions

View File

@ -1112,8 +1112,7 @@ static inline uint32_t convert_byte_array_to_32_bit(uint8_t *data)
uint8_t u8[8]; uint8_t u8[8];
}long_addr; }long_addr;
uint8_t index; uint8_t index;
for (index = 0; index < 4; index++) for (index = 0; index < 4; index++) {
{
long_addr.u8[index] = *data++; long_addr.u8[index] = *data++;
} }
return long_addr.u32; return long_addr.u32;

View File

@ -87,7 +87,7 @@ void TFT_FSMC::Init() {
__HAL_RCC_FSMC_CLK_ENABLE(); __HAL_RCC_FSMC_CLK_ENABLE();
for(uint16_t i = 0; PinMap_FSMC[i].pin != NC; i++) for (uint16_t i = 0; PinMap_FSMC[i].pin != NC; i++)
pinmap_pinout(PinMap_FSMC[i].pin, PinMap_FSMC); pinmap_pinout(PinMap_FSMC[i].pin, PinMap_FSMC);
pinmap_pinout(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS); pinmap_pinout(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS);
pinmap_pinout(digitalPinToPinName(TFT_RS_PIN), PinMap_FSMC_RS); pinmap_pinout(digitalPinToPinName(TFT_RS_PIN), PinMap_FSMC_RS);

View File

@ -188,7 +188,7 @@ bool UIFlashStorage::is_present = false;
} }
void UIFlashStorage::initialize() { void UIFlashStorage::initialize() {
for(uint8_t i = 0; i < 10; i++) { for (uint8_t i = 0; i < 10; i++) {
if (check_known_device()) { if (check_known_device()) {
is_present = true; is_present = true;
break; break;
@ -239,7 +239,7 @@ bool UIFlashStorage::is_present = false;
uint16_t stride = 4 + block_size; uint16_t stride = 4 + block_size;
int32_t read_offset = -1; int32_t read_offset = -1;
for(uint32_t offset = 0; offset < (data_storage_area_size - stride); offset += stride) { for (uint32_t offset = 0; offset < (data_storage_area_size - stride); offset += stride) {
uint32_t delim; uint32_t delim;
spi_read_begin(offset); spi_read_begin(offset);
spi_read_bulk (&delim, sizeof(delim)); spi_read_bulk (&delim, sizeof(delim));
@ -395,9 +395,8 @@ bool UIFlashStorage::is_present = false;
uint32_t UIFlashStorage::get_media_file_start(uint8_t slot) { uint32_t UIFlashStorage::get_media_file_start(uint8_t slot) {
uint32_t addr = media_storage_addr + sizeof(uint32_t) * media_storage_slots; uint32_t addr = media_storage_addr + sizeof(uint32_t) * media_storage_slots;
spi_read_begin(media_storage_addr); spi_read_begin(media_storage_addr);
for(uint8_t i = 0; i < slot; i++) { for (uint8_t i = 0; i < slot; i++)
addr += spi_read_32(); addr += spi_read_32();
}
spi_read_end(); spi_read_end();
return addr; return addr;
} }
@ -442,7 +441,7 @@ bool UIFlashStorage::is_present = false;
addr = get_media_file_start(slot); addr = get_media_file_start(slot);
// Write out the file itself // Write out the file itself
for(;;) { for (;;) {
const int16_t nBytes = reader.read(buff, write_page_size); const int16_t nBytes = reader.read(buff, write_page_size);
if (nBytes == -1) { if (nBytes == -1) {
SERIAL_ECHOLNPGM("Failed to read from file"); SERIAL_ECHOLNPGM("Failed to read from file");
@ -450,8 +449,7 @@ bool UIFlashStorage::is_present = false;
} }
addr = write(addr, buff, nBytes); addr = write(addr, buff, nBytes);
if (nBytes != write_page_size) if (nBytes != write_page_size) break;
break;
TERN_(EXTENSIBLE_UI, ExtUI::yield()); TERN_(EXTENSIBLE_UI, ExtUI::yield());
} }

View File

@ -69,9 +69,8 @@ using namespace FTDI;
void DLCache::init() { void DLCache::init() {
CLCD::mem_write_32(DL_FREE_ADDR, DL_FREE_ADDR + 4); CLCD::mem_write_32(DL_FREE_ADDR, DL_FREE_ADDR + 4);
for(uint8_t slot = 0; slot < DL_CACHE_SLOTS; slot++) { for (uint8_t slot = 0; slot < DL_CACHE_SLOTS; slot++)
save_slot(slot, 0, 0, 0); save_slot(slot, 0, 0, 0);
}
} }
bool DLCache::has_data() { bool DLCache::has_data() {

View File

@ -74,12 +74,12 @@
#define DRAW_LAYOUT_GRID \ #define DRAW_LAYOUT_GRID \
{ \ { \
cmd.cmd(LINE_WIDTH(4)); \ cmd.cmd(LINE_WIDTH(4)); \
for(int i = 1; i <= GRID_COLS; i++) { \ for (int i = 1; i <= GRID_COLS; i++) { \
cmd.cmd(BEGIN(LINES)); \ cmd.cmd(BEGIN(LINES)); \
cmd.cmd(VERTEX2F(GRID_X(i) *16, 0 *16)); \ cmd.cmd(VERTEX2F(GRID_X(i) *16, 0 *16)); \
cmd.cmd(VERTEX2F(GRID_X(i) *16, FTDI::display_height *16)); \ cmd.cmd(VERTEX2F(GRID_X(i) *16, FTDI::display_height *16)); \
} \ } \
for(int i = 1; i < GRID_ROWS; i++) { \ for (int i = 1; i < GRID_ROWS; i++) { \
cmd.cmd(BEGIN(LINES)); \ cmd.cmd(BEGIN(LINES)); \
cmd.cmd(VERTEX2F(0 *16, GRID_Y(i) *16)); \ cmd.cmd(VERTEX2F(0 *16, GRID_Y(i) *16)); \
cmd.cmd(VERTEX2F(FTDI::display_width *16, GRID_Y(i) *16)); \ cmd.cmd(VERTEX2F(FTDI::display_width *16, GRID_Y(i) *16)); \

View File

@ -26,7 +26,7 @@
/********************** VIRTUAL DISPATCH DATA TYPE ******************************/ /********************** VIRTUAL DISPATCH DATA TYPE ******************************/
uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) { uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) {
for(uint8_t type = 0; type < functionTableSize; type++) { for (uint8_t type = 0; type < functionTableSize; type++) {
if (GET_METHOD(type, onRedraw) == onRedraw_ptr) { if (GET_METHOD(type, onRedraw) == onRedraw_ptr) {
return type; return type;
} }
@ -50,9 +50,8 @@ void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) {
} }
void ScreenRef::initializeAll() { void ScreenRef::initializeAll() {
for(uint8_t type = 0; type < functionTableSize; type++) { for (uint8_t type = 0; type < functionTableSize; type++)
GET_METHOD(type, onStartup)(); GET_METHOD(type, onStartup)();
}
} }
/********************** SCREEN STACK ******************************/ /********************** SCREEN STACK ******************************/

View File

@ -34,7 +34,7 @@ namespace FTDI {
const char *p = str; const char *p = str;
end = str; end = str;
uint16_t lw = 0, result = 0; uint16_t lw = 0, result = 0;
for(;;) { for (;;) {
utf8_char_t c = get_utf8_char_and_inc(p); utf8_char_t c = get_utf8_char_and_inc(p);
if (c == ' ' || c == '\n' || c == '\0') { if (c == ' ' || c == '\n' || c == '\0') {
if (lw < w || end == str) { if (lw < w || end == str) {
@ -60,7 +60,7 @@ namespace FTDI {
const char *line_end; const char *line_end;
const uint16_t wrap_width = width; const uint16_t wrap_width = width;
width = height = 0; width = height = 0;
for(;;) { for (;;) {
uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end); uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end);
if (line_end == line_start) break; if (line_end == line_start) break;
width = max(width, line_width); width = max(width, line_width);
@ -78,7 +78,7 @@ namespace FTDI {
FontMetrics fm(font); FontMetrics fm(font);
// Shrink the font until we find a font that fits // Shrink the font until we find a font that fits
for(;;) { for (;;) {
box_width = w; box_width = w;
measure_text_box(fm, str, box_width, box_height); measure_text_box(fm, str, box_width, box_height);
if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break; if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break;
@ -91,7 +91,7 @@ namespace FTDI {
const char *line_start = str; const char *line_start = str;
const char *line_end; const char *line_end;
for(;;) { for (;;) {
find_line_break(fm, w, line_start, line_end); find_line_break(fm, w, line_start, line_end);
if (line_end == line_start) break; if (line_end == line_start) break;

View File

@ -37,13 +37,13 @@ namespace FTDI {
// split and still allow the ellipsis to fit. // split and still allow the ellipsis to fit.
int16_t lineWidth = 0; int16_t lineWidth = 0;
char *breakPoint = str; char *breakPoint = str;
for(char* c = str; *c; c++) { for (char* c = str; *c; c++) {
lineWidth += fm.get_char_width(*c); lineWidth += fm.get_char_width(*c);
if(lineWidth + ellipsisWidth < w) if (lineWidth + ellipsisWidth < w)
breakPoint = c; breakPoint = c;
} }
if(lineWidth > w) { if (lineWidth > w) {
*breakPoint = '\0'; *breakPoint = '\0';
strcpy_P(breakPoint,PSTR("...")); strcpy_P(breakPoint,PSTR("..."));
} }

View File

@ -253,7 +253,7 @@ void BedMeshScreen::drawHighlightedPointValue() {
.tag(1).button( OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY)) .tag(1).button( OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY))
.tag(0); .tag(0);
switch(screen_data.BedMeshScreen.message) { switch (screen_data.BedMeshScreen.message) {
case screen_data.BedMeshScreen.MSG_MESH_COMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break; case screen_data.BedMeshScreen.MSG_MESH_COMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break;
case screen_data.BedMeshScreen.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break; case screen_data.BedMeshScreen.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break;
default: break; default: break;
@ -321,7 +321,7 @@ bool BedMeshScreen::isMeshComplete(ExtUI::bed_mesh_t data) {
} }
void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) {
switch(state) { switch (state) {
case ExtUI::MESH_START: case ExtUI::MESH_START:
screen_data.BedMeshScreen.count = 0; screen_data.BedMeshScreen.count = 0;
screen_data.BedMeshScreen.message = screen_data.BedMeshScreen.MSG_NONE; screen_data.BedMeshScreen.message = screen_data.BedMeshScreen.MSG_NONE;

View File

@ -115,7 +115,7 @@ void FilesScreen::drawFileList() {
#define MARGIN_T 0 #define MARGIN_T 0
#define MARGIN_B 0 #define MARGIN_B 0
uint16_t fileIndex = screen_data.FilesScreen.cur_page * files_per_page; uint16_t fileIndex = screen_data.FilesScreen.cur_page * files_per_page;
for(uint8_t i = 0; i < files_per_page; i++, fileIndex++) { for (uint8_t i = 0; i < files_per_page; i++, fileIndex++) {
if (files.seek(fileIndex)) { if (files.seek(fileIndex)) {
drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false); drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false);
} }

View File

@ -222,7 +222,7 @@ void InterfaceSettingsScreen::saveSettings(char *buff) {
eeprom.touch_transform_f = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F); eeprom.touch_transform_f = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F);
eeprom.display_h_offset_adj = CLCD::mem_read_16(CLCD::REG::HOFFSET) - FTDI::Hoffset; eeprom.display_h_offset_adj = CLCD::mem_read_16(CLCD::REG::HOFFSET) - FTDI::Hoffset;
eeprom.display_v_offset_adj = CLCD::mem_read_16(CLCD::REG::VOFFSET) - FTDI::Voffset; eeprom.display_v_offset_adj = CLCD::mem_read_16(CLCD::REG::VOFFSET) - FTDI::Voffset;
for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++) for (uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
eeprom.event_sounds[i] = InterfaceSoundsScreen::event_sounds[i]; eeprom.event_sounds[i] = InterfaceSoundsScreen::event_sounds[i];
memcpy(buff, &eeprom, sizeof(eeprom)); memcpy(buff, &eeprom, sizeof(eeprom));
@ -251,7 +251,7 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) {
CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_F, eeprom.touch_transform_f); CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_F, eeprom.touch_transform_f);
CLCD::mem_write_16(CLCD::REG::HOFFSET, eeprom.display_h_offset_adj + FTDI::Hoffset); CLCD::mem_write_16(CLCD::REG::HOFFSET, eeprom.display_h_offset_adj + FTDI::Hoffset);
CLCD::mem_write_16(CLCD::REG::VOFFSET, eeprom.display_v_offset_adj + FTDI::Voffset); CLCD::mem_write_16(CLCD::REG::VOFFSET, eeprom.display_v_offset_adj + FTDI::Voffset);
for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++) for (uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
InterfaceSoundsScreen::event_sounds[i] = eeprom.event_sounds[i]; InterfaceSoundsScreen::event_sounds[i] = eeprom.event_sounds[i];
TERN_(TOUCH_UI_DEVELOPER_MENU, StressTestScreen::startupCheck()); TERN_(TOUCH_UI_DEVELOPER_MENU, StressTestScreen::startupCheck());

View File

@ -43,7 +43,7 @@ void InterfaceSoundsScreen::toggleSoundSelection(event_t event) {
} }
void InterfaceSoundsScreen::setSoundSelection(event_t event, const SoundPlayer::sound_t* sound) { void InterfaceSoundsScreen::setSoundSelection(event_t event, const SoundPlayer::sound_t* sound) {
for(uint8_t i = 0; i < SoundList::n; i++) for (uint8_t i = 0; i < SoundList::n; i++)
if (SoundList::data(i) == sound) if (SoundList::data(i) == sound)
event_sounds[event] = i; event_sounds[event] = i;
} }

View File

@ -176,11 +176,7 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
char bed_str[20]; char bed_str[20];
char fan_str[20]; char fan_str[20];
sprintf_P( sprintf_P(fan_str, PSTR("%-3d %%"), int8_t(getActualFan_percent(FAN0)));
fan_str,
PSTR("%-3d %%"),
int8_t(getActualFan_percent(FAN0))
);
if (isHeaterIdle(BED)) if (isHeaterIdle(BED))
format_temp_and_idle(bed_str, getActualTemp_celsius(BED)); format_temp_and_idle(bed_str, getActualTemp_celsius(BED));
@ -193,16 +189,13 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
format_temp_and_temp(e0_str, getActualTemp_celsius(H0), getTargetTemp_celsius(H0)); format_temp_and_temp(e0_str, getActualTemp_celsius(H0), getTargetTemp_celsius(H0));
#if EXTRUDERS == 2 #if HAS_MULTI_EXTRUDER
if (isHeaterIdle(H1)) if (isHeaterIdle(H1))
format_temp_and_idle(e1_str, getActualTemp_celsius(H1)); format_temp_and_idle(e1_str, getActualTemp_celsius(H1));
else else
format_temp_and_temp(e1_str, getActualTemp_celsius(H1), getTargetTemp_celsius(H1)); format_temp_and_temp(e1_str, getActualTemp_celsius(H1), getTargetTemp_celsius(H1));
#else #else
strcpy_P( strcpy_P(e1_str, PSTR("-"));
e1_str,
PSTR("-")
);
#endif #endif
cmd.tag(5) cmd.tag(5)

View File

@ -38,7 +38,7 @@ using namespace ExtUI;
void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
CommandProcessor cmd; CommandProcessor cmd;
for(uint8_t i = 0; i < 100; i++) { for (uint8_t i = 0; i < 100; i++) {
cmd.cmd(BEGIN(POINTS)) cmd.cmd(BEGIN(POINTS))
.cmd(POINT_SIZE(20*16)) .cmd(POINT_SIZE(20*16))
.cmd(COLOR_RGB(random(0xFFFFFF))) .cmd(COLOR_RGB(random(0xFFFFFF)))
@ -111,7 +111,7 @@ void StressTestScreen::recursiveLockup() {
void StressTestScreen::iterativeLockup() { void StressTestScreen::iterativeLockup() {
screen_data.StressTestScreen.message = PSTR("Test 3: Printer will restart."); screen_data.StressTestScreen.message = PSTR("Test 3: Printer will restart.");
for(;;) current_screen.onRefresh(); for (;;) current_screen.onRefresh();
} }
void StressTestScreen::onIdle() { void StressTestScreen::onIdle() {

View File

@ -75,7 +75,7 @@ void lv_draw_about(void) {
LV_IMG_DECLARE(bmp_pic); LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/ // Create an Image button
buttonBack = lv_imgbtn_create(scr, NULL); buttonBack = lv_imgbtn_create(scr, NULL);
#if 1 #if 1
@ -88,8 +88,8 @@ void lv_draw_about(void) {
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF); lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
/*Create a label on the Image button*/
// Create a label on the image button
label_Back = lv_label_create(buttonBack, NULL); label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) { if (gCfgItems.multiple_language != 0) {

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_about(void); extern void lv_draw_about(void);
@ -30,5 +30,5 @@ extern void lv_clear_about();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_acceleration_settings(void); extern void lv_draw_acceleration_settings(void);
extern void lv_clear_acceleration_settings(); extern void lv_clear_acceleration_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_advance_settings(void); extern void lv_draw_advance_settings(void);
extern void lv_clear_advance_settings(); extern void lv_clear_advance_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -73,7 +73,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
#if HAS_MULTI_EXTRUDER #if HAS_MULTI_EXTRUDER
planner.flow_percentage[1] = planner.flow_percentage[0]; planner.flow_percentage[1] = planner.flow_percentage[0];
planner.refresh_e_factor(1); planner.refresh_e_factor(1);
} #endif
} }
disp_print_speed(); disp_print_speed();
} }
@ -98,10 +98,10 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
//planner.flow_percentage[1] = planner.flow_percentage[0]; //planner.flow_percentage[1] = planner.flow_percentage[0];
//planner.e_factor[1]= planner.flow_percentage[1] * 0.01; //planner.e_factor[1]= planner.flow_percentage[1] * 0.01;
planner.refresh_e_factor(0); planner.refresh_e_factor(0);
if (EXTRUDERS == 2) { #if HAS_MULTI_EXTRUDER
planner.flow_percentage[1] = planner.flow_percentage[0]; planner.flow_percentage[1] = planner.flow_percentage[0];
planner.refresh_e_factor(1); planner.refresh_e_factor(1);
} #endif
} }
disp_print_speed(); disp_print_speed();
} }
@ -177,7 +177,7 @@ void lv_draw_change_speed(void) {
LV_IMG_DECLARE(bmp_pic); LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/ // Create an Image button
buttonAdd = lv_imgbtn_create(scr, NULL); buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL); buttonDec = lv_imgbtn_create(scr, NULL);
buttonMov = lv_imgbtn_create(scr, NULL); buttonMov = lv_imgbtn_create(scr, NULL);
@ -228,7 +228,7 @@ void lv_draw_change_speed(void) {
lv_obj_set_pos(buttonStep, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonStep, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/ // Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF); lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF); lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonMov, LV_LAYOUT_OFF); lv_btn_set_layout(buttonMov, LV_LAYOUT_OFF);
@ -236,12 +236,12 @@ void lv_draw_change_speed(void) {
lv_btn_set_layout(buttonStep, LV_LAYOUT_OFF); lv_btn_set_layout(buttonStep, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF); lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL); lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL); lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
labelMov = lv_label_create(buttonMov, NULL); labelMov = lv_label_create(buttonMov, NULL);
labelExt = lv_label_create(buttonExt, NULL); labelExt = lv_label_create(buttonExt, NULL);
labelStep = lv_label_create(buttonStep, NULL); labelStep = lv_label_create(buttonStep, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL); lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) { if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, speed_menu.add); lv_label_set_text(labelAdd, speed_menu.add);
@ -286,7 +286,7 @@ void disp_speed_step() {
} }
void disp_print_speed() { void disp_print_speed() {
char buf[30] = {0}; char buf[30] = { 0 };
public_buf_l[0] = '\0'; public_buf_l[0] = '\0';

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
#define MIN_EXT_SPEED_PERCENT 10 #define MIN_EXT_SPEED_PERCENT 10
@ -36,5 +36,5 @@ extern void disp_speed_type();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
#define DIALOG_TYPE_STOP 0 #define DIALOG_TYPE_STOP 0
@ -79,5 +79,5 @@ extern void lv_clear_dialog();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_eeprom_settings(void); extern void lv_draw_eeprom_settings(void);
extern void lv_clear_eeprom_settings(); extern void lv_clear_eeprom_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
#ifndef PGM_P #ifndef PGM_P
@ -34,5 +34,5 @@ extern void lv_clear_error_message();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -100,9 +100,9 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
queue.inject_P(PSTR("T0")); queue.inject_P(PSTR("T0"));
} }
} }
else { else
uiCfg.curSprayerChoose = 0; uiCfg.curSprayerChoose = 0;
}
extructAmount = 0; extructAmount = 0;
disp_hotend_temp(); disp_hotend_temp();
disp_ext_type(); disp_ext_type();
@ -149,7 +149,6 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
} }
} }
void lv_draw_extrusion(void) { void lv_draw_extrusion(void) {
lv_obj_t *buttonAdd, *buttonDec, *buttonBack; lv_obj_t *buttonAdd, *buttonDec, *buttonBack;
@ -174,7 +173,7 @@ void lv_draw_extrusion(void) {
LV_IMG_DECLARE(bmp_pic); LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/ // Create image buttons
buttonAdd = lv_imgbtn_create(scr, NULL); buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL); buttonDec = lv_imgbtn_create(scr, NULL);
buttoType = lv_imgbtn_create(scr, NULL); buttoType = lv_imgbtn_create(scr, NULL);
@ -224,7 +223,7 @@ void lv_draw_extrusion(void) {
lv_obj_set_pos(buttonSpeed, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonSpeed, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/ // Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF); lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF); lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttoType, LV_LAYOUT_OFF); lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
@ -232,12 +231,12 @@ void lv_draw_extrusion(void) {
lv_btn_set_layout(buttonSpeed, LV_LAYOUT_OFF); lv_btn_set_layout(buttonSpeed, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF); lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL); lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL); lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
labelType = lv_label_create(buttoType, NULL); labelType = lv_label_create(buttoType, NULL);
labelStep = lv_label_create(buttonStep, NULL); labelStep = lv_label_create(buttonStep, NULL);
labelSpeed = lv_label_create(buttonSpeed, NULL); labelSpeed = lv_label_create(buttonSpeed, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL); lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) { if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, extrude_menu.in); lv_label_set_text(labelAdd, extrude_menu.in);

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_extrusion(void); extern void lv_draw_extrusion(void);
@ -35,5 +35,5 @@ extern void disp_extru_amount();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -140,7 +140,7 @@ void lv_draw_fan(void) {
LV_IMG_DECLARE(bmp_pic); LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/ // Create an Image button
buttonAdd = lv_imgbtn_create(scr, NULL); buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL); buttonDec = lv_imgbtn_create(scr, NULL);
buttonHigh = lv_imgbtn_create(scr, NULL); buttonHigh = lv_imgbtn_create(scr, NULL);
@ -154,6 +154,7 @@ void lv_draw_fan(void) {
lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_PR, &tft_style_label_pre); lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_REL, &tft_style_label_rel); lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_REL, &tft_style_label_rel);
lv_obj_clear_protect(buttonAdd, LV_PROTECT_FOLLOW); lv_obj_clear_protect(buttonAdd, LV_PROTECT_FOLLOW);
#if 1 #if 1
lv_obj_set_event_cb_mks(buttonDec, event_handler, ID_F_DEC, "bmp_Dec.bin", 0); lv_obj_set_event_cb_mks(buttonDec, event_handler, ID_F_DEC, "bmp_Dec.bin", 0);
lv_imgbtn_set_src(buttonDec, LV_BTN_STATE_REL, &bmp_pic); lv_imgbtn_set_src(buttonDec, LV_BTN_STATE_REL, &bmp_pic);
@ -184,6 +185,7 @@ void lv_draw_fan(void) {
lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic); lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre); lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel); lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
#endif #endif
lv_obj_set_pos(buttonAdd, INTERVAL_V, titleHeight); lv_obj_set_pos(buttonAdd, INTERVAL_V, titleHeight);
@ -193,7 +195,7 @@ void lv_draw_fan(void) {
lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/ // Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF); lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF); lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonHigh, LV_LAYOUT_OFF); lv_btn_set_layout(buttonHigh, LV_LAYOUT_OFF);
@ -201,13 +203,12 @@ void lv_draw_fan(void) {
lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF); lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF); lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL); lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL); lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
lv_obj_t * labelHigh = lv_label_create(buttonHigh, NULL); lv_obj_t *labelHigh = lv_label_create(buttonHigh, NULL);
lv_obj_t * labelMid = lv_label_create(buttonMid, NULL); lv_obj_t *labelMid = lv_label_create(buttonMid, NULL);
lv_obj_t * labelOff = lv_label_create(buttonOff, NULL); lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL); lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) { if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, fan_menu.add); lv_label_set_text(labelAdd, fan_menu.add);

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_fan(void); extern void lv_draw_fan(void);
@ -31,5 +31,5 @@ extern void disp_fan_value();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -96,7 +96,6 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
lv_draw_tool(); lv_draw_tool();
} }
break; break;
} }
} }

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_home(void); extern void lv_draw_home(void);
@ -30,5 +30,5 @@ extern void lv_clear_home();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_jerk_settings(void); extern void lv_draw_jerk_settings(void);
extern void lv_clear_jerk_settings(); extern void lv_clear_jerk_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -246,7 +246,7 @@ void lv_draw_language(void) {
LV_IMG_DECLARE(bmp_pic); LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/ // Create image buttons
buttonCN = lv_imgbtn_create(scr, NULL); buttonCN = lv_imgbtn_create(scr, NULL);
buttonT_CN = lv_imgbtn_create(scr, NULL); buttonT_CN = lv_imgbtn_create(scr, NULL);
buttonEN = lv_imgbtn_create(scr, NULL); buttonEN = lv_imgbtn_create(scr, NULL);
@ -304,6 +304,7 @@ void lv_draw_language(void) {
lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic); lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre); lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel); lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
#endif // if 1 #endif // if 1
lv_obj_set_pos(buttonCN, INTERVAL_V, titleHeight); lv_obj_set_pos(buttonCN, INTERVAL_V, titleHeight);
@ -315,7 +316,7 @@ void lv_draw_language(void) {
lv_obj_set_pos(buttonIT, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonIT, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/ // Create labels on the image buttons
lv_btn_set_layout(buttonCN, LV_LAYOUT_OFF); lv_btn_set_layout(buttonCN, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonT_CN, LV_LAYOUT_OFF); lv_btn_set_layout(buttonT_CN, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonEN, LV_LAYOUT_OFF); lv_btn_set_layout(buttonEN, LV_LAYOUT_OFF);
@ -325,14 +326,14 @@ void lv_draw_language(void) {
lv_btn_set_layout(buttonIT, LV_LAYOUT_OFF); lv_btn_set_layout(buttonIT, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF); lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * label_CN = lv_label_create(buttonCN, NULL); lv_obj_t *label_CN = lv_label_create(buttonCN, NULL);
lv_obj_t * label_T_CN = lv_label_create(buttonT_CN, NULL); lv_obj_t *label_T_CN = lv_label_create(buttonT_CN, NULL);
lv_obj_t * label_EN = lv_label_create(buttonEN, NULL); lv_obj_t *label_EN = lv_label_create(buttonEN, NULL);
lv_obj_t * label_RU = lv_label_create(buttonRU, NULL); lv_obj_t *label_RU = lv_label_create(buttonRU, NULL);
lv_obj_t * label_ES = lv_label_create(buttonES, NULL); lv_obj_t *label_ES = lv_label_create(buttonES, NULL);
lv_obj_t * label_FR = lv_label_create(buttonFR, NULL); lv_obj_t *label_FR = lv_label_create(buttonFR, NULL);
lv_obj_t * label_IT = lv_label_create(buttonIT, NULL); lv_obj_t *label_IT = lv_label_create(buttonIT, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL); lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
disp_language(gCfgItems.language, SELECTED); disp_language(gCfgItems.language, SELECTED);

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_language(void); extern void lv_draw_language(void);
@ -30,5 +30,5 @@ extern void lv_clear_language();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_machine_para(void); extern void lv_draw_machine_para(void);
extern void lv_clear_machine_para(); extern void lv_clear_machine_para();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_machine_settings(void); extern void lv_draw_machine_settings(void);
extern void lv_clear_machine_settings(); extern void lv_clear_machine_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -187,7 +187,7 @@ void lv_draw_manualLevel(void) {
LV_IMG_DECLARE(bmp_pic); LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/ // Create an Image button
buttonPoint1 = lv_imgbtn_create(scr, NULL); buttonPoint1 = lv_imgbtn_create(scr, NULL);
buttonPoint2 = lv_imgbtn_create(scr, NULL); buttonPoint2 = lv_imgbtn_create(scr, NULL);
buttonPoint3 = lv_imgbtn_create(scr, NULL); buttonPoint3 = lv_imgbtn_create(scr, NULL);
@ -240,7 +240,7 @@ void lv_draw_manualLevel(void) {
lv_obj_set_pos(buttonPoint5, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonPoint5, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/ // Create labels on the image buttons
lv_btn_set_layout(buttonPoint1, LV_LAYOUT_OFF); lv_btn_set_layout(buttonPoint1, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonPoint2, LV_LAYOUT_OFF); lv_btn_set_layout(buttonPoint2, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonPoint3, LV_LAYOUT_OFF); lv_btn_set_layout(buttonPoint3, LV_LAYOUT_OFF);
@ -248,12 +248,12 @@ void lv_draw_manualLevel(void) {
lv_btn_set_layout(buttonPoint5, LV_LAYOUT_OFF); lv_btn_set_layout(buttonPoint5, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF); lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * label_Point1 = lv_label_create(buttonPoint1, NULL); lv_obj_t *label_Point1 = lv_label_create(buttonPoint1, NULL);
lv_obj_t * label_Point2 = lv_label_create(buttonPoint2, NULL); lv_obj_t *label_Point2 = lv_label_create(buttonPoint2, NULL);
lv_obj_t * label_Point3 = lv_label_create(buttonPoint3, NULL); lv_obj_t *label_Point3 = lv_label_create(buttonPoint3, NULL);
lv_obj_t * label_Point4 = lv_label_create(buttonPoint4, NULL); lv_obj_t *label_Point4 = lv_label_create(buttonPoint4, NULL);
lv_obj_t * label_Point5 = lv_label_create(buttonPoint5, NULL); lv_obj_t *label_Point5 = lv_label_create(buttonPoint5, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL); lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) { if (gCfgItems.multiple_language != 0) {
lv_label_set_text(label_Point1, leveling_menu.position1); lv_label_set_text(label_Point1, leveling_menu.position1);

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_manualLevel(void); extern void lv_draw_manualLevel(void);
@ -30,5 +30,5 @@ extern void lv_clear_manualLevel();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_max_feedrate_settings(void); extern void lv_draw_max_feedrate_settings(void);
extern void lv_clear_max_feedrate_settings(); extern void lv_clear_max_feedrate_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_motor_settings(void); extern void lv_draw_motor_settings(void);
extern void lv_clear_motor_settings(); extern void lv_clear_motor_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -34,7 +34,7 @@
static lv_obj_t * scr; static lv_obj_t * scr;
static lv_obj_t * labelV, *buttonV; static lv_obj_t *labelV, *buttonV;
#define ID_M_X_P 1 #define ID_M_X_P 1
#define ID_M_X_N 2 #define ID_M_X_N 2
@ -181,7 +181,7 @@ void lv_draw_move_motor(void) {
LV_IMG_DECLARE(bmp_pic); LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/ // Create an Image button
buttonXI = lv_imgbtn_create(scr, NULL); buttonXI = lv_imgbtn_create(scr, NULL);
buttonXD = lv_imgbtn_create(scr, NULL); buttonXD = lv_imgbtn_create(scr, NULL);
buttonYI = lv_imgbtn_create(scr, NULL); buttonYI = lv_imgbtn_create(scr, NULL);
@ -249,7 +249,7 @@ void lv_draw_move_motor(void) {
lv_obj_set_pos(buttonZD, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonZD, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/ // Create labels on the image buttons
lv_btn_set_layout(buttonXI, LV_LAYOUT_OFF); lv_btn_set_layout(buttonXI, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonXD, LV_LAYOUT_OFF); lv_btn_set_layout(buttonXD, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonYI, LV_LAYOUT_OFF); lv_btn_set_layout(buttonYI, LV_LAYOUT_OFF);
@ -259,14 +259,14 @@ void lv_draw_move_motor(void) {
lv_btn_set_layout(buttonV, LV_LAYOUT_OFF); lv_btn_set_layout(buttonV, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF); lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelXI = lv_label_create(buttonXI, NULL); lv_obj_t *labelXI = lv_label_create(buttonXI, NULL);
lv_obj_t * labelXD = lv_label_create(buttonXD, NULL); lv_obj_t *labelXD = lv_label_create(buttonXD, NULL);
lv_obj_t * labelYI = lv_label_create(buttonYI, NULL); lv_obj_t *labelYI = lv_label_create(buttonYI, NULL);
lv_obj_t * labelYD = lv_label_create(buttonYD, NULL); lv_obj_t *labelYD = lv_label_create(buttonYD, NULL);
lv_obj_t * labelZI = lv_label_create(buttonZI, NULL); lv_obj_t *labelZI = lv_label_create(buttonZI, NULL);
lv_obj_t * labelZD = lv_label_create(buttonZD, NULL); lv_obj_t *labelZD = lv_label_create(buttonZD, NULL);
labelV = lv_label_create(buttonV, NULL); labelV = lv_label_create(buttonV, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL); lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) { if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelXI, move_menu.x_add); lv_label_set_text(labelXI, move_menu.x_add);

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_move_motor(void); extern void lv_draw_move_motor(void);
@ -31,5 +31,5 @@ extern void disp_move_dist();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -34,8 +34,9 @@
#include "../../../../MarlinCore.h" #include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h" #include "../../../../module/temperature.h"
#include "../../../../gcode/queue.h" #include "../../../../gcode/queue.h"
#if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../../../feature/powerloss.h" #include "../../../../feature/powerloss.h"
#endif #endif
#include "../../../../gcode/gcode.h" #include "../../../../gcode/gcode.h"
@ -253,15 +254,12 @@ static void set_value_confirm() {
switch (value) { switch (value) {
case PrintAcceleration: case PrintAcceleration:
planner.settings.acceleration = atof(key_value); planner.settings.acceleration = atof(key_value);
break; break;
case RetractAcceleration: case RetractAcceleration:
planner.settings.retract_acceleration = atof(key_value); planner.settings.retract_acceleration = atof(key_value);
break; break;
case TravelAcceleration: case TravelAcceleration:
planner.settings.travel_acceleration = atof(key_value); planner.settings.travel_acceleration = atof(key_value);
break; break;
case XAcceleration: case XAcceleration:
planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value); planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value);
@ -293,7 +291,6 @@ static void set_value_confirm() {
case E1MaxFeedRate: case E1MaxFeedRate:
planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value); planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value);
break; break;
case XJerk: case XJerk:
#if HAS_CLASSIC_JERK #if HAS_CLASSIC_JERK
planner.max_jerk[X_AXIS] = atof(key_value); planner.max_jerk[X_AXIS] = atof(key_value);
@ -314,7 +311,6 @@ static void set_value_confirm() {
planner.max_jerk[E_AXIS] = atof(key_value); planner.max_jerk[E_AXIS] = atof(key_value);
#endif #endif
break; break;
case Xstep: case Xstep:
planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value); planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value);
break; break;
@ -330,43 +326,36 @@ static void set_value_confirm() {
case E1step: case E1step:
planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value); planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value);
break; break;
case Xcurrent: case Xcurrent:
#if AXIS_IS_TMC(X) #if AXIS_IS_TMC(X)
current_mA = atoi(key_value); current_mA = atoi(key_value);
stepperX.rms_current(current_mA); stepperX.rms_current(current_mA);
#endif #endif
break; break;
case Ycurrent: case Ycurrent:
#if AXIS_IS_TMC(Y) #if AXIS_IS_TMC(Y)
current_mA = atoi(key_value); current_mA = atoi(key_value);
stepperY.rms_current(current_mA); stepperY.rms_current(current_mA);
#endif #endif
break; break;
case Zcurrent: case Zcurrent:
#if AXIS_IS_TMC(Z) #if AXIS_IS_TMC(Z)
current_mA = atoi(key_value); current_mA = atoi(key_value);
stepperZ.rms_current(current_mA); stepperZ.rms_current(current_mA);
#endif #endif
break; break;
case E0current: case E0current:
#if AXIS_IS_TMC(E0) #if AXIS_IS_TMC(E0)
current_mA = atoi(key_value); current_mA = atoi(key_value);
stepperE0.rms_current(current_mA); stepperE0.rms_current(current_mA);
#endif #endif
break; break;
case E1current: case E1current:
#if AXIS_IS_TMC(E1) #if AXIS_IS_TMC(E1)
current_mA = atoi(key_value); current_mA = atoi(key_value);
stepperE1.rms_current(current_mA); stepperE1.rms_current(current_mA);
#endif #endif
break; break;
break;
case pause_pos_x: case pause_pos_x:
gCfgItems.pausePosX = atof(key_value); gCfgItems.pausePosX = atof(key_value);
update_spi_flash(); update_spi_flash();

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_number_key(void); extern void lv_draw_number_key(void);
extern void lv_clear_number_key(); extern void lv_clear_number_key();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_operation(void); extern void lv_draw_operation(void);
@ -30,5 +30,5 @@ extern void lv_clear_operation();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_pause_message(const PauseMessage msg); extern void lv_draw_pause_message(const PauseMessage msg);
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_pause_position(void); extern void lv_draw_pause_position(void);
extern void lv_clear_pause_position(); extern void lv_clear_pause_position();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -267,7 +267,7 @@ void lv_draw_preHeat(void) {
lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/ // Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF); lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF); lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttoType, LV_LAYOUT_OFF); lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
@ -275,13 +275,12 @@ void lv_draw_preHeat(void) {
lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF); lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF); lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL); lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL); lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
labelType = lv_label_create(buttoType, NULL); labelType = lv_label_create(buttoType, NULL);
labelStep = lv_label_create(buttonStep, NULL); labelStep = lv_label_create(buttonStep, NULL);
lv_obj_t * labelOff = lv_label_create(buttonOff, NULL); lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL); lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) { if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, preheat_menu.add); lv_label_set_text(labelAdd, preheat_menu.add);
@ -306,7 +305,6 @@ void lv_draw_preHeat(void) {
} }
void disp_temp_type() { void disp_temp_type() {
if (uiCfg.curTempType == 0) { if (uiCfg.curTempType == 0) {
if (uiCfg.curSprayerChoose == 1) { if (uiCfg.curSprayerChoose == 1) {
lv_obj_set_event_cb_mks(buttoType, event_handler, ID_P_TYPE, "bmp_extru2.bin", 0); lv_obj_set_event_cb_mks(buttoType, event_handler, ID_P_TYPE, "bmp_extru2.bin", 0);
@ -331,7 +329,6 @@ void disp_temp_type() {
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
} }
} }
} }
void disp_desire_temp() { void disp_desire_temp() {

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_preHeat(void); extern void lv_draw_preHeat(void);
@ -33,5 +33,5 @@ extern void disp_desire_temp();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -305,6 +305,7 @@ void disp_gcode_icon(uint8_t file_num) {
lv_refr_now(lv_refr_get_disp_refreshing()); lv_refr_now(lv_refr_get_disp_refreshing());
// Create image buttons
buttonPageUp = lv_imgbtn_create(scr, NULL); buttonPageUp = lv_imgbtn_create(scr, NULL);
buttonPageDown = lv_imgbtn_create(scr, NULL); buttonPageDown = lv_imgbtn_create(scr, NULL);
buttonBack = lv_imgbtn_create(scr, NULL); buttonBack = lv_imgbtn_create(scr, NULL);
@ -334,8 +335,7 @@ void disp_gcode_icon(uint8_t file_num) {
lv_obj_set_pos(buttonPageDown, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL + INTERVAL_H); lv_obj_set_pos(buttonPageDown, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL + INTERVAL_H);
lv_obj_set_pos(buttonBack, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL * 2 + INTERVAL_H * 2); lv_obj_set_pos(buttonBack, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL * 2 + INTERVAL_H * 2);
/*Create a label on the Image button*/ // Create labels on the image buttons
lv_btn_set_layout(buttonPageUp, LV_LAYOUT_OFF); lv_btn_set_layout(buttonPageUp, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonPageDown, LV_LAYOUT_OFF); lv_btn_set_layout(buttonPageDown, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF); lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
typedef struct { typedef struct {
@ -61,5 +61,5 @@ extern void lv_clear_print_file();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
#define IDLE 0 #define IDLE 0
@ -48,5 +48,5 @@ extern void setProBarRate();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -159,7 +159,7 @@ void lv_draw_ready_print(void) {
//lv_obj_set_pos(title,TITLE_XPOS,TITLE_YPOS); //lv_obj_set_pos(title,TITLE_XPOS,TITLE_YPOS);
//lv_label_set_text(title, creat_title_text()); //lv_label_set_text(title, creat_title_text());
/*Create an Image button*/ // Create image buttons
//buttonPrint = lv_imgbtn_create(scr, NULL); //buttonPrint = lv_imgbtn_create(scr, NULL);
buttonTool = lv_imgbtn_create(scr, NULL); buttonTool = lv_imgbtn_create(scr, NULL);
//buttonSet = lv_imgbtn_create(scr, NULL); //buttonSet = lv_imgbtn_create(scr, NULL);
@ -196,14 +196,14 @@ void lv_draw_ready_print(void) {
//lv_obj_set_pos(buttonSet,BTN_X_PIXEL+SIMPLE_FIRST_PAGE_GRAP*2+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2); //lv_obj_set_pos(buttonSet,BTN_X_PIXEL+SIMPLE_FIRST_PAGE_GRAP*2+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
//lv_obj_set_pos(buttonPrint,BTN_X_PIXEL*2+SIMPLE_FIRST_PAGE_GRAP*3+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2); //lv_obj_set_pos(buttonPrint,BTN_X_PIXEL*2+SIMPLE_FIRST_PAGE_GRAP*3+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
/*Create a label on the Image button*/ // Create labels on the image buttons
//lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF); //lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
//lv_btn_set_layout(buttonSet, LV_LAYOUT_OFF); //lv_btn_set_layout(buttonSet, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonTool, LV_LAYOUT_OFF); lv_btn_set_layout(buttonTool, LV_LAYOUT_OFF);
//lv_obj_t * label_print = lv_label_create(buttonPrint, NULL); //lv_obj_t *label_print = lv_label_create(buttonPrint, NULL);
//lv_obj_t * label_set = lv_label_create(buttonSet, NULL); //lv_obj_t *label_set = lv_label_create(buttonSet, NULL);
lv_obj_t * label_tool = lv_label_create(buttonTool, NULL); lv_obj_t *label_tool = lv_label_create(buttonTool, NULL);
if (gCfgItems.multiple_language != 0) { if (gCfgItems.multiple_language != 0) {
//lv_label_set_text(label_print, main_menu.print); //lv_label_set_text(label_print, main_menu.print);
//lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET); //lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_ready_print(void); extern void lv_draw_ready_print(void);
@ -35,5 +35,5 @@ extern void lv_clear_ready_print();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_set(void); extern void lv_draw_set(void);
@ -30,5 +30,5 @@ extern void lv_clear_set();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_step_settings(void); extern void lv_draw_step_settings(void);
extern void lv_clear_step_settings(); extern void lv_clear_step_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -25,6 +25,7 @@
#include "lv_conf.h" #include "lv_conf.h"
#include "draw_ui.h" #include "draw_ui.h"
#include "../../../../MarlinCore.h" #include "../../../../MarlinCore.h"
#include "../../../../module/planner.h" #include "../../../../module/planner.h"
#include "../../../../module/stepper/indirection.h" #include "../../../../module/stepper/indirection.h"

View File

@ -22,13 +22,13 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_tmc_current_settings(void); extern void lv_draw_tmc_current_settings(void);
extern void lv_clear_tmc_current_settings(); extern void lv_clear_tmc_current_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,12 +22,12 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_tmc_step_mode_settings(void); extern void lv_draw_tmc_step_mode_settings(void);
extern void lv_clear_tmc_step_mode_settings(); extern void lv_clear_tmc_step_mode_settings();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -140,7 +140,7 @@ void lv_draw_tool(void) {
LV_IMG_DECLARE(bmp_pic); LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/ // Create image buttons
buttonPreHeat = lv_imgbtn_create(scr, NULL); buttonPreHeat = lv_imgbtn_create(scr, NULL);
buttonExtrusion = lv_imgbtn_create(scr, NULL); buttonExtrusion = lv_imgbtn_create(scr, NULL);
buttonMove = lv_imgbtn_create(scr, NULL); buttonMove = lv_imgbtn_create(scr, NULL);
@ -210,7 +210,7 @@ void lv_draw_tool(void) {
//lv_obj_set_pos(buttonMore,BTN_X_PIXEL*2+INTERVAL_V*3, BTN_Y_PIXEL+INTERVAL_H+titleHeight); //lv_obj_set_pos(buttonMore,BTN_X_PIXEL*2+INTERVAL_V*3, BTN_Y_PIXEL+INTERVAL_H+titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight); lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/ // Create labels on the image buttons
lv_btn_set_layout(buttonPreHeat, LV_LAYOUT_OFF); lv_btn_set_layout(buttonPreHeat, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonExtrusion, LV_LAYOUT_OFF); lv_btn_set_layout(buttonExtrusion, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonMove, LV_LAYOUT_OFF); lv_btn_set_layout(buttonMove, LV_LAYOUT_OFF);

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
extern void lv_draw_tool(void); extern void lv_draw_tool(void);
@ -30,5 +30,5 @@ extern void lv_clear_tool();
//extern void disp_temp_ready_print(); //extern void disp_temp_ready_print();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -328,5 +328,5 @@ extern void LV_TASK_HANDLER();
extern void lv_ex_line(lv_obj_t * line, lv_point_t *points); extern void lv_ex_line(lv_obj_t * line, lv_point_t *points);
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -124,7 +124,7 @@
#define VAR_INF_ADDR 0x000000 #define VAR_INF_ADDR 0x000000
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
union union32 { union union32 {
@ -157,5 +157,5 @@ extern void default_view_Read(uint8_t *default_view_Rbuff, uint32_t default_view
extern void flash_view_Read(uint8_t *flash_view_Rbuff, uint32_t flash_view_Readsize); extern void flash_view_Read(uint8_t *flash_view_Rbuff, uint32_t flash_view_Readsize);
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -51,6 +51,7 @@ void printer_state_polling() {
if (uiCfg.waitEndMoves > 20) { if (uiCfg.waitEndMoves > 20) {
uiCfg.waitEndMoves = 0; uiCfg.waitEndMoves = 0;
planner.synchronize(); planner.synchronize();
gcode.process_subcommands_now_P(PSTR("M25")); gcode.process_subcommands_now_P(PSTR("M25"));
if (gCfgItems.pausePosZ != (float)-1) { if (gCfgItems.pausePosZ != (float)-1) {
gcode.process_subcommands_now_P(PSTR("G91")); gcode.process_subcommands_now_P(PSTR("G91"));

View File

@ -22,7 +22,7 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
#define MIN_FILE_PRINTED 100 //5000 #define MIN_FILE_PRINTED 100 //5000
@ -32,5 +32,5 @@ extern void filament_pin_setup();
extern void filament_check(); extern void filament_check();
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -22,9 +22,9 @@
#pragma once #pragma once
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* C-declarations for C++ */ extern "C" { /* C-declarations for C++ */
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} /* C-declarations for C++ */ } /* C-declarations for C++ */
#endif #endif

View File

@ -498,10 +498,10 @@
#include "stm32f1/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE #include "stm32f1/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_PRO_VB) #elif MB(GTM32_PRO_VB)
#include "stm32f1/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE #include "stm32f1/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_MINI_A30)
#include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_MINI) #elif MB(GTM32_MINI)
#include "stm32f1/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE #include "stm32f1/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_MINI_A30)
#include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_REV_B) #elif MB(GTM32_REV_B)
#include "stm32f1/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE #include "stm32f1/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE
#elif MB(MORPHEUS) #elif MB(MORPHEUS)
@ -518,6 +518,14 @@
#include "stm32f1/pins_MKS_ROBIN_NANO_V2.h" // STM32F1 env:mks_robin_nano35 #include "stm32f1/pins_MKS_ROBIN_NANO_V2.h" // STM32F1 env:mks_robin_nano35
#elif MB(MKS_ROBIN_LITE) #elif MB(MKS_ROBIN_LITE)
#include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite #include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
#elif MB(MKS_ROBIN_LITE3)
#include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
#elif MB(MKS_ROBIN_PRO)
#include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
#elif MB(MKS_ROBIN_E3)
#include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3
#elif MB(MKS_ROBIN_E3D)
#include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3
#elif MB(BTT_SKR_MINI_V1_1) #elif MB(BTT_SKR_MINI_V1_1)
#include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(BTT_SKR_MINI_E3_V1_0) #elif MB(BTT_SKR_MINI_E3_V1_0)
@ -538,14 +546,6 @@
#include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc #include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc
#elif MB(LONGER3D_LK) #elif MB(LONGER3D_LK)
#include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer #include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer
#elif MB(MKS_ROBIN_LITE3)
#include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
#elif MB(MKS_ROBIN_PRO)
#include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
#elif MB(MKS_ROBIN_E3D)
#include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3
#elif MB(MKS_ROBIN_E3)
#include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3
#elif MB(CCROBOT_MEEB_3DP) #elif MB(CCROBOT_MEEB_3DP)
#include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_meeb #include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_meeb
#elif MB(CHITU3D_V5) #elif MB(CHITU3D_V5)