Skip to content

Commit

Permalink
1.Fixed an abnormal prompt bug that triggered material return detecti…
Browse files Browse the repository at this point in the history
…on during material return

2.Add a screen rest function. If the machine is not operated on a non printing interface, it will enter a screen stop state after 5 minutes.
3.Add a separate Z offset value function button.You can adjust the Z offset value before printing
4.Optimize the file printing logic, now printing files through USB will cache them to disk space on the machine.
5.Optimize the leveling logic, now the z-offset value will be saved instead of reset
  • Loading branch information
Rainboooom committed Aug 5, 2023
1 parent 349198d commit c51954a
Show file tree
Hide file tree
Showing 10 changed files with 479 additions and 97 deletions.
3 changes: 3 additions & 0 deletions include/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ void check_filament_type();

void refresh_page_preview_pop();

//4.3.6 CLL 修复UI按下效果
void refresh_page_open_level();

//4.3.2 CLL 修复无法读取文件名中有空格文件
std::string replaceCharacters(const std::string& path, const std::string& searchChars, const std::string& replacement);

Expand Down
11 changes: 8 additions & 3 deletions include/ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@
#define TJC_PAGE_LEVEL_MODE_AUTO_LEVEL 0x09
#define TJC_PAGE_LEVEL_MODE_MANUAL_LEVEL 0x0b
#define TJC_PAGE_LEVEL_MODE_SET_ZOFFSET 0x0a
#define TJC_PAGE_LEVEL_MODE_CALIBRATION 0x0a
#define TJC_PAGE_LEVEL_MODE_SYNTONY_MOVE 0x0c
#define TJC_PAGE_LEVEL_MODE_PID 0x0d

Expand Down Expand Up @@ -466,8 +465,8 @@

#define TJC_PAGE_SET_ZOFFSET_2 54
#define TJC_PAGE_SET_ZOFFSET_2_001 0x02
#define TJC_PAGE_SET_ZOFFSET_2_0025 0x03
#define TJC_PAGE_SET_ZOFFSET_2_005 0x04
#define TJC_PAGE_SET_ZOFFSET_2_005 0x03
#define TJC_PAGE_SET_ZOFFSET_2_01 0x04
#define TJC_PAGE_SET_ZOFFSET_2_1 0x09
#define TJC_PAGE_SET_ZOFFSET_2_UP 0x05
#define TJC_PAGE_SET_ZOFFSET_2_DOWN 0x06
Expand Down Expand Up @@ -663,6 +662,12 @@
//4.3.4 CLL 耗材确认弹窗新增不再提示按钮
#define TJC_PAGE_PREVIEW_POP_NO_POP 0x01

//4.3.6 CLL 新增息屏功能
#define TJC_PAGE_SCREEN_SLEEP 116
#define TJC_PAGE_SCREEN_SLEEP_ENTER 0x00
#define TJC_PAGE_SCREEN_SLEEP_EXIT 0x01


#endif


Expand Down
11 changes: 6 additions & 5 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int main(int argc, char** argv) {
find_screen_tft_file = false;
MKSLOG_BLUE("没有找到tft升级文件");
}

/*
if (set_GPIO1_C5_high() == 0) {
MKSLOG("GPIO1_C5拉高成功");
} else {
Expand All @@ -80,18 +80,19 @@ int main(int argc, char** argv) {
} else {
MKSLOG("GPIO1_C3初始化失败");
}
*/

if (find_screen_tft_file == true) {
system("/root/uart; mv /root/800_480.tft /root/800_480.tft.bak");
find_screen_tft_file = false;
}

pthread_t monitor_thread;
pthread_t monitor_C3_thread;
// pthread_t monitor_thread;
// pthread_t monitor_C3_thread;
pthread_t wpa_recv_thread;

pthread_create(&monitor_thread, NULL, monitor_GPIO1_B2, NULL);
pthread_create(&monitor_C3_thread, NULL, monitor_GPIO1_C3, NULL);
// pthread_create(&monitor_thread, NULL, monitor_GPIO1_B2, NULL);
// pthread_create(&monitor_C3_thread, NULL, monitor_GPIO1_C3, NULL);
pthread_create(&wpa_recv_thread, NULL, mks_wifi_hdlevent_thread, NULL);

bool done = false;
Expand Down
Loading

0 comments on commit c51954a

Please sign in to comment.