diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT24_V1.1.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT24_V1.1.25.1.bin deleted file mode 100644 index 1bb026d056..0000000000 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT24_V1.1.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT24_V1.1.25.2.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT24_V1.1.25.2.bin new file mode 100644 index 0000000000..7c9810cc78 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT24_V1.1.25.2.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT28_V3.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT28_V3.0.25.1.bin deleted file mode 100644 index ce1f361baa..0000000000 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT28_V3.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT28_V3.0.25.2.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT28_V3.0.25.2.bin new file mode 100644 index 0000000000..6c470b3dfb Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT28_V3.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT35_V3.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT35_V3.0.25.1.bin deleted file mode 100644 index 64ddea1751..0000000000 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT35_V3.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT35_V3.0.25.2.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT35_V3.0.25.2.bin new file mode 100644 index 0000000000..17bb61616e Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/BIGTREE_TFT35_V3.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT28_V1.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT28_V1.0.25.1.bin deleted file mode 100644 index a23b74ed6c..0000000000 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT28_V1.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT28_V1.0.25.2.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT28_V1.0.25.2.bin new file mode 100644 index 0000000000..6ae23be815 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT28_V1.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_APP1_V2.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_APP1_V2.0.25.1.bin deleted file mode 100644 index 83b5ed9b4a..0000000000 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_APP1_V2.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_APP1_V2.0.25.2.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_APP1_V2.0.25.2.bin new file mode 100644 index 0000000000..2045947ec3 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_APP1_V2.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.0.25.1.bin deleted file mode 100644 index 93304be8fa..0000000000 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.0.25.2.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.0.25.2.bin new file mode 100644 index 0000000000..60a27002d3 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.1.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.1.25.1.bin deleted file mode 100644 index 04fb9bc92f..0000000000 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.1.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.1.25.2.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.1.25.2.bin new file mode 100644 index 0000000000..3e1190c3fe Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.1.25.2.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.2.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.2.25.1.bin deleted file mode 100644 index d2a9ddd27c..0000000000 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.2.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.2.25.2.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.2.25.2.bin new file mode 100644 index 0000000000..5c32b83e81 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/BIQU_TFT35_V1.2.25.2.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT24_V1.1.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT24_V1.1.25.1.bin new file mode 100644 index 0000000000..6618261c42 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT24_V1.1.25.1.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT28_V3.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT28_V3.0.25.1.bin new file mode 100644 index 0000000000..03348e0f1a Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT28_V3.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT35_V3.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT35_V3.0.25.1.bin new file mode 100644 index 0000000000..337fce4c5f Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT35_V3.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT28_V1.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT28_V1.0.25.1.bin new file mode 100644 index 0000000000..a3f1e5d9f9 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT28_V1.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_APP1_V2.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_APP1_V2.0.25.1.bin new file mode 100644 index 0000000000..59c19553de Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_APP1_V2.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.0.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.0.25.1.bin new file mode 100644 index 0000000000..2a04260b76 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.1.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.1.25.1.bin new file mode 100644 index 0000000000..586cb02567 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.1.25.1.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.2.25.1.bin b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.2.25.1.bin new file mode 100644 index 0000000000..188318b1cf Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.2.25.1.bin differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/Logo.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/Logo.bmp index 073e8bc4ad..884f17833a 100644 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/Logo.bmp and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/Logo.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/parametersetting.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/parametersetting.bmp index 974311f48b..7e7175c240 100644 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/parametersetting.bmp and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/parametersetting.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_bed.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_bed.bmp new file mode 100644 index 0000000000..be711b70db Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_bed.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_fan.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_fan.bmp new file mode 100644 index 0000000000..83b106a3db Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_fan.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_flow.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_flow.bmp new file mode 100644 index 0000000000..95dada6fe8 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_flow.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_layer.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_layer.bmp new file mode 100644 index 0000000000..5f1a4f8b64 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_layer.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_nozzle.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_nozzle.bmp new file mode 100644 index 0000000000..90d242b50a Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_nozzle.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_speed.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_speed.bmp new file mode 100644 index 0000000000..4c7f961e7a Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_speed.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_timer.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_timer.bmp new file mode 100644 index 0000000000..5c3a331811 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT24/bmp/printing_timer.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/Logo.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/Logo.bmp index 073e8bc4ad..884f17833a 100644 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/Logo.bmp and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/Logo.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/parametersetting.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/parametersetting.bmp index 48bae0f941..7e7175c240 100644 Binary files a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/parametersetting.bmp and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/parametersetting.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_bed.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_bed.bmp new file mode 100644 index 0000000000..be711b70db Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_bed.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_fan.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_fan.bmp new file mode 100644 index 0000000000..83b106a3db Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_fan.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_flow.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_flow.bmp new file mode 100644 index 0000000000..95dada6fe8 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_flow.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_layer.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_layer.bmp new file mode 100644 index 0000000000..5f1a4f8b64 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_layer.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_nozzle.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_nozzle.bmp new file mode 100644 index 0000000000..90d242b50a Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_nozzle.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_speed.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_speed.bmp new file mode 100644 index 0000000000..4c7f961e7a Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_speed.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_timer.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_timer.bmp new file mode 100644 index 0000000000..5c3a331811 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT28/bmp/printing_timer.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_bed.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_bed.bmp new file mode 100644 index 0000000000..2cc8789125 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_bed.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_fan.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_fan.bmp new file mode 100644 index 0000000000..a3920a2aa1 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_fan.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_flow.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_flow.bmp new file mode 100644 index 0000000000..aefaf9e2e6 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_flow.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_layer.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_layer.bmp new file mode 100644 index 0000000000..9310783673 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_layer.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_nozzle.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_nozzle.bmp new file mode 100644 index 0000000000..e285fdd521 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_nozzle.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_speed.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_speed.bmp new file mode 100644 index 0000000000..baa4fc70f1 Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_speed.bmp differ diff --git a/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_timer.bmp b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_timer.bmp new file mode 100644 index 0000000000..b1b8f9f9bf Binary files /dev/null and b/Copy to SD Card root directory to update - Unified Menu Material theme/TFT35/bmp/printing_timer.bmp differ diff --git a/Copy to SD Card root directory to update/BIGTREE_TFT24_V1.1.25.1.bin b/Copy to SD Card root directory to update/BIGTREE_TFT24_V1.1.25.1.bin deleted file mode 100644 index 47d52a5f48..0000000000 Binary files a/Copy to SD Card root directory to update/BIGTREE_TFT24_V1.1.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update/BIGTREE_TFT24_V1.1.25.2.bin b/Copy to SD Card root directory to update/BIGTREE_TFT24_V1.1.25.2.bin new file mode 100644 index 0000000000..96412b9934 Binary files /dev/null and b/Copy to SD Card root directory to update/BIGTREE_TFT24_V1.1.25.2.bin differ diff --git a/Copy to SD Card root directory to update/BIGTREE_TFT28_V3.0.25.1.bin b/Copy to SD Card root directory to update/BIGTREE_TFT28_V3.0.25.1.bin deleted file mode 100644 index 613d42d4b1..0000000000 Binary files a/Copy to SD Card root directory to update/BIGTREE_TFT28_V3.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update/BIGTREE_TFT28_V3.0.25.2.bin b/Copy to SD Card root directory to update/BIGTREE_TFT28_V3.0.25.2.bin new file mode 100644 index 0000000000..01d8211810 Binary files /dev/null and b/Copy to SD Card root directory to update/BIGTREE_TFT28_V3.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update/BIGTREE_TFT35_V3.0.25.1.bin b/Copy to SD Card root directory to update/BIGTREE_TFT35_V3.0.25.1.bin deleted file mode 100644 index a807a5a694..0000000000 Binary files a/Copy to SD Card root directory to update/BIGTREE_TFT35_V3.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update/BIGTREE_TFT35_V3.0.25.2.bin b/Copy to SD Card root directory to update/BIGTREE_TFT35_V3.0.25.2.bin new file mode 100644 index 0000000000..38c4eb2427 Binary files /dev/null and b/Copy to SD Card root directory to update/BIGTREE_TFT35_V3.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT28_V1.0.25.1.bin b/Copy to SD Card root directory to update/BIQU_TFT28_V1.0.25.1.bin deleted file mode 100644 index bf1f7cf314..0000000000 Binary files a/Copy to SD Card root directory to update/BIQU_TFT28_V1.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT28_V1.0.25.2.bin b/Copy to SD Card root directory to update/BIQU_TFT28_V1.0.25.2.bin new file mode 100644 index 0000000000..a008d91141 Binary files /dev/null and b/Copy to SD Card root directory to update/BIQU_TFT28_V1.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT35_APP1_V2.0.25.1.bin b/Copy to SD Card root directory to update/BIQU_TFT35_APP1_V2.0.25.1.bin deleted file mode 100644 index b50fc48a0a..0000000000 Binary files a/Copy to SD Card root directory to update/BIQU_TFT35_APP1_V2.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT35_APP1_V2.0.25.2.bin b/Copy to SD Card root directory to update/BIQU_TFT35_APP1_V2.0.25.2.bin new file mode 100644 index 0000000000..3a1b8446c8 Binary files /dev/null and b/Copy to SD Card root directory to update/BIQU_TFT35_APP1_V2.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT35_V1.0.25.1.bin b/Copy to SD Card root directory to update/BIQU_TFT35_V1.0.25.1.bin deleted file mode 100644 index 99579004dc..0000000000 Binary files a/Copy to SD Card root directory to update/BIQU_TFT35_V1.0.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT35_V1.0.25.2.bin b/Copy to SD Card root directory to update/BIQU_TFT35_V1.0.25.2.bin new file mode 100644 index 0000000000..d8b012110b Binary files /dev/null and b/Copy to SD Card root directory to update/BIQU_TFT35_V1.0.25.2.bin differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT35_V1.1.25.1.bin b/Copy to SD Card root directory to update/BIQU_TFT35_V1.1.25.1.bin deleted file mode 100644 index 3d66b2c047..0000000000 Binary files a/Copy to SD Card root directory to update/BIQU_TFT35_V1.1.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT35_V1.1.25.2.bin b/Copy to SD Card root directory to update/BIQU_TFT35_V1.1.25.2.bin new file mode 100644 index 0000000000..896d26375d Binary files /dev/null and b/Copy to SD Card root directory to update/BIQU_TFT35_V1.1.25.2.bin differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT35_V1.2.25.1.bin b/Copy to SD Card root directory to update/BIQU_TFT35_V1.2.25.1.bin deleted file mode 100644 index 263dfd3b71..0000000000 Binary files a/Copy to SD Card root directory to update/BIQU_TFT35_V1.2.25.1.bin and /dev/null differ diff --git a/Copy to SD Card root directory to update/BIQU_TFT35_V1.2.25.2.bin b/Copy to SD Card root directory to update/BIQU_TFT35_V1.2.25.2.bin new file mode 100644 index 0000000000..06f980f2a4 Binary files /dev/null and b/Copy to SD Card root directory to update/BIQU_TFT35_V1.2.25.2.bin differ diff --git a/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT24_V1.1.25.1.bin b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT24_V1.1.25.1.bin new file mode 100644 index 0000000000..f5e10b4de3 Binary files /dev/null and b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT24_V1.1.25.1.bin differ diff --git a/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT28_V3.0.25.1.bin b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT28_V3.0.25.1.bin new file mode 100644 index 0000000000..eec95f69cb Binary files /dev/null and b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT28_V3.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT35_V3.0.25.1.bin b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT35_V3.0.25.1.bin new file mode 100644 index 0000000000..33277d2a74 Binary files /dev/null and b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIGTREE_TFT35_V3.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT28_V1.0.25.1.bin b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT28_V1.0.25.1.bin new file mode 100644 index 0000000000..a1b14ae6fb Binary files /dev/null and b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT28_V1.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_APP1_V2.0.25.1.bin b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_APP1_V2.0.25.1.bin new file mode 100644 index 0000000000..f496522537 Binary files /dev/null and b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_APP1_V2.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.0.25.1.bin b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.0.25.1.bin new file mode 100644 index 0000000000..682fed3503 Binary files /dev/null and b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.0.25.1.bin differ diff --git a/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.1.25.1.bin b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.1.25.1.bin new file mode 100644 index 0000000000..e6ab076d80 Binary files /dev/null and b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.1.25.1.bin differ diff --git a/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.2.25.1.bin b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.2.25.1.bin new file mode 100644 index 0000000000..3ce291d1ef Binary files /dev/null and b/Copy to SD Card root directory to update/Firmware archive/V25.1 (16-jan-2020)/BIQU_TFT35_V1.2.25.1.bin differ diff --git a/TFT/src/Libraries/cmsis/stm32f2xx/system_stm32f2xx.c b/TFT/src/Libraries/cmsis/stm32f2xx/system_stm32f2xx.c index 02a4c42449..aec59447fc 100644 --- a/TFT/src/Libraries/cmsis/stm32f2xx/system_stm32f2xx.c +++ b/TFT/src/Libraries/cmsis/stm32f2xx/system_stm32f2xx.c @@ -396,7 +396,7 @@ static void SetSysClock(void) RCC->CFGR |= RCC_CFGR_SW_PLL; /* Wait till the main PLL is used as system clock source */ - while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); + while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL) { } } diff --git a/TFT/src/User/API/LCD_Encoder.c b/TFT/src/User/API/LCD_Encoder.c index 9ddb4abf17..1190a0ddde 100644 --- a/TFT/src/User/API/LCD_Encoder.c +++ b/TFT/src/User/API/LCD_Encoder.c @@ -88,7 +88,12 @@ void LCD_LoopEncoder(void) void loopCheckMode(void) { - if(isPrinting()) return; +// #ifndef CLEAN_MODE_SWITCHING_SUPPORT +// IDEALLY I would like to be able to swap even when the TFT is in printing mode +// but before I can allow that I need a way to make sure that we swap back into the right mode (and correct screen) +// and I really want a reliable way to DETECT that the TFT should be in printing mode even when the print was started externally. + if(isPrinting()) return; +// #endif if(LCD_ReadBtn(LCD_CHANGE_MODE_INTERVALS) || LCD_ReadPen(LCD_CHANGE_MODE_INTERVALS)) { infoMenu.menu[++infoMenu.cur] = menuMode; diff --git a/TFT/src/User/API/Language/Language.c b/TFT/src/User/API/Language/Language.c index 482127ad86..c54c49025c 100644 --- a/TFT/src/User/API/Language/Language.c +++ b/TFT/src/User/API/Language/Language.c @@ -167,6 +167,10 @@ const char *const en_pack[LABEL_NUM]={ EN_MOVE_SPEED, EN_KNOB_LED, EN_M0_PAUSE, + EN_SEND_START_GCODE, + EN_SEND_END_GCODE, + EN_PERSISTANT_STATUS_INFO, + EN_FILE_LISTMODE, }; const char *const cn_pack[LABEL_NUM]={ @@ -321,6 +325,10 @@ const char *const cn_pack[LABEL_NUM]={ CN_MOVE_SPEED, CN_KNOB_LED, CN_M0_PAUSE, + CN_SEND_START_GCODE, + CN_SEND_END_GCODE, + CN_PERSISTANT_STATUS_INFO, + CN_FILE_LISTMODE, }; const char *const ru_pack[LABEL_NUM]={ @@ -475,6 +483,10 @@ const char *const ru_pack[LABEL_NUM]={ RU_MOVE_SPEED, RU_KNOB_LED, RU_M0_PAUSE, + RU_SEND_START_GCODE, + RU_SEND_END_GCODE, + RU_PERSISTANT_STATUS_INFO, + RU_FILE_LISTMODE, }; const char *const jp_pack[LABEL_NUM]={ @@ -629,6 +641,10 @@ const char *const jp_pack[LABEL_NUM]={ JP_MOVE_SPEED, JP_KNOB_LED, JP_M0_PAUSE, + JP_SEND_START_GCODE, + JP_SEND_END_GCODE, + JP_PERSISTANT_STATUS_INFO, + JP_FILE_LISTMODE, }; const char *const am_pack[LABEL_NUM]={ @@ -783,6 +799,10 @@ const char *const am_pack[LABEL_NUM]={ AM_MOVE_SPEED, AM_KNOB_LED, AM_M0_PAUSE, + AM_SEND_START_GCODE, + AM_SEND_END_GCODE, + AM_PERSISTANT_STATUS_INFO, + AM_FILE_LISTMODE, }; const char *const de_pack[LABEL_NUM]={ @@ -937,6 +957,10 @@ const char *const de_pack[LABEL_NUM]={ DE_MOVE_SPEED, DE_KNOB_LED, DE_M0_PAUSE, + DE_SEND_START_GCODE, + DE_SEND_END_GCODE, + DE_PERSISTANT_STATUS_INFO, + DE_FILE_LISTMODE, }; const char *const cz_pack[LABEL_NUM]={ @@ -1091,6 +1115,10 @@ const char *const cz_pack[LABEL_NUM]={ CZ_MOVE_SPEED, CZ_KNOB_LED, CZ_M0_PAUSE, + CZ_SEND_START_GCODE, + CZ_SEND_END_GCODE, + CZ_PERSISTANT_STATUS_INFO, + CZ_FILE_LISTMODE, }; const char *const es_pack[LABEL_NUM]={ @@ -1245,6 +1273,10 @@ const char *const es_pack[LABEL_NUM]={ ES_MOVE_SPEED, ES_KNOB_LED, ES_M0_PAUSE, + ES_SEND_START_GCODE, + ES_SEND_END_GCODE, + ES_PERSISTANT_STATUS_INFO, + ES_FILE_LISTMODE, }; const char *const fr_pack[LABEL_NUM]={ @@ -1399,6 +1431,10 @@ const char *const fr_pack[LABEL_NUM]={ FR_MOVE_SPEED, FR_KNOB_LED, FR_M0_PAUSE, + FR_SEND_START_GCODE, + FR_SEND_END_GCODE, + FR_PERSISTANT_STATUS_INFO, + FR_FILE_LISTMODE, }; const char *const pt_pack[LABEL_NUM]={ @@ -1553,6 +1589,10 @@ const char *const pt_pack[LABEL_NUM]={ PT_MOVE_SPEED, PT_KNOB_LED, PT_M0_PAUSE, + PT_SEND_START_GCODE, + PT_SEND_END_GCODE, + PT_PERSISTANT_STATUS_INFO, + PT_FILE_LISTMODE, }; const char *const it_pack[LABEL_NUM]={ @@ -1707,6 +1747,10 @@ const char *const it_pack[LABEL_NUM]={ IT_MOVE_SPEED, IT_KNOB_LED, IT_M0_PAUSE, + IT_SEND_START_GCODE, + IT_SEND_END_GCODE, + IT_PERSISTANT_STATUS_INFO, + IT_FILE_LISTMODE, }; const char *const pl_pack[LABEL_NUM]={ @@ -1861,6 +1905,10 @@ const char *const pl_pack[LABEL_NUM]={ PL_MOVE_SPEED, PL_KNOB_LED, PL_M0_PAUSE, + PL_SEND_START_GCODE, + PL_SEND_END_GCODE, + PL_PERSISTANT_STATUS_INFO, + PL_FILE_LISTMODE, }; const char *const sk_pack[LABEL_NUM]={ @@ -2015,6 +2063,10 @@ const char *const sk_pack[LABEL_NUM]={ SK_MOVE_SPEED, SK_KNOB_LED, SK_M0_PAUSE, + SK_SEND_START_GCODE, + SK_SEND_END_GCODE, + SK_PERSISTANT_STATUS_INFO, + SK_FILE_LISTMODE, }; const char *const du_pack[LABEL_NUM]={ @@ -2169,6 +2221,10 @@ const char *const du_pack[LABEL_NUM]={ DU_MOVE_SPEED, DU_KNOB_LED, DU_M0_PAUSE, + DU_SEND_START_GCODE, + DU_SEND_END_GCODE, + DU_PERSISTANT_STATUS_INFO, + DU_FILE_LISTMODE, }; u8 * textSelect(u8 sel) diff --git a/TFT/src/User/API/Language/Language.h b/TFT/src/User/API/Language/Language.h index 7175322e08..205013f643 100644 --- a/TFT/src/User/API/Language/Language.h +++ b/TFT/src/User/API/Language/Language.h @@ -178,7 +178,11 @@ enum LABEL_MOVE_SPEED, LABEL_KNOB_LED, LABEL_M0_PAUSE, - + LABEL_SEND_START_GCODE, + LABEL_SEND_END_GCODE, + LABEL_PERSISTENT_STATUS_INFO, + LABEL_FILE_LISTMODE, + //add new keywords above this line only //keep the following always at the end of this list LABEL_NUM, diff --git a/TFT/src/User/API/Language/language_am.h b/TFT/src/User/API/Language/language_am.h index fcebbff1bd..719f9ea670 100644 --- a/TFT/src/User/API/Language/language_am.h +++ b/TFT/src/User/API/Language/language_am.h @@ -152,5 +152,8 @@ #define AM_MOVE_SPEED "Move speed(X Y Z)" #define AM_KNOB_LED "Rotary Knob LED" #define AM_M0_PAUSE "Paused by M0 command" - + #define AM_SEND_START_GCODE "Start Gcode before print" + #define AM_SEND_END_GCODE "End Gcode after print" + #define AM_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define AM_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_cn.h b/TFT/src/User/API/Language/language_cn.h index a4dc3e6a6d..eef0a32845 100644 --- a/TFT/src/User/API/Language/language_cn.h +++ b/TFT/src/User/API/Language/language_cn.h @@ -152,5 +152,9 @@ #define CN_MOVE_SPEED "Move speed(X Y Z)" #define CN_KNOB_LED "Rotary Knob LED" #define CN_M0_PAUSE "Paused by M0 command" + #define CN_SEND_START_GCODE "Start Gcode before print" + #define CN_SEND_END_GCODE "End Gcode after print" + #define CN_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define CN_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_cz.h b/TFT/src/User/API/Language/language_cz.h index 1e4285a9c0..418629d925 100644 --- a/TFT/src/User/API/Language/language_cz.h +++ b/TFT/src/User/API/Language/language_cz.h @@ -152,5 +152,9 @@ #define CZ_MOVE_SPEED "Move speed(X Y Z)" #define CZ_KNOB_LED "Rotary Knob LED" #define CZ_M0_PAUSE "Paused by M0 command" + #define CZ_SEND_START_GCODE "Start Gcode before print" + #define CZ_SEND_END_GCODE "End Gcode after print" + #define CZ_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define CZ_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_de.h b/TFT/src/User/API/Language/language_de.h index 90d30302af..f178a26b53 100644 --- a/TFT/src/User/API/Language/language_de.h +++ b/TFT/src/User/API/Language/language_de.h @@ -4,21 +4,21 @@ #define DE_LANGUAGE "Deutsch" #define DE_HEAT "Heizen" #define DE_MOVE "Bewegen" - #define DE_HOME "Home" + #define DE_HOME "Home XYZ" #define DE_PRINT "Drucken" #define DE_EXTRUDE "Extruder" #define DE_FAN "Lüfter" #define DE_SETTINGS "Setup" - #define DE_SCREEN_SETTINGS "Screen" + #define DE_SCREEN_SETTINGS "Bildschirm" #define DE_MACHINE_SETTINGS "Drucker" #define DE_FEATURE_SETTINGS "Feature" - #define DE_SILENT_ON "Silent On" - #define DE_SILENT_OFF "Silent Off" - #define DE_SHUT_DOWN "Shut Down" - #define DE_RGB_SETTINGS "LED Color" + #define DE_SILENT_ON "Ton An" + #define DE_SILENT_OFF "Ton Aus" + #define DE_SHUT_DOWN "Auschalten (PS_ON)" + #define DE_RGB_SETTINGS "LED Farbe" #define DE_RGB_OFF "LED Aus" #define DE_GCODE "Gcode" - #define DE_CUSTOM "Custom" + #define DE_CUSTOM "Extras" #define DE_LEVELING "Leveling" #define DE_POINT_1 "Punkt 1" #define DE_POINT_2 "Punkt 2" @@ -26,12 +26,12 @@ #define DE_POINT_4 "Punkt 4" #define DE_ABL "ABL" #define DE_BLTOUCH "Bltouch" - #define DE_BLTOUCH_TEST "Test" - #define DE_BLTOUCH_DEPLOY "Deploy" - #define DE_BLTOUCH_STOW "Stow" - #define DE_BLTOUCH_REPEAT "Repeat" + #define DE_BLTOUCH_TEST "Testen" + #define DE_BLTOUCH_DEPLOY "Ausfahren" + #define DE_BLTOUCH_STOW "Einfahren" + #define DE_BLTOUCH_REPEAT "Widerholen" #define DE_PROBE_OFFSET "Offset" - #define DE_EEPROM_SAVE "Save" + #define DE_EEPROM_SAVE "Speichern" #define DE_INC "Erhöhen" #define DE_DEC "Verringern" #define DE_NOZZLE "Düse" @@ -43,13 +43,13 @@ #define DE_PAUSE "Pause" #define DE_RESUME "Wiederaufnahme" #define DE_LOAD "Laden" - #define DE_UNLOAD "Leeren" + #define DE_UNLOAD "Entleeren" #define DE_SLOW_SPEED "Langsam" #define DE_NORMAL_SPEED "Normal" #define DE_FAST_SPEED "Schnell" #define DE_FAN_FULL_SPEED "Voll" #define DE_FAN_HALF_SPEED "Halb" - #define DE_ROTATE_UI "Drehen UI" + #define DE_ROTATE_UI "Drehe UI" #define DE_TOUCHSCREEN_ADJUST "TSC kalib." #define DE_MORE "Mehr" #define DE_SCREEN_INFO "Info" @@ -112,45 +112,49 @@ #define DE_STOP_PRINT "Druck abbrechen?" #define DE_CONFIRM "OK" #define DE_TFTSD "TFT SD" - #define DE_READ_TFTSD_ERROR "TFTSD Lesefehler!" + #define DE_READ_TFTSD_ERROR "TFT SD Lesefehler!" #define DE_TFTSD_INSERTED "SD-Karte gesteckt!" #define DE_TFTSD_REMOVED "SD-Karte entnommen!" #define DE_U_DISK "USB-Stick" #define DE_READ_U_DISK_ERROR "USB-Stick Lesefehler!" #define DE_U_DISK_INSERTED "USB-Stick eingesteckt!" - #define DE_U_DISK_REMOVED "USB-Stick abgezogen!" - #define DE_ONBOARDSD "OnboardSD" - #define DE_READ_ONBOARDSD_ERROR "OnboardSD Lesefehler!" + #define DE_U_DISK_REMOVED "USB-Stick entfernt!" + #define DE_ONBOARDSD "Onboard SD" + #define DE_READ_ONBOARDSD_ERROR "Onboard SD Lesefehler!" #define DE_FILAMENT_RUNOUT "Filament runout!" - #define DE_PREHEAT "Preheat" - #define DE_PREHEAT_BOTH "Both" + #define DE_PREHEAT "Vorheizen" + #define DE_PREHEAT_BOTH "Beide" #define DE_PREHEAT_PLA "PLA" #define DE_PREHEAT_PETG "PETG" #define DE_PREHEAT_ABS "ABS" #define DE_PREHEAT_CUSTOM1 "CUSTOM1" #define DE_PREHEAT_CUSTOM2 "CUSTOM2" - #define DE_IS_PAUSE "Unable to extrude when printing, Pause printing?" - #define DE_AUTO_SHUT_DOWN "Auto Power" - #define DE_MANUAL_SHUT_DOWN "Manual" - #define DE_UNIFIEDMOVE "Movement" - #define DE_UNIFIEDHEAT "Heat&Fan" - #define DE_COOLDOWN "Cool Down" - #define DE_EMERGENCYSTOP "EM. STOP" - #define DE_TOUCH_TO_EXIT "Touch anywhere to exit" - #define DE_MAINMENU "Menu" - #define DE_WAIT_TEMP_SHUT_DOWN "Wait for the temperature of hotend to be lower than " STRINGIFY(AUTO_SHUT_DOWN_MAXTEMP) "℃" // Wait for the temperature of hotend to be lower than 50℃ - #define DE_FORCE_SHUT_DOWN "Force" - #define DE_SHUTTING_DOWN "Shutting down..." + #define DE_IS_PAUSE "Extrudierung während Druckvorgangs nicht möglich, Druck Pausieren?" + #define DE_AUTO_SHUT_DOWN "Automatisch AUS (PS_ON)" + #define DE_MANUAL_SHUT_DOWN "Manuel" + #define DE_UNIFIEDMOVE "Bewegung" + #define DE_UNIFIEDHEAT "Heiz.Lüft." + #define DE_COOLDOWN "Abkühlen" + #define DE_EMERGENCYSTOP "NOT STOP!" + #define DE_TOUCH_TO_EXIT "Zum verlassen, Bildschirm berühren" + #define DE_MAINMENU "Menü" + #define DE_WAIT_TEMP_SHUT_DOWN "Warte bis Hotend-Temperatur unter " STRINGIFY(AUTO_SHUT_DOWN_MAXTEMP) "℃ fällt." // Wait for the temperature of hotend to be lower than 50℃ + #define DE_FORCE_SHUT_DOWN "Erzwinge" + #define DE_SHUTTING_DOWN "Fahre herunter..." #define DE_PARAMETER_SETTING "Parameter" - #define DE_ON "ON" - #define DE_OFF "OFF" + #define DE_ON "AN" + #define DE_OFF "AUS" #define DE_AUTO "AUTO" #define DE_SMART "SMART" - #define DE_TERMINAL_ACK "Hide Terminal ACK" - #define DE_INVERT_YAXIS "Invert Y Axis" - #define DE_INVERT_ZAXIS "Invert Z Axis" - #define DE_MOVE_SPEED "Move speed(X Y Z)" - #define DE_KNOB_LED "Rotary Knob LED" - #define DE_M0_PAUSE "Paused by M0 command" + #define DE_TERMINAL_ACK "Blende Terminal ACK aus" + #define DE_INVERT_YAXIS "Invertiere Y-Achse" + #define DE_INVERT_ZAXIS "Invertiere Z-Achse" + #define DE_MOVE_SPEED "Geschwindigkeit (XYZ)" + #define DE_KNOB_LED "Drehknopf LED Farbe" + #define DE_M0_PAUSE "Pause durch M0 kommando" + #define DE_SEND_START_GCODE "Start-Gcode vor druck" + #define DE_SEND_END_GCODE "End-Gcode nach druck" + #define DE_PERSISTANT_STATUS_INFO "Speicherungs-status Information" + #define DE_FILE_LISTMODE "Datei-Ansicht als Liste" #endif diff --git a/TFT/src/User/API/Language/language_du.h b/TFT/src/User/API/Language/language_du.h index 89cdf85a83..ea42b99c19 100644 --- a/TFT/src/User/API/Language/language_du.h +++ b/TFT/src/User/API/Language/language_du.h @@ -152,5 +152,9 @@ #define DU_MOVE_SPEED "Bewegingssnelheid(X Y Z)" #define DU_KNOB_LED "Rotary Knob LED" #define DU_M0_PAUSE "Paused by M0 command" + #define DU_SEND_START_GCODE "Start Gcode before print" + #define DU_SEND_END_GCODE "End Gcode after print" + #define DU_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define DU_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_en.h b/TFT/src/User/API/Language/language_en.h index 94f945f760..ab4102158a 100644 --- a/TFT/src/User/API/Language/language_en.h +++ b/TFT/src/User/API/Language/language_en.h @@ -97,7 +97,7 @@ #define EN_5_PERCENT "5%" #define EN_10_PERCENT "10%" #define EN_READY "Ready" - #define EN_BUSY "Busy processing ,please wait..." + #define EN_BUSY "Busy processing, please wait..." #define EN_UNCONNECTED "No printer attached!" #define EN_DISCONNECT_INFO "Now you can control the printer by your computer!" #define EN_LOADING "Loading..." @@ -152,5 +152,9 @@ #define EN_MOVE_SPEED "Move speed(X Y Z)" #define EN_KNOB_LED "Rotary Knob LED" #define EN_M0_PAUSE "Paused by M0 command" + #define EN_SEND_START_GCODE "Start Gcode before print" + #define EN_SEND_END_GCODE "End Gcode after print" + #define EN_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define EN_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_es.h b/TFT/src/User/API/Language/language_es.h index f1bbe3f56f..dec4ac69eb 100644 --- a/TFT/src/User/API/Language/language_es.h +++ b/TFT/src/User/API/Language/language_es.h @@ -152,5 +152,9 @@ #define ES_MOVE_SPEED "Move speed(X Y Z)" #define ES_KNOB_LED "Rotary Knob LED" #define ES_M0_PAUSE "Paused by M0 command" + #define ES_SEND_START_GCODE "Start Gcode before print" + #define ES_SEND_END_GCODE "End Gcode after print" + #define ES_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define ES_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_fr.h b/TFT/src/User/API/Language/language_fr.h index 5f04e6cfd1..f00a372849 100644 --- a/TFT/src/User/API/Language/language_fr.h +++ b/TFT/src/User/API/Language/language_fr.h @@ -152,5 +152,9 @@ #define FR_MOVE_SPEED "Vitesse de déplacement (X Y Z)" #define FR_KNOB_LED "Rotary Knob LED" #define FR_M0_PAUSE "Paused by M0 command" + #define FR_SEND_START_GCODE "Start Gcode before print" + #define FR_SEND_END_GCODE "End Gcode after print" + #define FR_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define FR_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_it.h b/TFT/src/User/API/Language/language_it.h index 46f558974d..06f8675e2c 100644 --- a/TFT/src/User/API/Language/language_it.h +++ b/TFT/src/User/API/Language/language_it.h @@ -152,5 +152,9 @@ #define IT_MOVE_SPEED "Move speed(X Y Z)" #define IT_KNOB_LED "Rotary Knob LED" #define IT_M0_PAUSE "Paused by M0 command" + #define IT_SEND_START_GCODE "Start Gcode before print" + #define IT_SEND_END_GCODE "End Gcode after print" + #define IT_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define IT_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_jp.h b/TFT/src/User/API/Language/language_jp.h index 43b72416dc..b754fba729 100644 --- a/TFT/src/User/API/Language/language_jp.h +++ b/TFT/src/User/API/Language/language_jp.h @@ -152,5 +152,9 @@ #define JP_MOVE_SPEED "Move speed(X Y Z)" #define JP_KNOB_LED "Rotary Knob LED" #define JP_M0_PAUSE "Paused by M0 command" + #define JP_SEND_START_GCODE "Start Gcode before print" + #define JP_SEND_END_GCODE "End Gcode after print" + #define JP_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define JP_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_pl.h b/TFT/src/User/API/Language/language_pl.h index 477d0776af..9ea2be27f5 100644 --- a/TFT/src/User/API/Language/language_pl.h +++ b/TFT/src/User/API/Language/language_pl.h @@ -152,5 +152,9 @@ #define PL_MOVE_SPEED "Move speed(X Y Z)" #define PL_KNOB_LED "Rotary Knob LED" #define PL_M0_PAUSE "Paused by M0 command" + #define PL_SEND_START_GCODE "Start Gcode before print" + #define PL_SEND_END_GCODE "End Gcode after print" + #define PL_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define PL_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_pt.h b/TFT/src/User/API/Language/language_pt.h index 53a955e370..da00df86c5 100644 --- a/TFT/src/User/API/Language/language_pt.h +++ b/TFT/src/User/API/Language/language_pt.h @@ -152,5 +152,9 @@ #define PT_MOVE_SPEED "Move speed(X Y Z)" #define PT_KNOB_LED "Rotary Knob LED" #define PT_M0_PAUSE "Paused by M0 command" + #define PT_SEND_START_GCODE "Start Gcode before print" + #define PT_SEND_END_GCODE "End Gcode after print" + #define PT_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define PT_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/Language/language_ru.h b/TFT/src/User/API/Language/language_ru.h index 4243735bae..50f9258d2d 100644 --- a/TFT/src/User/API/Language/language_ru.h +++ b/TFT/src/User/API/Language/language_ru.h @@ -11,26 +11,26 @@ #define RU_SETTINGS "Настройки" #define RU_SCREEN_SETTINGS "Экран" #define RU_MACHINE_SETTINGS "Принтер" - #define RU_FEATURE_SETTINGS "Другие" + #define RU_FEATURE_SETTINGS "Другие \u08D2" //Checkbox Sign #define RU_SILENT_ON "Звук выкл" #define RU_SILENT_OFF "Звук вкл" #define RU_SHUT_DOWN "Выключить" #define RU_RGB_SETTINGS "Цвет LED" #define RU_RGB_OFF "LED выкл" #define RU_GCODE "G-коды" - #define RU_CUSTOM "Свои" - #define RU_LEVELING "Калибровки" + #define RU_CUSTOM "Своё меню" + #define RU_LEVELING "Ручной ур." #define RU_POINT_1 "Точка 1" #define RU_POINT_2 "Точка 2" #define RU_POINT_3 "Точка 3" #define RU_POINT_4 "Точка 4" - #define RU_ABL "Калиб.стол" + #define RU_ABL "ABL" #define RU_BLTOUCH "Bltouch" - #define RU_BLTOUCH_TEST "Тест" - #define RU_BLTOUCH_DEPLOY "Опустить" - #define RU_BLTOUCH_STOW "Поднять" + #define RU_BLTOUCH_TEST "BLT тест" + #define RU_BLTOUCH_DEPLOY "BLT вниз" + #define RU_BLTOUCH_STOW "BLT вверх" #define RU_BLTOUCH_REPEAT "Точность Z" - #define RU_PROBE_OFFSET "Отступ" + #define RU_PROBE_OFFSET "Отступ Z" #define RU_EEPROM_SAVE "Сохранить" #define RU_INC "Увеличить" #define RU_DEC "Уменьшить" @@ -38,20 +38,20 @@ #define RU_BED "Стол" #define RU_STOP "Стоп" #define RU_BACK "Назад" - #define RU_PAGE_UP "<-Стр" - #define RU_PAGE_DOWN "Стр->" + #define RU_PAGE_UP "\u0899 Стр." //Left Arrow + #define RU_PAGE_DOWN "Стр. \u089A" //Right Arrow #define RU_PAUSE "Пауза" #define RU_RESUME "Продолжить" #define RU_LOAD "Загрузка" #define RU_UNLOAD "Выгрузка" #define RU_SLOW_SPEED "Медленно" - #define RU_NORMAL_SPEED "Нормально" + #define RU_NORMAL_SPEED "Обычно" #define RU_FAST_SPEED "Быстро" #define RU_FAN_FULL_SPEED "Максимум" #define RU_FAN_HALF_SPEED "Средне" #define RU_ROTATE_UI "Переворот" #define RU_TOUCHSCREEN_ADJUST "Калибровка" - #define RU_MORE "Далее" + #define RU_MORE "Больше\u089C" //Curved Right Arrow #define RU_SCREEN_INFO "Инфо" #define RU_WHITE "Белый" #define RU_BLACK "Чёрный" @@ -71,7 +71,7 @@ #define RU_RUNOUT_OFF "Окончание OFF" #define RU_RUNOUT_ON "Окончание ON" #define RU_SMART_RUNOUT_ON "Окончание Smart" - #define RU_PERCENTAGE "Проценты" + #define RU_PERCENTAGE "Подстройки" #define RU_BABYSTEP "Микрошаг Z" #define RU_PERCENTAGE_SPEED "Скорость" #define RU_PERCENTAGE_FLOW "Поток" @@ -96,21 +96,21 @@ #define RU_1_PERCENT "1%" #define RU_5_PERCENT "5%" #define RU_10_PERCENT "10%" - #define RU_READY "Готов" + #define RU_READY "Готов \u0894" //Check Sign #define RU_BUSY "Занято процессом, подождите..." #define RU_UNCONNECTED "Нет подключения!" #define RU_DISCONNECT_INFO "Управление принтером через компьютер" #define RU_LOADING "Загрузка..." - #define RU_POWER_FAILED "Продолжить печать?" + #define RU_POWER_FAILED "\u0887 Продолжить печать?" //Question Sign #define RU_CONTINUE "Продолжение" - #define RU_CANNEL "Отмена" + #define RU_CANNEL "\u088F Отмена" //Cancel Sign #define RU_ADJUST_TITLE "Калибровка экрана" #define RU_ADJUST_INFO "Нажмите на красную точку" #define RU_ADJUST_OK "Успешная калибровка" #define RU_ADJUST_FAILED "Неудачная калибровка, попробуйте снова" - #define RU_WARNING "Внимание" + #define RU_WARNING "\u0881 Внимание" //Exclamation Sign #define RU_STOP_PRINT "Остановить печать?" - #define RU_CONFIRM "OK" + #define RU_CONFIRM "\u088E OK" //Confirm Sign #define RU_TFTSD "SD экрана" #define RU_READ_TFTSD_ERROR "Ошибка чтения SD карты!" #define RU_TFTSD_INSERTED "SD карта вставлена!" @@ -150,7 +150,11 @@ #define RU_INVERT_YAXIS "Инверсия оси Y" #define RU_INVERT_ZAXIS "Инверсия оси Z" #define RU_MOVE_SPEED "Скорость (X Y Z)" - #define RU_KNOB_LED "Rotary Knob LED" - #define RU_M0_PAUSE "Paused by M0 command" + #define RU_KNOB_LED "Подсветка энкодера" + #define RU_M0_PAUSE "Пауза по команде M0" + #define RU_SEND_START_GCODE "Gcode перед печатью" + #define RU_SEND_END_GCODE "Gcode после печати" + #define RU_PERSISTANT_STATUS_INFO "Нагрев в инфостроке" + #define RU_FILE_LISTMODE "Файлы в режиме строк" #endif diff --git a/TFT/src/User/API/Language/language_sk.h b/TFT/src/User/API/Language/language_sk.h index 2300136e20..db12fbc0cf 100644 --- a/TFT/src/User/API/Language/language_sk.h +++ b/TFT/src/User/API/Language/language_sk.h @@ -153,5 +153,9 @@ #define SK_MOVE_SPEED "Move speed(X Y Z)" #define SK_KNOB_LED "Rotary Knob LED" #define SK_M0_PAUSE "Paused by M0 command" + #define SK_SEND_START_GCODE "Start Gcode before print" + #define SK_SEND_END_GCODE "End Gcode after print" + #define SK_PERSISTANT_STATUS_INFO "Persistent Status Info" + #define SK_FILE_LISTMODE "Files viewer List Mode" #endif diff --git a/TFT/src/User/API/UI/ST7920_Simulator.c b/TFT/src/User/API/UI/ST7920_Simulator.c index 88e15c22d4..13d54bc8c2 100644 --- a/TFT/src/User/API/UI/ST7920_Simulator.c +++ b/TFT/src/User/API/UI/ST7920_Simulator.c @@ -153,6 +153,9 @@ void menuST7920(void) #if LCD_ENCODER_SUPPORT loopCheckMode(); #endif + #ifdef CLEAN_MODE_SWITCHING_SUPPORT + loopBackEnd(); + #endif } SPI_SlaveDeInit(); } diff --git a/TFT/src/User/API/UI/list_item.c b/TFT/src/User/API/UI/list_item.c index d8e50499d5..1656c24bc8 100644 --- a/TFT/src/User/API/UI/list_item.c +++ b/TFT/src/User/API/UI/list_item.c @@ -339,6 +339,15 @@ char * IconChar(uint8_t sel) return (char *)GET_ICONCHAR[sel]; } +// save dynamic text label ( i : index of the label position, label: char * to the text) +void setDynamicLabel(uint8_t i,char *label){ +dynamic_label[i] = label; +} + +// get dynamic text label ( i : index of the label position) +char * getDynamicLabel(uint8_t i){ + return dynamic_label[i]; +} GUI_POINT getTextStartPoint(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, ICON_POS pos, const char * textchar){ @@ -465,7 +474,7 @@ void ListItem_Display(const GUI_RECT* rect, uint8_t positon, const LISTITEM * cu if (curitem->titlelabel.index == LABEL_DYNAMIC) { - GUI_DispLenString(pos.x, pos.y, (u8*)dynamic_label[positon],textarea_width); + GUI_DispLenString(pos.x, pos.y, (u8*)getDynamicLabel(positon),textarea_width); } else { @@ -477,7 +486,7 @@ void ListItem_Display(const GUI_RECT* rect, uint8_t positon, const LISTITEM * cu case LIST_TOGGLE:; int16_t wy = (1 + GUI_StrPixelWidth(IconCharSelect(ICONCHAR_TOGGLE_BODY)) + 1); //right edge of text area - GUI_ClearRect(rect->x0, rect->y0, rect->x1 - wy, rect->y1); // clear only tect area + GUI_ClearRect(rect->x0, rect->y0, rect->x1 - wy, rect->y1); // clear only text area textarea_width = LISTITEM_WIDTH - (pos.x + wy); //width after removing the width for icon GUI_DispLenString(pos.x , pos.y, textSelect(curitem->titlelabel.index),textarea_width); @@ -512,6 +521,7 @@ void ListItem_Display(const GUI_RECT* rect, uint8_t positon, const LISTITEM * cu ListDrawIcon(rect,LEFT_CENTER,curitem->icon,BLACK); pos.x += (BYTE_HEIGHT + 3); } + GUI_ClearRect(pos.x, rect->y0, rect->x1 - BYTE_WIDTH*8 -1, rect->y1); // clear only text area GUI_DispString(pos.x, pos.y, textSelect(curitem->titlelabel.index)); ListItem_DisplayCustomValue(rect,textSelect(curitem->valueLabel.index)); diff --git a/TFT/src/User/API/UI/list_item.h b/TFT/src/User/API/UI/list_item.h index 8d5f21407b..70bdeb957f 100644 --- a/TFT/src/User/API/UI/list_item.h +++ b/TFT/src/User/API/UI/list_item.h @@ -149,6 +149,8 @@ extern char * dynamic_label[LISTITEM_PER_PAGE]; uint8_t * IconCharSelect(uint8_t sel); +void setDynamicLabel(uint8_t i,char *label); +char * getDynamicLabel(uint8_t i); void ListItem_Display(const GUI_RECT* rect, uint8_t positon, const LISTITEM * curitem, bool pressed); void ListMenuSetItem (const LISTITEM * menuItem, uint8_t positon); void ListItem_DisplayToggle(uint16_t sx, uint16_t sy, uint8_t iconchar_state); diff --git a/TFT/src/User/API/UI/touch_process.c b/TFT/src/User/API/UI/touch_process.c index 6753d5144d..75ce64ae4e 100644 --- a/TFT/src/User/API/UI/touch_process.c +++ b/TFT/src/User/API/UI/touch_process.c @@ -141,7 +141,7 @@ u16 Key_value(u8 total_rect,const GUI_RECT* menuRect) if((x>menuRect[i].x0)&&(xmenuRect[i].y0)&&(y>=3; + bytePerLine=w*bpp; + if(bytePerLine%4 !=0) //bmp + bytePerLine=(bytePerLine/4+1)*4; + + for(int j=0; j>3; + pix.RGB.g=lcdcolor[1]>>2; + pix.RGB.b=lcdcolor[0]>>3; + + GUI_DrawPixel((pos.x + i), (pos.y + j), pix.color); + + } + } + f_close(&bmpFile); + return true; +} + //draw icon with different length and width (sx & sy cordinates for top left of icon, w width, h height, addr flash byte address) void ICON_CustomReadDisplay(u16 sx,u16 sy,u16 w, u16 h, u32 addr) { @@ -73,13 +132,13 @@ void ICON_PressedDisplay(u16 sx,u16 sy, u8 icon) W25Qxx_SPI_Read_Write_Byte(address & 0xFF); for(y=sy; y>=3; bytePerLine=w*bpp; if(bytePerLine%4 !=0) //bmp @@ -194,7 +199,7 @@ void scanResetDir(void) void scanUpdates(void) { - volatile u8 result = 0; //must volatile! + volatile u8 result = 0; //must volatile if(mountSDCard()) { result = scanUpdateFile(); diff --git a/TFT/src/User/API/boot.h b/TFT/src/User/API/boot.h index 84249cf9a1..9da53a52df 100644 --- a/TFT/src/User/API/boot.h +++ b/TFT/src/User/API/boot.h @@ -8,14 +8,11 @@ //address in spiflash W25Qxx #define LOGO_ADDR 0x0 -#define ICON_ADDR(num) ((num)*0x5000+0x4B000) - -// -#define WORD_UNICODE 0x280000 // unicode (+0x480000 4.5M) -#define BYTE_ASCII_ADDR 0x700000 // ascii (+0x1000 4K) +#define WORD_UNICODE 0x4B000 // unicode (+0x480000 4.5M) +#define BYTE_ASCII_ADDR (WORD_UNICODE+0x480000) // ascii (+0x1000 4K) //#define BYTE_RESERVE_ADDR 0x710000 - -#define INFOBOX_ADDR (BYTE_ASCII_ADDR + 0x1000) // total byte size 0xA7F8 +#define ICON_ADDR(num) ((num)*0x5000+BYTE_ASCII_ADDR+0x1000) +#define INFOBOX_ADDR (ICON_ADDR(ICON_PREVIEW) + 0x5000) // total byte size 0xA7F8 #define SMALL_ICON_START_ADDR (INFOBOX_ADDR+0xA7F8) #define SMALL_ICON_ADDR(num) ((num)*0x1000+SMALL_ICON_START_ADDR) @@ -53,7 +50,7 @@ enum ICON_10_MM, ICON_X_DEC, ICON_Y_DEC, - ICON_Z_DEC, + ICON_Z_DEC, ICON_X_HOME, ICON_Y_HOME, ICON_Z_HOME, @@ -70,7 +67,7 @@ enum ICON_FAST_SPEED, ICON_E_1_MM, ICON_E_5_MM, - ICON_E_10_MM, + ICON_E_10_MM, ICON_FAN_FULL_SPEED, ICON_FAN_HALF_SPEED, ICON_ROTATE_UI, @@ -88,7 +85,6 @@ enum ICON_BSD_SOURCE, ICON_SD_SOURCE, ICON_U_DISK, - ICON_RUNOUT, ICON_POINT_1, ICON_POINT_2, ICON_POINT_3, @@ -118,7 +114,6 @@ enum ICON_PREHEAT_PLA, ICON_PREHEAT_PETG, ICON_PREHEAT_ABS, - ICON_POWER_SUPPLY, ICON_CUSTOM, ICON_CUSTOM_0, ICON_CUSTOM_1, @@ -141,7 +136,13 @@ enum ICON_PARAMETER, ICON_GLOBAL_NOZZLE0, ICON_GLOBAL_BED, - ICON_LEDCOLOR, + ICON_PRINTING_NOZZLE, + ICON_PRINTING_BED, + ICON_PRINTING_FAN, + ICON_PRINTING_TIMER, + ICON_PRINTING_ZLAYER, + ICON_PRINTING_SPEED, + ICON_PRINTING_FLOW, //add new icons above this line only // ICON_RESERVE diff --git a/TFT/src/User/API/flashStore.c b/TFT/src/User/API/flashStore.c index e380a41673..4084442d27 100644 --- a/TFT/src/User/API/flashStore.c +++ b/TFT/src/User/API/flashStore.c @@ -3,7 +3,7 @@ #define PARA_SIZE 256 //bytes #define TSC_SIGN 0x20190827 // DO NOT MODIFY -#define PARA_SIGN 0x20191225 // If a new setting parameter is added, modify here and initialize the initial value in the "infoSettingsReset()" function +#define PARA_SIGN 0x20200229 // If a new setting parameter is added, modify here and initialize the initial value in the "infoSettingsReset()" function extern u32 TSC_Para[7]; // extern SETTINGS infoSettings; // @@ -68,6 +68,11 @@ bool readStoredPara(void) infoSettings.invert_yaxis = byteToWord(data + (index += 4), 4); infoSettings.move_speed = byteToWord(data + (index += 4), 4); infoSettings.invert_zaxis = byteToWord(data + (index += 4), 4); + infoSettings.send_start_gcode = byteToWord(data + (index += 4), 4); + infoSettings.send_end_gcode = byteToWord(data + (index += 4), 4); + infoSettings.persistent_info = byteToWord(data + (index += 4), 4); + infoSettings.file_listmode = byteToWord(data + (index += 4), 4); + infoSettings.knob_led_color = byteToWord(data + (index += 4), 4); } return paraExist; @@ -97,6 +102,11 @@ void storePara(void) wordToByte(infoSettings.invert_yaxis, data + (index += 4)); wordToByte(infoSettings.move_speed, data + (index += 4)); wordToByte(infoSettings.invert_zaxis, data + (index += 4)); - + wordToByte(infoSettings.send_start_gcode, data + (index += 4)); + wordToByte(infoSettings.send_end_gcode, data + (index += 4)); + wordToByte(infoSettings.persistent_info, data + (index += 4)); + wordToByte(infoSettings.file_listmode, data + (index += 4)); + wordToByte(infoSettings.knob_led_color, data + (index += 4)); + STM32_FlashWrite(data, PARA_SIZE); } diff --git a/TFT/src/User/API/interfaceCmd.c b/TFT/src/User/API/interfaceCmd.c index fa092e86f4..fda3842901 100644 --- a/TFT/src/User/API/interfaceCmd.c +++ b/TFT/src/User/API/interfaceCmd.c @@ -151,83 +151,36 @@ void sendQueueCmd(void) bool avoid_terminal = false; u16 cmd=0; - switch(infoCmd.queue[infoCmd.index_r].gcode[0]) + + if (infoCmd.queue[infoCmd.index_r].src != SERIAL_PORT) { - case 'M': - cmd=strtol(&infoCmd.queue[infoCmd.index_r].gcode[1],NULL,10); + // this command did not originate with the TFT + // look for certain commands even when they are couched behind N commands (line numbers) + if (cmd_seen('M')) + { + cmd = cmd_value(); switch(cmd) { - case 0: - if (isPrinting()) { - setPrintPause(true,true); - } - break; - case 1: - if (isPrinting()) { - setPrintPause(true,true); - } - break; - case 18: //M18/M84 disable steppers - case 84: - coordinateSetClear(false); - break; - - case 27: //M27 - printSetUpdateWaiting(false); - break; - - case 80: //M80 - #ifdef PS_ON_PIN - PS_ON_On(); - #endif - break; - - case 81: //M81 - #ifdef PS_ON_PIN - PS_ON_Off(); - #endif - break; - - case 82: //M82 - eSetRelative(false); - break; - - case 83: //M83 - eSetRelative(true); - break; - - case 109: //M109 + case 117: { - TOOL i = heatGetCurrentToolNozzle(); - if(cmd_seen('T')) i = (TOOL)(cmd_value() + NOZZLE0); - infoCmd.queue[infoCmd.index_r].gcode[3]='4'; - heatSetIsWaiting(i,true); - } - case 104: //M104 - { - TOOL i = heatGetCurrentToolNozzle(); - if(cmd_seen('T')) i = (TOOL)(cmd_value() + NOZZLE0); - if(cmd_seen('S')) - { - heatSyncTargetTemp(i, cmd_value()); + char message[CMD_MAX_CHAR]; + strncpy(message, &infoCmd.queue[infoCmd.index_r].gcode[cmd_index + 4], CMD_MAX_CHAR); + // strip out any checksum that might be in the string + for (int i = 0; i < CMD_MAX_CHAR && message[i] !=0 ; i++) + { + if (message[i] == '*') + { + message[i] = 0; + break; + } } - else + statusScreen_setMsg((u8 *)"M117", (u8 *)&message); + if (infoMenu.menu[infoMenu.cur] != menuStatus) { - char buf[12]; - sprintf(buf, "S%d\n", heatGetTargetTemp(i)); - strcat(infoCmd.queue[infoCmd.index_r].gcode,(const char*)buf); - heatSetSendWaiting(i, false); + popupReminder((u8 *)"M117", (u8 *)&message); } - break; + break; } - - case 105: //M105 - heatSetUpdateWaiting(false); - #ifdef MENU_LIST_MODE - avoid_terminal = infoSettings.terminalACK; - #endif - break; - case 106: //M106 { u8 i = 0; @@ -236,16 +189,8 @@ void sendQueueCmd(void) { fanSetSpeed(i, cmd_value()); } - else - { - char buf[12]; - sprintf(buf, "S%d\n", fanGetSpeed(i)); - strcat(infoCmd.queue[infoCmd.index_r].gcode,(const char*)buf); - fanSetSendWaiting(i, false); - } break; } - case 107: //M107 { u8 i = 0; @@ -253,127 +198,250 @@ void sendQueueCmd(void) fanSetSpeed(i, 0); break; } - - case 114: //M114 - #ifdef FIL_RUNOUT_PIN - positionSetUpdateWaiting(false); - #endif - break; - - case 117: //M117 - statusScreen_setMsg((u8 *)"M117", (u8 *)&infoCmd.queue[infoCmd.index_r].gcode[5]); - if (infoMenu.menu[infoMenu.cur] != menuStatus) + case 220: //M220 + if(cmd_seen('S')) { - popupReminder((u8 *)"M117", (u8 *)&infoCmd.queue[infoCmd.index_r].gcode[5]); + speedSetPercent(0,cmd_value()); } break; - case 190: //M190 - infoCmd.queue[infoCmd.index_r].gcode[2]='4'; - heatSetIsWaiting(BED,true); - case 140: //M140 + case 221: //M221 if(cmd_seen('S')) { - heatSyncTargetTemp(BED,cmd_value()); - } - else - { - char buf[12]; - sprintf(buf, "S%d\n", heatGetTargetTemp(BED)); - strcat(infoCmd.queue[infoCmd.index_r].gcode,(const char*)buf); - heatSetSendWaiting(BED, false); + speedSetPercent(1,cmd_value()); } break; + } + } + } + else + { + // this command originated with the TFT + switch(infoCmd.queue[infoCmd.index_r].gcode[0]) + { + case 'M': + cmd=strtol(&infoCmd.queue[infoCmd.index_r].gcode[1],NULL,10); + switch(cmd) + { + case 0: + if (isPrinting()) { + setPrintPause(true,true); + } + break; + case 1: + if (isPrinting()) { + setPrintPause(true,true); + } + break; + case 18: //M18/M84 disable steppers + case 84: + coordinateSetClear(false); + break; + + case 27: //M27 + printSetUpdateWaiting(false); + break; - case 220: //M220 - if(cmd_seen('S')) + case 80: //M80 + #ifdef PS_ON_PIN + PS_ON_On(); + #endif + break; + + case 81: //M81 + #ifdef PS_ON_PIN + PS_ON_Off(); + #endif + break; + + case 82: //M82 + eSetRelative(false); + break; + + case 83: //M83 + eSetRelative(true); + break; + + case 109: //M109 { - speedSetPercent(0,cmd_value()); + TOOL i = heatGetCurrentToolNozzle(); + if(cmd_seen('T')) i = (TOOL)(cmd_value() + NOZZLE0); + infoCmd.queue[infoCmd.index_r].gcode[3]='4'; + heatSetIsWaiting(i,true); } - else + case 104: //M104 { - char buf[12]; - sprintf(buf, "S%d\n", speedGetPercent(0)); - strcat(infoCmd.queue[infoCmd.index_r].gcode,(const char*)buf); - speedSetSendWaiting(0, false); + TOOL i = heatGetCurrentToolNozzle(); + if(cmd_seen('T')) i = (TOOL)(cmd_value() + NOZZLE0); + if(cmd_seen('S')) + { + heatSyncTargetTemp(i, cmd_value()); + } + else + { + char buf[12]; + sprintf(buf, "S%d\n", heatGetTargetTemp(i)); + strcat(infoCmd.queue[infoCmd.index_r].gcode,(const char*)buf); + heatSetSendWaiting(i, false); + } + break; } - break; - case 221: //M221 - if(cmd_seen('S')) + + case 105: //M105 + heatSetUpdateWaiting(false); + + avoid_terminal = infoSettings.terminalACK; + + break; + + case 106: //M106 { - speedSetPercent(1,cmd_value()); + u8 i = 0; + if(cmd_seen('P')) i = cmd_value(); + if(cmd_seen('S')) + { + fanSetSpeed(i, cmd_value()); + } + else + { + char buf[12]; + sprintf(buf, "S%d\n", fanGetSpeed(i)); + strcat(infoCmd.queue[infoCmd.index_r].gcode,(const char*)buf); + fanSetSendWaiting(i, false); + } + break; } - else + + case 107: //M107 { - char buf[12]; - sprintf(buf, "S%d\n", speedGetPercent(1)); - strcat(infoCmd.queue[infoCmd.index_r].gcode,(const char*)buf); - speedSetSendWaiting(1, false); + u8 i = 0; + if(cmd_seen('P')) i = cmd_value(); + fanSetSpeed(i, 0); + break; } - break; - } - break; - case 'G': - cmd=strtol(&infoCmd.queue[infoCmd.index_r].gcode[1],NULL,10); - switch(cmd) - { - case 0: //G0 - case 1: //G1 - { - AXIS i; - for(i=X_AXIS;i 1: LED_OFF, 2: LED_WHITE, 3: LED_RED, + * 4: LED_ORANGE, 5: LED_YELLOW, 6: LED_GREEN, + * 7: LED_BLUE, 8: LED_INDIGO, 9: LED_VIOLET + * Default value is: 1 for LED_OFF + * +*/ +#define STARTUP_KNOB_LED_COLOR 1 //LED_OFF + //=========================================================================== //============================ TFT Mode Settings ============================ //=========================================================================== -// Show BTT bootscreen when starting up +/** + * Show BTT bootscreen when starting up + */ #define SHOW_BTT_BOOTSCREEN -// TFT mode color +/** + * TFT mode color + */ #define TITLE_BACKGROUND_COLOR BLACK // Title background color // 0xD928 #define BACKGROUND_COLOR BLACK // Background color // 0x0A29 #define FONT_COLOR WHITE // Font foreground color @@ -127,24 +195,9 @@ // update the icons from alternate icon folder #define ALTERNATIVE_MOVE_MENU -// Invert the Y Axis move Direction -// this does not work if LIST MODE is enabled. To invert y axis in LIST MODE go to setting->feature settings -//#define INVERT_YAXIS - -//Invert the Z Axis move Direction -// this does not work if LIST MODE is enabled. To invert z axis in LIST MODE go to setting->feature settings -//#define INVERT_ZAXIS - // Enable Unified Move Menu // Move, Home, Extrude, ABL at one Place and bring Gcode Menu on Home Menu -//#define UNIFIED_MENU - -/** - * Enable list mode in Files menu and settings menu - * It is friendly to display long file name, but the model preview feature is not available - * Disable this if you want to use the model preview feature - */ -#define MENU_LIST_MODE +#define UNIFIED_MENU //-------RESET SETTINGS & TOUCH SCREEN CALIBRATION------|| @@ -183,12 +236,26 @@ #define SHOW_FAN_PERCENTAGE // enable to show fan speed as a percentage instead of a value +/** + * Rapid Serial Communication:More frequent Serial communicaiton while printing. + * The controller will send and parse gcodes more frequently while drawing on + * screen to prevent printer idling and stuttering due to empty printer buffer. + * Note: this might make the graphics slow when switching menus while printing. +*/ +#define RAPID_SERIAL_COMM + +/** + * Enable list mode in Custom G-Code menu + * 7 codes in icon mode, 15 items in list mode + */ +#define CUSTOM_GCODE_LIST_MODE + /** CUSTOM GCODE COMMANDS * Support up to 7 custom gcodes in Icon mode and 15 in List Mode. * Uncomment CUSTOM_X_LABEL and CUSTOM_X_GCODE to enable custom gcode. * CUSTOM_X_LABEL is the name of the custom button, CUSTOM_X_GCODE * CUSTOM_X_GCODE is the gcode to be sent by the custom button, end with '\n' - * You also need to customize the icon corresponding to the command if MENU_LIST_MODE is not enabled. + * You also need to customize the icon corresponding to the command if CUSTOM_GCODE_LIST_MODE is not enabled. * Copy your custom icon to the SD card to be updated, such as:"TFT35/bmp/Custom0.bmp", "TFT24/bmp/Custom1.bmp", etc... * The format of the custom icon is as follows * Bit depth: 24 / 32 bit, Pixel size: 95*95(for TFT35), 70*70(for TFT28/TFT24) @@ -197,9 +264,9 @@ #define CUSTOM_0_GCODE "M501\n" #define CUSTOM_1_LABEL "Disable Steppers" #define CUSTOM_1_GCODE "M84\n" -#define CUSTOM_2_LABEL "init SD Card" +#define CUSTOM_2_LABEL "Init SD Card" #define CUSTOM_2_GCODE "M21\n" -#define CUSTOM_3_LABEL "Release Sd Card" +#define CUSTOM_3_LABEL "Release SD Card" #define CUSTOM_3_GCODE "M22\n" //#define CUSTOM_4_LABEL "Custom4" //#define CUSTOM_4_GCODE "M105\n" @@ -209,9 +276,9 @@ //#define CUSTOM_6_GCODE "M105\n" /* -custom gcode below are compatible only if MENU_LIST_MODE is active +custom gcode below are compatible only if CUSTOM_GCODE_LIST_MODE is active */ -#ifdef MENU_LIST_MODE +#ifdef CUSTOM_GCODE_LIST_MODE //#define CUSTOM_7_LABEL "Custom7" //#define CUSTOM_7_GCODE "M105\n" //#define CUSTOM_8_LABEL "Custom8" @@ -230,6 +297,16 @@ custom gcode below are compatible only if MENU_LIST_MODE is active //#define CUSTOM_14_GCODE "M105\n" #endif +// +//Start Gcode - run this gcode before starting print +// +#define PRINT_START_GCODE "G28\nG29\n" // home and abl + +// +//End Gcode - run this gcode after finishing print +// +#define PRINT_END_GCODE "G90\nG1 E-4\nG92 E0\nM18\n" //reduce filament pressure , reset Extruder position, disable steppers + #define CANCEL_PRINT_GCODE "G28 X0 Y0\n" #endif diff --git a/TFT/src/User/Menu/FeatureSettings.c b/TFT/src/User/Menu/FeatureSettings.c index 88ce026de6..00f8e108a0 100644 --- a/TFT/src/User/Menu/FeatureSettings.c +++ b/TFT/src/User/Menu/FeatureSettings.c @@ -1,163 +1,6 @@ #include "FeatureSettings.h" #include "includes.h" -#ifndef MENU_LIST_MODE - - MENUITEMS featureSettingsItems = { - // title - LABEL_FEATURE_SETTINGS, - // icon label - { - {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_BACK, LABEL_BACK},} - }; - - #define ITEM_PS_ON_NUM 2 - const ITEM itemPowerOff[ITEM_PS_ON_NUM] = { - // icon label - {ICON_POWER_SUPPLY, LABEL_MANUAL_SHUT_DOWN}, - {ICON_POWER_SUPPLY, LABEL_AUTO_SHUT_DOWN}, - }; - const u8 item_power_off[ITEM_PS_ON_NUM] = {0, 1}; - static u8 item_power_off_i = 0; - - #ifdef FIL_RUNOUT_PIN - #define ITEM_RUNOUT_NUM 3 - const ITEM itemRunout[ITEM_RUNOUT_NUM] = { - // icon label - {ICON_RUNOUT, LABEL_RUNOUT_OFF}, - {ICON_RUNOUT, LABEL_RUNOUT_ON}, - {ICON_RUNOUT, LABEL_SMART_RUNOUT_ON}, - }; - const u8 item_runout[ITEM_RUNOUT_NUM] = {FILAMENT_RUNOUT_OFF, FILAMENT_RUNOUT_ON, FILAMENT_SMART_RUNOUT_ON}; - static u8 item_runout_i = 0; - #endif - - #ifdef LED_color_PIN - #define LED_color_NUM 9 - const ITEM itemLedcolor[LED_color_NUM] = { - // icon label - {ICON_LEDCOLOR, LABEL_OFF}, - {ICON_LEDCOLOR, LABEL_WHITE}, - {ICON_LEDCOLOR, LABEL_RED}, - {ICON_LEDCOLOR, LABEL_ORANGE}, - {ICON_LEDCOLOR, LABEL_YELLOW}, - {ICON_LEDCOLOR, LABEL_GREEN}, - {ICON_LEDCOLOR, LABEL_BLUE}, - {ICON_LEDCOLOR, LABEL_INDIGO}, - {ICON_LEDCOLOR, LABEL_VIOLET}, - }; - - const uint32_t led_color[LED_color_NUM] = { - LED_OFF, - LED_WHITE, - LED_RED, - LED_ORANGE, - LED_YELLOW, - LED_GREEN, - LED_BLUE, - LED_INDIGO, - LED_VIOLET - }; - ////////////// - static u8 item_ledcolor_i = 0; - #endif - - void menuFeatureSettings(void) - { - KEY_VALUES key_num = KEY_IDLE; - SETTINGS now = infoSettings; - - for(u8 i=0; i 1){ + if (fe_cur_page > 0){ + fe_cur_page--; + loadFeatureSettings(); + menuRefreshListPage(); } - } - // set page up down button according to page count and current page - if (SKEY_COUNT <= LISTITEM_PER_PAGE) - { - featureSettingsItems.items[5].icon = ICONCHAR_BACKGROUND; - featureSettingsItems.items[6].icon = ICONCHAR_BACKGROUND; } - else - { - if(fe_cur_page == 0){ - featureSettingsItems.items[5].icon = ICONCHAR_BACKGROUND; - featureSettingsItems.items[6].icon = ICONCHAR_PAGEDOWN; - } - else if(fe_cur_page == (FE_PAGE_COUNT-1)){ - featureSettingsItems.items[5].icon = ICONCHAR_PAGEUP; - featureSettingsItems.items[6].icon = ICONCHAR_BACKGROUND; - } - else - { - featureSettingsItems.items[5].icon = ICONCHAR_PAGEUP; - featureSettingsItems.items[6].icon = ICONCHAR_PAGEDOWN; + break; + + case KEY_ICON_6: + if(FE_PAGE_COUNT > 1){ + if (fe_cur_page < FE_PAGE_COUNT - 1){ + fe_cur_page++; + loadFeatureSettings(); + menuRefreshListPage(); } } - //menuDrawListItem(&featureSettingsItems.items[5],5); - //menuDrawListItem(&featureSettingsItems.items[6],6); - + break; + + case KEY_ICON_7: + infoMenu.cur--; + break; + default: + if(key_num < LISTITEM_PER_PAGE){ + updateFeatureSettings(key_num); + menuDrawListItem(&featureSettingsItems.items[key_num],key_num); + } + break; } + loopProcess(); +} - void menuFeatureSettings(void) - { - KEY_VALUES key_num = KEY_IDLE; - SETTINGS now = infoSettings; - fe_cur_page = 0; - loadFeatureSettings(); - menuDrawListPage(&featureSettingsItems); - - while (infoMenu.menu[infoMenu.cur] == menuFeatureSettings) - { - key_num = menuKeyGetValue(); - switch (key_num) - { - case KEY_ICON_5: - if(FE_PAGE_COUNT > 1){ - if (fe_cur_page > 0){ - fe_cur_page--; - loadFeatureSettings(); - menuRefreshListPage(); - } - } - break; - - case KEY_ICON_6: - if(FE_PAGE_COUNT > 1){ - if (fe_cur_page < FE_PAGE_COUNT - 1){ - fe_cur_page++; - loadFeatureSettings(); - menuRefreshListPage(); - } - } - break; - - case KEY_ICON_7: - infoMenu.cur--; - break; - default: - if(key_num < LISTITEM_PER_PAGE){ - updateFeatureSettings(key_num); - menuDrawListItem(&featureSettingsItems.items[key_num],key_num); - } - break; - } - - loopProcess(); - } + if(memcmp(&now, &infoSettings, sizeof(SETTINGS))) + { + storePara(); + } +} - if(memcmp(&now, &infoSettings, sizeof(SETTINGS))) - { - storePara(); - } - } - -#endif diff --git a/TFT/src/User/Menu/Heat.c b/TFT/src/User/Menu/Heat.c index ef1907d513..c628e06c3a 100644 --- a/TFT/src/User/Menu/Heat.c +++ b/TFT/src/User/Menu/Heat.c @@ -266,20 +266,24 @@ void menuHeat(void) update_time=300; } +u32 lastHeatCheckTime = 0; +void updateLastHeatCheckTime(void) +{ + lastHeatCheckTime = OS_GetTime(); +} + void loopCheckHeater(void) { u8 i; - static u32 nowTime=0; do { /* Send M105 query temperature continuously */ - if(update_waiting == true) {nowTime=OS_GetTime();break;} - if(OS_GetTime() 1){ if (gc_cur_page > 0){ gc_cur_page--; + loaditemsCustomGcode(); menuRefreshListPage(); } } @@ -303,6 +304,7 @@ void menuCustom(void) if(GC_PAGE_COUNT > 1){ if (gc_cur_page < GC_PAGE_COUNT-1){ gc_cur_page++; + loaditemsCustomGcode(); menuRefreshListPage(); } } diff --git a/TFT/src/User/Menu/Mode.c b/TFT/src/User/Menu/Mode.c index 5b083220f7..7fa48938a7 100644 --- a/TFT/src/User/Menu/Mode.c +++ b/TFT/src/User/Menu/Mode.c @@ -1,23 +1,23 @@ #include "Mode.h" #include "includes.h" +bool serialHasBeenInitialized = false; void Serial_ReSourceDeInit(void) { + if (!serialHasBeenInitialized) return; + serialHasBeenInitialized = false; memset(&infoHost, 0, sizeof(infoHost)); resetInfoFile(); SD_DeInit(); -#ifdef BUZZER_PIN - Buzzer_DeConfig(); -#endif Serial_DeInit(); } void Serial_ReSourceInit(void) { -#ifdef BUZZER_PIN - Buzzer_Config(); -#endif + if (serialHasBeenInitialized) return; + serialHasBeenInitialized = true; + Serial_Init(infoSettings.baudrate); #ifdef U_DISK_SUPPROT @@ -27,16 +27,23 @@ void Serial_ReSourceInit(void) void infoMenuSelect(void) { + #ifdef CLEAN_MODE_SWITCHING_SUPPORT + Serial_ReSourceInit(); + #endif infoMenu.cur = 0; switch(infoSettings.mode) { case SERIAL_TSC: { - #ifdef LED_color_PIN - led_color_Init(6,5);// - ws2812_send_DAT(LED_OFF); - #endif - Serial_ReSourceInit(); + + #ifndef CLEAN_MODE_SWITCHING_SUPPORT + Serial_ReSourceInit(); + #endif + + #ifdef BUZZER_PIN + Buzzer_Config(); + #endif + GUI_SetColor(FONT_COLOR); GUI_SetBkColor(BACKGROUND_COLOR); infoMenu.menu[infoMenu.cur] = menuStatus; //status screen as default screen on boot @@ -56,14 +63,22 @@ void infoMenuSelect(void) } #ifdef ST7920_SPI + case LCD12864: + + #ifdef BUZZER_PIN + Buzzer_DeConfig(); // Disable buzzer in LCD12864 Simulations mode. + #endif + #ifdef LED_color_PIN - LED_color_PIN_IPN();//// - #endif + knob_LED_DeInit(); + #endif + GUI_SetColor(ST7920_FNCOLOR); GUI_SetBkColor(ST7920_BKCOLOR); infoMenu.menu[infoMenu.cur] = menuST7920; break; + #endif } } @@ -96,7 +111,9 @@ void menuMode(void) GUI_Clear(BACKGROUND_COLOR); //RADIO_Create(&modeRadio); - Serial_ReSourceDeInit(); + #ifndef CLEAN_MODE_SWITCHING_SUPPORT + Serial_ReSourceDeInit(); + #endif show_selectICON(); TSC_ReDrawIcon = NULL; // Disable icon redraw callback function @@ -128,7 +145,10 @@ void menuMode(void) } LCD_LoopEncoder(); - + #ifdef CLEAN_MODE_SWITCHING_SUPPORT + loopBackEnd(); + #endif + if(key_num==MKEY_1) { Touch_Sw(2); diff --git a/TFT/src/User/Menu/More.c b/TFT/src/User/Menu/More.c index 719a7956bb..5107f93cd0 100644 --- a/TFT/src/User/Menu/More.c +++ b/TFT/src/User/Menu/More.c @@ -29,13 +29,13 @@ MENUITEMS moreItems = { // title LABEL_MORE, // icon label - {{ICON_FAN, LABEL_FAN}, - {ICON_RGB_SETTINGS, LABEL_RGB_SETTINGS}, + {{ICON_HEAT, LABEL_HEAT}, + {ICON_FAN, LABEL_FAN}, {ICON_EXTRUDE, LABEL_EXTRUDE}, + {ICON_PERCENTAGE, LABEL_PERCENTAGE}, + {ICON_BABYSTEP, LABEL_BABYSTEP}, {ICON_FEATURE_SETTINGS, LABEL_FEATURE_SETTINGS}, - {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_BACKGROUND, LABEL_BACKGROUND}, + {ICON_RGB_SETTINGS, LABEL_RGB_SETTINGS}, {ICON_BACK, LABEL_BACK},} }; @@ -50,11 +50,11 @@ void menuMore(void) switch(key_num) { case KEY_ICON_0: - infoMenu.menu[++infoMenu.cur] = menuFan; + infoMenu.menu[++infoMenu.cur] = menuHeat; break; - + case KEY_ICON_1: - infoMenu.menu[++infoMenu.cur] = menuRGBSettings; + infoMenu.menu[++infoMenu.cur] = menuFan; break; case KEY_ICON_2: @@ -65,9 +65,21 @@ void menuMore(void) break; case KEY_ICON_3: + infoMenu.menu[++infoMenu.cur] = menuSpeed; + break; + + case KEY_ICON_4: + infoMenu.menu[++infoMenu.cur] = menuBabyStep; + break; + + case KEY_ICON_5: infoMenu.menu[++infoMenu.cur] = menuFeatureSettings; break; + case KEY_ICON_6: + infoMenu.menu[++infoMenu.cur] = menuRGBSettings; + break; + case KEY_ICON_7: infoMenu.cur--; break; diff --git a/TFT/src/User/Menu/Move.c b/TFT/src/User/Menu/Move.c index 7ed3517149..544a506d31 100644 --- a/TFT/src/User/Menu/Move.c +++ b/TFT/src/User/Menu/Move.c @@ -4,37 +4,12 @@ //const GUI_RECT RecXYZ = {START_X + 1*ICON_WIDTH, STATUS_GANTRY_YOFFSET, // 4*ICON_WIDTH+3*SPACE_X+START_X,ICON_START_Y-STATUS_GANTRY_YOFFSET}; -#ifdef MENU_LIST_MODE - #define YGCODE_INC "G1 Y%.1f\n" - #define YGCODE_DEC "G1 Y-%.1f\n" - #define ZGCODE_INC "G1 Z%.1f\n" - #define ZGCODE_DEC "G1 Z-%.1f\n" -#else - #ifdef INVERT_YAXIS - #define LABEL_YAXIS_UP LABEL_Y_DEC - #define LABEL_YAXIS_DOWN LABEL_Y_INC - #define YGCODE_UP "G1 Y-%.1f\n" - #define YGCODE_DOWN "G1 Y%.1f\n" - #else - #define LABEL_YAXIS_UP LABEL_Y_INC - #define LABEL_YAXIS_DOWN LABEL_Y_DEC - #define YGCODE_UP "G1 Y%.1f\n" - #define YGCODE_DOWN "G1 Y-%.1f\n" - #endif - - #ifdef INVERT_ZAXIS - #define LABEL_ZAXIS_UP LABEL_Z_DEC - #define LABEL_ZAXIS_DOWN LABEL_Z_INC - #define ZGCODE_UP "G1 Z-%.1f\n" - #define ZGCODE_DOWN "G1 Z%.1f\n" - #else - #define LABEL_ZAXIS_UP LABEL_Z_INC - #define LABEL_ZAXIS_DOWN LABEL_Z_DEC - #define ZGCODE_UP "G1 Z%.1f\n" - #define ZGCODE_DOWN "G1 Z-%.1f\n" - #endif -#endif + #define YGCODE_INC "G1 Y%.1f\n" + #define YGCODE_DEC "G1 Y-%.1f\n" + #define ZGCODE_INC "G1 Z%.1f\n" + #define ZGCODE_DEC "G1 Z-%.1f\n" + //1 title, ITEM_PER_PAGE item MENUITEMS moveItems = { @@ -43,45 +18,23 @@ LABEL_MOVE, // icon label { #ifdef ALTERNATIVE_MOVE_MENU - #ifdef MENU_LIST_MODE - {ICON_Z_DEC, LABEL_Z_DEC}, - {ICON_Y_INC, LABEL_Y_INC}, - {ICON_Z_INC, LABEL_Z_INC}, - {ICON_1_MM, LABEL_1_MM}, - {ICON_X_DEC, LABEL_X_DEC}, - {ICON_Y_DEC, LABEL_Y_DEC}, - {ICON_X_INC, LABEL_X_INC}, - {ICON_BACK, LABEL_BACK}, - #else - {ICON_Z_DEC, LABEL_Z_DEC}, - {ICON_Y_INC, LABEL_YAXIS_UP}, - {ICON_Z_INC, LABEL_Z_INC}, - {ICON_1_MM, LABEL_1_MM}, - {ICON_X_DEC, LABEL_X_DEC}, - {ICON_Y_DEC, LABEL_YAXIS_DOWN}, - {ICON_X_INC, LABEL_X_INC}, - {ICON_BACK, LABEL_BACK}, - #endif - #else - #ifdef MENU_LIST_MODE - {ICON_X_INC, LABEL_X_INC}, + {ICON_Z_DEC, LABEL_Z_DEC}, {ICON_Y_INC, LABEL_Y_INC}, {ICON_Z_INC, LABEL_Z_INC}, {ICON_1_MM, LABEL_1_MM}, {ICON_X_DEC, LABEL_X_DEC}, {ICON_Y_DEC, LABEL_Y_DEC}, - {ICON_Z_DEC, LABEL_Z_DEC}, + {ICON_X_INC, LABEL_X_INC}, {ICON_BACK, LABEL_BACK}, - #else + #else {ICON_X_INC, LABEL_X_INC}, - {ICON_Y_INC, LABEL_YAXIS_UP}, - {ICON_Z_INC, LABEL_ZAXIS_UP}, + {ICON_Y_INC, LABEL_Y_INC}, + {ICON_Z_INC, LABEL_Z_INC}, {ICON_1_MM, LABEL_1_MM}, {ICON_X_DEC, LABEL_X_DEC}, - {ICON_Y_DEC, LABEL_YAXIS_DOWN}, - {ICON_Z_DEC, LABEL_ZAXIS_DOWN}, + {ICON_Y_DEC, LABEL_Y_DEC}, + {ICON_Z_DEC, LABEL_Z_DEC}, {ICON_BACK, LABEL_BACK}, - #endif #endif } }; @@ -94,6 +47,7 @@ const ITEM itemMoveLen[ITEM_MOVE_LEN_NUM] = { {ICON_1_MM, LABEL_1_MM}, {ICON_10_MM, LABEL_10_MM}, }; + const float item_move_len[ITEM_MOVE_LEN_NUM] = {0.1f, 1, 10}; static u8 item_move_len_i = 1; @@ -103,29 +57,38 @@ static u32 update_time = 50; // 1 seconds is 100 void menuMove(void) { KEY_VALUES key_num = KEY_IDLE; - - + char * y_axis_up; + char * y_axis_down; + char * z_axis_up; + char * z_axis_down; + #ifdef ALTERNATIVE_MOVE_MENU - #ifdef MENU_LIST_MODE if(infoSettings.invert_yaxis == 1){ moveItems.items[1].label.index = LABEL_Y_DEC; moveItems.items[5].label.index = LABEL_Y_INC; + y_axis_up = YGCODE_DEC; + y_axis_down = YGCODE_INC; } else{ moveItems.items[1].label.index = LABEL_Y_INC; moveItems.items[5].label.index = LABEL_Y_DEC; + y_axis_up = YGCODE_INC; + y_axis_down = YGCODE_DEC; } - if(infoSettings.invert_zaxis == 1){ + + if(infoSettings.invert_zaxis == 1){ moveItems.items[0].label.index = LABEL_Z_INC; moveItems.items[2].label.index = LABEL_Z_DEC; + z_axis_up = ZGCODE_INC; + z_axis_down = ZGCODE_DEC; } else{ moveItems.items[0].label.index = LABEL_Z_DEC; moveItems.items[2].label.index = LABEL_Z_INC; + z_axis_up = ZGCODE_DEC; + z_axis_down = ZGCODE_INC; } - #endif #else - #ifdef MENU_LIST_MODE if(infoSettings.invert_yaxis == 1){ moveItems.items[1].label.index = LABEL_Y_DEC; moveItems.items[5].label.index = LABEL_Y_INC; @@ -142,28 +105,23 @@ void menuMove(void) moveItems.items[2].label.index = LABEL_Z_INC; moveItems.items[6].label.index = LABEL_Z_DEC; } - #endif #endif menuDrawPage(&moveItems); mustStoreCmd("G91\n"); - #ifdef MENU_LIST_MODE - switch (infoSettings.move_speed) - { - case 1: - mustStoreCmd("G1 F%d\n",SPEED_MOVE_SLOW); - break; - case 2: - mustStoreCmd("G1 F%d\n",SPEED_MOVE_FAST); - break; - default: - mustStoreCmd("G1 F%d\n",DEFAULT_SPEED_MOVE); - break; - } - #else + switch (infoSettings.move_speed) + { + case 1: + mustStoreCmd("G1 F%d\n",SPEED_MOVE_SLOW); + break; + case 2: + mustStoreCmd("G1 F%d\n",SPEED_MOVE_FAST); + break; + default: mustStoreCmd("G1 F%d\n",DEFAULT_SPEED_MOVE); - #endif + break; + } mustStoreCmd("M114\n"); drawXYZ(); @@ -174,136 +132,64 @@ void menuMove(void) { #ifdef ALTERNATIVE_MOVE_MENU - case KEY_ICON_0: - #ifdef MENU_LIST_MODE - if(infoSettings.invert_zaxis == 1){ - storeCmd(ZGCODE_INC, item_move_len[item_move_len_i]); - } - else{ - storeCmd(ZGCODE_DEC, item_move_len[item_move_len_i]); - } - #else - storeCmd(ZGCODE_DOWN, item_move_len[item_move_len_i]); break; - #endif - break; + case KEY_ICON_0: + storeCmd(z_axis_up, item_move_len[item_move_len_i]); + break; + + case KEY_ICON_1: + storeCmd(y_axis_up, item_move_len[item_move_len_i]); + break; - case KEY_ICON_1: - #ifdef MENU_LIST_MODE - if(infoSettings.invert_yaxis == 1){ - storeCmd(YGCODE_DEC, item_move_len[item_move_len_i]); - } - else{ - storeCmd(YGCODE_INC, item_move_len[item_move_len_i]); - } - #else - storeCmd(YGCODE_UP, item_move_len[item_move_len_i]); - #endif - break; + case KEY_ICON_2: + storeCmd(z_axis_down, item_move_len[item_move_len_i]); + break; - case KEY_ICON_2: - #ifdef MENU_LIST_MODE - if(infoSettings.invert_zaxis == 1){ - storeCmd(ZGCODE_DEC, item_move_len[item_move_len_i]); - } - else{ - storeCmd(ZGCODE_INC, item_move_len[item_move_len_i]); - } - #else - storeCmd(ZGCODE_UP, item_move_len[item_move_len_i]); break; - #endif - break; + case KEY_ICON_3: + item_move_len_i = (item_move_len_i+1)%ITEM_MOVE_LEN_NUM; + moveItems.items[key_num] = itemMoveLen[item_move_len_i]; + menuDrawItem(&moveItems.items[key_num], key_num); + break; - case KEY_ICON_3: - item_move_len_i = (item_move_len_i+1)%ITEM_MOVE_LEN_NUM; - moveItems.items[key_num] = itemMoveLen[item_move_len_i]; - menuDrawItem(&moveItems.items[key_num], key_num); - break; + case KEY_ICON_4: storeCmd("G1 X-%.1f\n", item_move_len[item_move_len_i]); break; - case KEY_ICON_4: storeCmd("G1 X-%.1f\n", item_move_len[item_move_len_i]); break; + case KEY_ICON_5: + storeCmd(y_axis_down, item_move_len[item_move_len_i]); + break; - case KEY_ICON_5: - #ifdef MENU_LIST_MODE - if(infoSettings.invert_yaxis == 1){ - storeCmd(YGCODE_INC, item_move_len[item_move_len_i]); - } - else{ - storeCmd(YGCODE_DEC, item_move_len[item_move_len_i]); - } - #else - storeCmd(YGCODE_DOWN, item_move_len[item_move_len_i]); - #endif - break; + case KEY_ICON_6: storeCmd("G1 X%.1f\n", item_move_len[item_move_len_i]); break; + case KEY_ICON_7: infoMenu.cur--; break; + default:break; - case KEY_ICON_6: storeCmd("G1 X%.1f\n", item_move_len[item_move_len_i]); break; - case KEY_ICON_7: infoMenu.cur--; break; - default:break; - #else - case KEY_ICON_0: storeCmd("G1 X%.1f\n", item_move_len[item_move_len_i]); break; + case KEY_ICON_0: storeCmd("G1 X%.1f\n", item_move_len[item_move_len_i]); break; - case KEY_ICON_1: - #ifdef MENU_LIST_MODE - if(infoSettings.invert_yaxis == 1){ - storeCmd(YGCODE_DEC, item_move_len[item_move_len_i]); - } - else{ - storeCmd(YGCODE_INC, item_move_len[item_move_len_i]); - } - #else - storeCmd(YGCODE_UP, item_move_len[item_move_len_i]); - #endif - break; + case KEY_ICON_1: + storeCmd(y_axis_up, item_move_len[item_move_len_i]); + break; - case KEY_ICON_2: - #ifdef MENU_LIST_MODE - if(infoSettings.invert_zaxis == 1){ - storeCmd(ZGCODE_DEC, item_move_len[item_move_len_i]); - } - else{ - storeCmd(ZGCODE_INC, item_move_len[item_move_len_i]); - } - #else - storeCmd(ZGCODE_UP, item_move_len[item_move_len_i]); break; - #endif - break; + case KEY_ICON_2: + storeCmd(z_axis_up, item_move_len[item_move_len_i]); + break; - case KEY_ICON_3: - item_move_len_i = (item_move_len_i+1)%ITEM_MOVE_LEN_NUM; - moveItems.items[key_num] = itemMoveLen[item_move_len_i]; - menuDrawItem(&moveItems.items[key_num], key_num); - break; + case KEY_ICON_3: + item_move_len_i = (item_move_len_i+1)%ITEM_MOVE_LEN_NUM; + moveItems.items[key_num] = itemMoveLen[item_move_len_i]; + menuDrawItem(&moveItems.items[key_num], key_num); + break; - case KEY_ICON_4: storeCmd("G1 X-%.1f\n", item_move_len[item_move_len_i]); break; + case KEY_ICON_4: storeCmd("G1 X-%.1f\n", item_move_len[item_move_len_i]); break; - case KEY_ICON_5: - #ifdef MENU_LIST_MODE - if(infoSettings.invert_yaxis == 1){ - storeCmd(YGCODE_INC, item_move_len[item_move_len_i]); - } - else{ - storeCmd(YGCODE_DEC, item_move_len[item_move_len_i]); - } - #else - storeCmd(YGCODE_DOWN, item_move_len[item_move_len_i]); - #endif - break; + case KEY_ICON_5: + storeCmd(y_axis_down, item_move_len[item_move_len_i]); + break; - case KEY_ICON_6: - #ifdef MENU_LIST_MODE - if(infoSettings.invert_zaxis == 1){ - storeCmd(ZGCODE_INC, item_move_len[item_move_len_i]); - } - else{ - storeCmd(ZGCODE_DEC, item_move_len[item_move_len_i]); - } - #else - storeCmd(ZGCODE_DOWN, item_move_len[item_move_len_i]); break; - #endif - break; + case KEY_ICON_6: + storeCmd(z_axis_down, item_move_len[item_move_len_i]); + break; - case KEY_ICON_7: infoMenu.cur--; break; - default:break; + case KEY_ICON_7: infoMenu.cur--; break; + default:break; #endif } loopProcess(); diff --git a/TFT/src/User/Menu/Parametersetting.c b/TFT/src/User/Menu/Parametersetting.c index bd555606b7..2b4a1ae963 100644 --- a/TFT/src/User/Menu/Parametersetting.c +++ b/TFT/src/User/Menu/Parametersetting.c @@ -306,6 +306,7 @@ void parametersetting(void) void temp_Change(void) { + if(infoSettings.persistent_info != 1) return; //static FP_MENU NUM[MAX_MENU_DEPTH]; static int16_t compare [2]; @@ -327,7 +328,8 @@ void temp_Change(void) void show_GlobalInfo(void) { - if(infoHost.connected == false) return; + if(infoSettings.persistent_info != 1) return; + if(infoHost.connected == false || infoMenu.menu[infoMenu.cur] == menuPrinting) return; if(infoMenu.menu[infoMenu.cur] == menuMove || infoMenu.menu[infoMenu.cur] == menuStatus) return; drawGlobalInfo(); diff --git a/TFT/src/User/Menu/Popup.c b/TFT/src/User/Menu/Popup.c index bad3d391d6..08b5fea49f 100644 --- a/TFT/src/User/Menu/Popup.c +++ b/TFT/src/User/Menu/Popup.c @@ -18,13 +18,13 @@ GUI_RECT doubleBtnRect[] ={POPUP_RECT_DOUBLE_CONFIRM, POPUP_RECT_DOUBLE_CANCEL}; WINDOW window = { - POPUP_RECT_WINDOW, // - 10, //ĽԲİ뾶 - 3, //ߵ߿ - 0x5D7B, //ߺͱıɫ - {MAGENTA, 0x5D7B, POPUP_TITLE_HEIGHT}, // ɫ/ɫ/߶ - {WHITE, BLACK, POPUP_TEXT_HEIGHT}, //ı ɫ/ɫ/߶ - {WHITE, GRAY, POPUP_BOTTOM_HEIGHT}, //ײ (ɫ)/ɫ/(߶) + POPUP_RECT_WINDOW, //rectangle position and size of popup window + 10, //Four-corner arc radius + 3, //Outer line width + 0x5D7B, //Outer and title bar background color + {MAGENTA, 0x5D7B, POPUP_TITLE_HEIGHT}, //Title bar font color / background color / height + {WHITE, BLACK, POPUP_TEXT_HEIGHT}, //Message area font color / background color / height + {WHITE, GRAY, POPUP_BOTTOM_HEIGHT}, //Bottom (font color) / background color / (height) }; static BUTTON *windowButton = NULL; @@ -85,6 +85,9 @@ void menuPopup(void) void popupReminder(u8* info, u8* context) { + #ifdef CLEAN_MODE_SWITCHING_SUPPORT + if (infoSettings.mode == LCD12864) return; + #endif popupDrawPage(&bottomSingleBtn , info, context, textSelect(LABEL_CONFIRM), NULL); if(infoMenu.menu[infoMenu.cur] != menuPopup) { diff --git a/TFT/src/User/Menu/Print.c b/TFT/src/User/Menu/Print.c index 0f1d4b4ad6..a27b1e4b7f 100644 --- a/TFT/src/User/Menu/Print.c +++ b/TFT/src/User/Menu/Print.c @@ -1,8 +1,7 @@ #include "Print.h" #include "includes.h" -#ifdef MENU_LIST_MODE - LISTITEMS printItems = { + LISTITEMS printListItems = { // title LABEL_BACKGROUND, // icon ItemType Item Title item value text(only for custom value) @@ -17,9 +16,7 @@ {ICONCHAR_BACK, LIST_LABEL, LABEL_BACKGROUND, LABEL_BACKGROUND},} }; -#else - - MENUITEMS printItems = { + MENUITEMS printIconItems = { // title LABEL_BACKGROUND, // icon label @@ -34,61 +31,52 @@ {ICON_BACK, LABEL_BACK}, } }; -#endif // File list number per page #define NUM_PER_PAGE 5 SCROLL titleScroll; -GUI_RECT titleRect={10, (TITLE_END_Y - BYTE_HEIGHT) / 2, LCD_WIDTH-10, (TITLE_END_Y - BYTE_HEIGHT) / 2 + BYTE_HEIGHT}; +const GUI_RECT titleRect={10, (TITLE_END_Y - BYTE_HEIGHT) / 2, LCD_WIDTH-10, (TITLE_END_Y - BYTE_HEIGHT) / 2 + BYTE_HEIGHT}; SCROLL gcodeScroll; - -#ifndef MENU_LIST_MODE -/* GUI_RECT gcodeRect[NUM_PER_PAGE] = { - {START_X + BYTE_HEIGHT + 4, 0*LISTITEM_HEIGHT+ICON_START_Y+1, LISTITEM_WIDTH+START_X - 2, 1*LISTITEM_HEIGHT+ICON_START_Y-1}, - {START_X + BYTE_HEIGHT + 4, 1*LISTITEM_HEIGHT+ICON_START_Y+1, LISTITEM_WIDTH+START_X - 2, 2*LISTITEM_HEIGHT+ICON_START_Y-1}, - {START_X + BYTE_HEIGHT + 4, 2*LISTITEM_HEIGHT+ICON_START_Y+1, LISTITEM_WIDTH+START_X - 2, 3*LISTITEM_HEIGHT+ICON_START_Y-1}, - {START_X + BYTE_HEIGHT + 4, 3*LISTITEM_HEIGHT+ICON_START_Y+1, LISTITEM_WIDTH+START_X - 2, 4*LISTITEM_HEIGHT+ICON_START_Y-1}, - {START_X + BYTE_HEIGHT + 4, 4*LISTITEM_HEIGHT+ICON_START_Y+1, LISTITEM_WIDTH+START_X - 2, 5*LISTITEM_HEIGHT+ICON_START_Y-1}, - }; -#else */ - GUI_RECT gcodeRect[NUM_PER_PAGE] = { - {BYTE_WIDTH/2+0*SPACE_X_PER_ICON, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, - 1*SPACE_X_PER_ICON-BYTE_WIDTH/2, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, +bool icon_pre = false; - {BYTE_WIDTH/2+1*SPACE_X_PER_ICON, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, - 2*SPACE_X_PER_ICON-BYTE_WIDTH/2, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, +const GUI_RECT gcodeRect[NUM_PER_PAGE] = { + {BYTE_WIDTH/2+0*SPACE_X_PER_ICON, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, + 1*SPACE_X_PER_ICON-BYTE_WIDTH/2, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, - {BYTE_WIDTH/2+2*SPACE_X_PER_ICON, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, - 3*SPACE_X_PER_ICON-BYTE_WIDTH/2, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, + {BYTE_WIDTH/2+1*SPACE_X_PER_ICON, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, + 2*SPACE_X_PER_ICON-BYTE_WIDTH/2, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, - {BYTE_WIDTH/2+3*SPACE_X_PER_ICON, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, - 4*SPACE_X_PER_ICON-BYTE_WIDTH/2, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, + {BYTE_WIDTH/2+2*SPACE_X_PER_ICON, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, + 3*SPACE_X_PER_ICON-BYTE_WIDTH/2, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, - {BYTE_WIDTH/2+0*SPACE_X_PER_ICON, 2*ICON_HEIGHT+1*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, - 1*SPACE_X_PER_ICON-BYTE_WIDTH/2, 2*ICON_HEIGHT+1*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, - }; + {BYTE_WIDTH/2+3*SPACE_X_PER_ICON, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, + 4*SPACE_X_PER_ICON-BYTE_WIDTH/2, 1*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, + + {BYTE_WIDTH/2+0*SPACE_X_PER_ICON, 2*ICON_HEIGHT+1*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2, + 1*SPACE_X_PER_ICON-BYTE_WIDTH/2, 2*ICON_HEIGHT+1*SPACE_Y+ICON_START_Y+(SPACE_Y-BYTE_HEIGHT)/2+BYTE_HEIGHT}, +}; - void scrollFileNameCreate(u8 i) - { - u8 num=infoFile.cur_page * NUM_PER_PAGE + i; +void scrollFileNameCreate(u8 i) +{ + u8 num=infoFile.cur_page * NUM_PER_PAGE + i; - if(infoFile.F_num + infoFile.f_num==0) - { - memset(&gcodeScroll,0,sizeof(SCROLL)); - return; - } - if(numx0, rect->y0, rect->x1, rect->y1); - #ifdef MENU_LIST_MODE - GUI_DispString(rect->x0, rect->y0 + (rect->y1 - rect->y0 - BYTE_HEIGHT)/2, name); - #else - GUI_DispStringInPrect(rect, name); - #endif + GUI_DispString(rect->x0, rect->y0 + (rect->y1 - rect->y0 - BYTE_HEIGHT)/2, name); GUI_CancelRange(); } -u8 show_Num = 0; -bool icon_pre = true; -int16_t icon_Enum[25]; -char * icon_File_Name[25]; +bool get_Pre_Icon(void) +{ + return icon_pre; +} + -int16_t get_Pre_Icon(char * filename) +void gocdeIconDraw(void) { - for(u8 i=0;i=KEY_LABEL_0 && key_num <= KEY_LABEL_4) - { - if(key_num - KEY_LABEL_0 + infoFile.cur_page * NUM_PER_PAGE < infoFile.F_num + infoFile.f_num) - { - normalNameDisp(gcodeScroll.rect, gcodeScroll.text); - scrollFileNameCreate(key_num - KEY_LABEL_0); + { + if(infoSettings.file_listmode != true){ + if(key_num - KEY_LABEL_0 + infoFile.cur_page * NUM_PER_PAGE < infoFile.F_num + infoFile.f_num) + { + normalNameDisp(gcodeScroll.rect, gcodeScroll.text); + scrollFileNameCreate(key_num - KEY_LABEL_0); + } } } - #endif break; } if(update) { update=0; - gocdeListDraw(); + + if(infoSettings.file_listmode != true){ + gocdeIconDraw(); + } + else{ + gocdeListDraw(); + } } #ifdef SD_CD_PIN diff --git a/TFT/src/User/Menu/Print.h b/TFT/src/User/Menu/Print.h index 819876c716..e9a34b620f 100644 --- a/TFT/src/User/Menu/Print.h +++ b/TFT/src/User/Menu/Print.h @@ -4,6 +4,6 @@ void menuPrintFromSource(void); void menuPrint(void); -int16_t get_Pre_Icon(char * filename); +bool get_Pre_Icon(void); #endif diff --git a/TFT/src/User/Menu/Printing.c b/TFT/src/User/Menu/Printing.c index 01c8ce6a64..dc225b8984 100644 --- a/TFT/src/User/Menu/Printing.c +++ b/TFT/src/User/Menu/Printing.c @@ -1,21 +1,71 @@ #include "Printing.h" #include "includes.h" +const GUI_POINT printinfo_points[6] = { +{START_X + PICON_LG_WIDTH*0 + PICON_SPACE_X*0, ICON_START_Y + PICON_HEIGHT*0 + PICON_SPACE_Y*0}, +{START_X + PICON_LG_WIDTH*1 + PICON_SPACE_X*1, ICON_START_Y + PICON_HEIGHT*0 + PICON_SPACE_Y*0}, +{START_X + PICON_LG_WIDTH*2 + PICON_SPACE_X*2, ICON_START_Y + PICON_HEIGHT*0 + PICON_SPACE_Y*0}, +{START_X + PICON_LG_WIDTH*0 + PICON_SPACE_X*0, ICON_START_Y + PICON_HEIGHT*1 + PICON_SPACE_Y*1}, +{START_X + PICON_LG_WIDTH*1 + PICON_SPACE_X*1, ICON_START_Y + PICON_HEIGHT*1 + PICON_SPACE_Y*1}, +{START_X + PICON_LG_WIDTH*2 + PICON_SPACE_X*2, ICON_START_Y + PICON_HEIGHT*1 + PICON_SPACE_Y*1}, +}; + +const GUI_RECT printinfo_val_rect[6] = { + {START_X + PICON_LG_WIDTH*0 + PICON_SPACE_X*0 + PICON_VAL_X, ICON_START_Y + PICON_HEIGHT*0 + PICON_SPACE_Y*0 + PICON_VAL_Y, + START_X + PICON_LG_WIDTH*0 + PICON_SPACE_X*0 + PICON_VAL_LG_EX, ICON_START_Y + PICON_HEIGHT*0 + PICON_SPACE_Y*0 + PICON_VAL_Y + BYTE_HEIGHT}, + + {START_X + PICON_LG_WIDTH*1 + PICON_SPACE_X*1 + PICON_VAL_X, ICON_START_Y + PICON_HEIGHT*0 + PICON_SPACE_Y*0 + PICON_VAL_Y, + START_X + PICON_LG_WIDTH*1 + PICON_SPACE_X*1 + PICON_VAL_LG_EX, ICON_START_Y + PICON_HEIGHT*0 + PICON_SPACE_Y*0 + PICON_VAL_Y + BYTE_HEIGHT}, + + {START_X + PICON_LG_WIDTH*2 + PICON_SPACE_X*2 + PICON_VAL_X, ICON_START_Y + PICON_HEIGHT*0 + PICON_SPACE_Y*0 + PICON_VAL_Y, + START_X + PICON_LG_WIDTH*2 + PICON_SPACE_X*2 + PICON_VAL_SM_EX, ICON_START_Y + PICON_HEIGHT*0 + PICON_SPACE_Y*0 + PICON_VAL_Y + BYTE_HEIGHT}, + + {START_X + PICON_LG_WIDTH*0 + PICON_SPACE_X*0 + PICON_VAL_X, ICON_START_Y + PICON_HEIGHT*1 + PICON_SPACE_Y*1 + PICON_VAL_Y, + START_X + PICON_LG_WIDTH*0 + PICON_SPACE_X*0 + PICON_VAL_LG_EX, ICON_START_Y + PICON_HEIGHT*1 + PICON_SPACE_Y*1 + PICON_VAL_Y + BYTE_HEIGHT}, + + {START_X + PICON_LG_WIDTH*1 + PICON_SPACE_X*1 + PICON_VAL_X, ICON_START_Y + PICON_HEIGHT*1 + PICON_SPACE_Y*1 + PICON_VAL_Y, + START_X + PICON_LG_WIDTH*1 + PICON_SPACE_X*1 + PICON_VAL_LG_EX, ICON_START_Y + PICON_HEIGHT*1 + PICON_SPACE_Y*1 + PICON_VAL_Y + BYTE_HEIGHT}, + + {START_X + PICON_LG_WIDTH*2 + PICON_SPACE_X*2 + PICON_VAL_X, ICON_START_Y + PICON_HEIGHT*1 + PICON_SPACE_Y*1 + PICON_VAL_Y, + START_X + PICON_LG_WIDTH*2 + PICON_SPACE_X*2 + PICON_VAL_SM_EX, ICON_START_Y + PICON_HEIGHT*1 + PICON_SPACE_Y*1 + PICON_VAL_Y + BYTE_HEIGHT}, +}; + +static u32 nowTime = 0; +static u32 toggle_time = 200; // 1 seconds is 100 +TOOL c_Ext = NOZZLE0; +static int c_fan = 0; +static int c_speedID = 0; +static int key_pause = 4; +const char* Speed_ID[2] = {"Speed","Flow"}; +#define LAYER_TITLE "Layer" +#define EXT_ICON_POS 0 +#define BED_ICON_POS 1 +#define FAN_ICON_POS 2 +#define TIM_ICON_POS 3 +#define Z_ICON_POS 4 +#define SPD_ICON_POS 5 + +#ifdef RAPID_SERIAL_COMM +#define rapid_serial_loop() loopBackEnd() +#else +#define rapid_serial_loop() +#endif //1title, ITEM_PER_PAGE item(icon + label) MENUITEMS printingItems = { // title LABEL_BACKGROUND, // icon label - {{ICON_PAUSE, LABEL_PAUSE}, + {{ICON_BACKGROUND, LABEL_BACKGROUND}, + {ICON_BACKGROUND, LABEL_BACKGROUND}, {ICON_BACKGROUND, LABEL_BACKGROUND}, {ICON_BACKGROUND, LABEL_BACKGROUND}, - {ICON_STOP, LABEL_STOP}, - {ICON_HEAT, LABEL_HEAT}, - {ICON_PERCENTAGE, LABEL_PERCENTAGE}, + {ICON_PAUSE, LABEL_PAUSE}, {ICON_BABYSTEP, LABEL_BABYSTEP}, - {ICON_MORE, LABEL_MORE},} + {ICON_MORE, LABEL_MORE}, + {ICON_STOP, LABEL_STOP},} }; - +const ITEM itemBlank = {ICON_BACKGROUND, LABEL_BACKGROUND}; +const ITEM itemBabyStep = {ICON_BABYSTEP, LABEL_BABYSTEP}; const ITEM itemIsPause[2] = { // icon label {ICON_PAUSE, LABEL_PAUSE}, @@ -97,13 +147,12 @@ void printSetUpdateWaiting(bool isWaiting) void startGcodeExecute(void) { - + mustStoreCmd(PRINT_START_GCODE); } void endGcodeExecute(void) { - mustStoreCmd("G90\n"); - mustStoreCmd("G92 E0\n"); + for(TOOL i = BED; i < HEATER_NUM; i++) { mustStoreCmd("%s S0\n", heatCmd[i]); @@ -112,8 +161,7 @@ void endGcodeExecute(void) { mustStoreCmd("%s S0\n", fanCmd[i]); } - mustStoreCmd("T0\n"); - mustStoreCmd("M18\n"); + mustStoreCmd(PRINT_END_GCODE); } //only return gcode file name except path @@ -185,8 +233,9 @@ void menuBeforePrinting(void) infoPrinting.size = f_size(&infoPrinting.file); infoPrinting.cur = infoPrinting.file.fptr; - - startGcodeExecute(); + if(infoSettings.send_start_gcode == 1){ + startGcodeExecute(); + } break; } infoPrinting.printing = true; @@ -198,8 +247,8 @@ void menuBeforePrinting(void) void resumeToPause(bool is_pause) { if(infoMenu.menu[infoMenu.cur] != menuPrinting) return; - printingItems.items[KEY_ICON_0] = itemIsPause[is_pause]; - menuDrawItem(&itemIsPause[is_pause],0); + printingItems.items[key_pause] = itemIsPause[is_pause]; + menuDrawItem(&printingItems.items[key_pause],key_pause); } void setM0Pause(bool m0_pause){ @@ -251,7 +300,9 @@ bool setPrintPause(bool is_pause, bool is_m0pause) if (isExtrudeRelative == true) mustStoreCmd("M82\n"); if (heatGetCurrentTemp(heatGetCurrentToolNozzle()) > PREVENT_COLD_EXTRUSION_MINTEMP) + { mustStoreCmd("G1 E%.5f F%d\n", tmp.axis[E_AXIS] - NOZZLE_PAUSE_RETRACT_LENGTH, NOZZLE_PAUSE_E_FEEDRATE); + } if (coordinateIsClear()) { mustStoreCmd("G1 Z%.3f F%d\n", tmp.axis[Z_AXIS] + NOZZLE_PAUSE_Z_RAISE, NOZZLE_PAUSE_Z_FEEDRATE); @@ -263,10 +314,11 @@ bool setPrintPause(bool is_pause, bool is_m0pause) } else { - if(isM0_Pause() == true) { - setM0Pause(is_m0pause); - Serial_Puts(SERIAL_PORT, "M108\n"); - break; + if(isM0_Pause() == true) + { + setM0Pause(is_m0pause); + Serial_Puts(SERIAL_PORT, "M108\n"); + break; } if (isCoorRelative == true) mustStoreCmd("G90\n"); if (isExtrudeRelative == true) mustStoreCmd("M82\n"); @@ -277,7 +329,9 @@ bool setPrintPause(bool is_pause, bool is_m0pause) mustStoreCmd("G1 Z%.3f F%d\n", tmp.axis[Z_AXIS], NOZZLE_PAUSE_Z_FEEDRATE); } if(heatGetCurrentTemp(heatGetCurrentToolNozzle()) > PREVENT_COLD_EXTRUSION_MINTEMP) + { mustStoreCmd("G1 E%.5f F%d\n", tmp.axis[E_AXIS] - NOZZLE_PAUSE_RETRACT_LENGTH + NOZZLE_RESUME_PURGE_LENGTH, NOZZLE_PAUSE_E_FEEDRATE); + } mustStoreCmd("G92 E%.5f\n", tmp.axis[E_AXIS]); mustStoreCmd("G1 F%d\n", tmp.feedrate); @@ -297,167 +351,302 @@ const GUI_RECT progressRect = {1*SPACE_X_PER_ICON, 0*ICON_HEIGHT+0*SPACE_Y+ICON_ #define BED_X (progressRect.x1 - 9 * BYTE_WIDTH) #define TEMP_Y (progressRect.y1 + 3) #define TIME_Y (TEMP_Y + 1 * BYTE_HEIGHT + 3) -void reValueNozzle(void) + +void reValueNozzle(int icon_pos) +{ + char tempstr[10]; + my_sprintf(tempstr, "%d/%d", heatGetCurrentTemp(c_Ext), heatGetTargetTemp(c_Ext)); + + GUI_SetTextMode(GUI_TEXTMODE_TRANS); + + ICON_CustomReadDisplay(printinfo_points[icon_pos].x,printinfo_points[icon_pos].y,PICON_LG_WIDTH,PICON_HEIGHT,ICON_ADDR(ICON_PRINTING_NOZZLE)); + GUI_DispString(printinfo_points[icon_pos].x + PICON_TITLE_X, printinfo_points[icon_pos].y + PICON_TITLE_Y, (u8* )heatDisplayID[c_Ext]); + GUI_DispStringInPrect(&printinfo_val_rect[icon_pos], (u8 *)tempstr); + + GUI_SetTextMode(GUI_TEXTMODE_NORMAL); +} + +void reValueBed(int icon_pos) +{ + char tempstr[10]; + my_sprintf(tempstr, "%d/%d", heatGetCurrentTemp(BED), heatGetTargetTemp(BED)); + + GUI_SetTextMode(GUI_TEXTMODE_TRANS); + + ICON_CustomReadDisplay(printinfo_points[icon_pos].x,printinfo_points[icon_pos].y,PICON_LG_WIDTH,PICON_HEIGHT,ICON_ADDR(ICON_PRINTING_BED)); + GUI_DispString(printinfo_points[icon_pos].x + PICON_TITLE_X, printinfo_points[icon_pos].y + PICON_TITLE_Y, (u8* )heatDisplayID[BED]); + GUI_DispStringInPrect(&printinfo_val_rect[icon_pos], (u8 *)tempstr); + + GUI_SetTextMode(GUI_TEXTMODE_NORMAL); +} + +void reDrawFan(int icon_pos) { - GUI_DispString(BED_X, TEMP_Y-2*BYTE_HEIGHT, (u8* )heatDisplayID[heatGetCurrentToolNozzle()]); - GUI_DispDec(BED_X + 2 * BYTE_WIDTH, TEMP_Y-2*BYTE_HEIGHT , heatGetCurrentTemp(heatGetCurrentToolNozzle()), 3, RIGHT); - GUI_DispDec(BED_X + 6 * BYTE_WIDTH, TEMP_Y-2*BYTE_HEIGHT, heatGetTargetTemp(heatGetCurrentToolNozzle()), 3, LEFT); + char tempstr[10]; + u8 fs; + #ifdef SHOW_FAN_PERCENTAGE + fs = (fanGetSpeed(c_fan)*100)/255; + my_sprintf(tempstr, "%d%%", fs); + #else + fs = fanSpeed[curIndex]; + my_sprintf(tempstr, "%d", fs); + #endif + + GUI_SetTextMode(GUI_TEXTMODE_TRANS); + + ICON_CustomReadDisplay(printinfo_points[icon_pos].x,printinfo_points[icon_pos].y,PICON_SM_WIDTH,PICON_HEIGHT,ICON_ADDR(ICON_PRINTING_FAN)); + GUI_DispString(printinfo_points[icon_pos].x + PICON_TITLE_X, printinfo_points[icon_pos].y + PICON_TITLE_Y, (u8*)fanID[c_fan]); + GUI_DispStringInPrect(&printinfo_val_rect[icon_pos], (u8 *)tempstr); + + GUI_SetTextMode(GUI_TEXTMODE_NORMAL); } -void reValueBed(void) + +void reDrawSpeed(int icon_pos) { - GUI_DispDec(BED_X + 2 * BYTE_WIDTH, TEMP_Y-BYTE_HEIGHT, heatGetCurrentTemp(BED), 3, RIGHT); - GUI_DispDec(BED_X + 6 * BYTE_WIDTH, TEMP_Y-BYTE_HEIGHT, heatGetTargetTemp(BED), 3, LEFT); + char tempstr[10]; + GUI_SetTextMode(GUI_TEXTMODE_TRANS); + + my_sprintf(tempstr, "%d%%", speedGetPercent(c_speedID) ); + + if(c_speedID == 0){ + ICON_CustomReadDisplay(printinfo_points[icon_pos].x,printinfo_points[icon_pos].y,PICON_SM_WIDTH,PICON_HEIGHT,ICON_ADDR(ICON_PRINTING_SPEED)); + } + else{ + ICON_CustomReadDisplay(printinfo_points[icon_pos].x,printinfo_points[icon_pos].y,PICON_SM_WIDTH,PICON_HEIGHT,ICON_ADDR(ICON_PRINTING_FLOW)); + } + GUI_DispString(printinfo_points[icon_pos].x + PICON_TITLE_X, printinfo_points[icon_pos].y + PICON_TITLE_Y, (u8 *)Speed_ID[c_speedID]); + GUI_DispStringInPrect(&printinfo_val_rect[icon_pos], (u8 *)tempstr); + + GUI_SetTextMode(GUI_TEXTMODE_NORMAL); } -void reDrawTime(void) +void reDrawTime(int icon_pos) { u8 hour = infoPrinting.time/3600, min = infoPrinting.time%3600/60, sec = infoPrinting.time%60; + GUI_SetNumMode(GUI_NUMMODE_ZERO); - GUI_DispDec(progressRect.x0 + 2 * BYTE_WIDTH, TIME_Y, hour, 2, RIGHT); - GUI_DispDec(progressRect.x0 + 5 * BYTE_WIDTH, TIME_Y, min, 2, RIGHT); - GUI_DispDec(progressRect.x0 + 8 * BYTE_WIDTH, TIME_Y, sec, 2, RIGHT); + GUI_SetTextMode(GUI_TEXTMODE_TRANS); + char tempstr[10]; + sprintf(tempstr, "%02d:%02d:%02d", hour,min,sec); + ICON_CustomReadDisplay(printinfo_points[icon_pos].x,printinfo_points[icon_pos].y,PICON_LG_WIDTH,PICON_HEIGHT,ICON_ADDR(ICON_PRINTING_TIMER)); + GUI_DispStringInPrect(&printinfo_val_rect[icon_pos], (u8 *)tempstr); + //GUI_DispDec(printinfo_val_rect[icon_pos].x0 + 2 * BYTE_WIDTH, TIME_Y, hour, 2, LEFT); + //GUI_DispDec(printinfo_val_rect[icon_pos].x0 + 5 * BYTE_WIDTH, TIME_Y, min, 2, LEFT); + //GUI_DispDec(printinfo_val_rect[icon_pos].x0 + 8 * BYTE_WIDTH, TIME_Y, sec, 2, LEFT); + GUI_SetNumMode(GUI_NUMMODE_SPACE); + GUI_SetTextMode(GUI_TEXTMODE_NORMAL); } -void reDrawProgress(u8 progress) +void reDrawProgress(int icon_pos) { - char buf[5]; - const GUI_RECT percentageRect = {BED_X, TEMP_Y-3*BYTE_HEIGHT, BED_X+5*BYTE_WIDTH, TEMP_Y-2*BYTE_HEIGHT}; - //GUI_FillRectColor(progressRect.x0, progressRect.y0, progressX, progressRect.y1,BLUE); - //GUI_FillRectColor(progressX, progressRect.y0, progressRect.x1, progressRect.y1,GRAY); - my_sprintf(buf, "%d%%", progress); - //GUI_SetTextMode(GUI_TEXTMODE_TRANS); - GUI_DispStringInPrect(&percentageRect, (u8 *)buf); - //GUI_SetTextMode(GUI_TEXTMODE_NORMAL); + char buf[6]; + my_sprintf(buf, "%d%%", infoPrinting.progress); + + GUI_SetTextMode(GUI_TEXTMODE_TRANS); + + GUI_DispString(printinfo_points[3].x + PICON_TITLE_X, printinfo_points[3].y + PICON_TITLE_Y, (u8 *)buf); + + GUI_SetTextMode(GUI_TEXTMODE_NORMAL); } -extern SCROLL titleScroll; -extern GUI_RECT titleRect; +void reDrawLayer(int icon_pos) +{ + char tempstr[10]; + my_sprintf(tempstr, "%.2fMM",coordinateGetAxisTarget(Z_AXIS)); + + GUI_SetTextMode(GUI_TEXTMODE_TRANS); + + ICON_CustomReadDisplay(printinfo_points[icon_pos].x,printinfo_points[icon_pos].y,PICON_LG_WIDTH,PICON_HEIGHT,ICON_ADDR(ICON_PRINTING_ZLAYER)); + GUI_DispString(printinfo_points[icon_pos].x + PICON_TITLE_X, printinfo_points[icon_pos].y + PICON_TITLE_Y, (u8* )LAYER_TITLE); + GUI_DispStringInPrect(&printinfo_val_rect[icon_pos], (u8 *)tempstr); + + GUI_SetTextMode(GUI_TEXTMODE_NORMAL); +} + +void toggleinfo(void) +{ + if (OS_GetTime() > nowTime + toggle_time) + { + if (EXTRUDER_NUM > 1) + { + c_Ext = (TOOL)((c_Ext + 1) % HEATER_NUM); + if (c_Ext == 0) + { + c_Ext += 1; + } + rapid_serial_loop(); //perform backend printing loop before drawing to avoid printer idling + reValueNozzle(EXT_ICON_POS); + } + + if (FAN_NUM > 1) + { + c_fan = (c_fan + 1) % FAN_NUM; + rapid_serial_loop(); //perform backend printing loop before drawing to avoid printer idling + reDrawFan(FAN_ICON_POS); + } + + c_speedID = (c_speedID + 1) % 2; + nowTime = OS_GetTime(); + rapid_serial_loop(); //perform backend printing loop before drawing to avoid printer idling + reDrawSpeed(SPD_ICON_POS); + } +} + +//extern SCROLL titleScroll; +//extern GUI_RECT titleRect; void printingDrawPage(void) { - int16_t i; - menuDrawPage(&printingItems); + // Scroll_CreatePara(&titleScroll, infoFile.title,&titleRect); // - // printed time - GUI_DispString(progressRect.x0, TIME_Y, (u8* )"T:"); - GUI_DispString(progressRect.x0+BYTE_WIDTH*4, TIME_Y, (u8* )":"); - GUI_DispString(progressRect.x0+BYTE_WIDTH*7, TIME_Y, (u8* )":"); - // nozzle temperature - GUI_DispString(BED_X, TEMP_Y-2*BYTE_HEIGHT ,(u8* )":"); - GUI_DispString(BED_X+BYTE_WIDTH*5, TEMP_Y-2*BYTE_HEIGHT,(u8* )"/"); - // hotbed temperature - GUI_DispString(BED_X, TEMP_Y-BYTE_HEIGHT, (u8* )"B:"); - GUI_DispString(BED_X+BYTE_WIDTH*5, TEMP_Y-BYTE_HEIGHT, (u8* )"/"); - reDrawProgress(infoPrinting.progress); - reValueNozzle(); - reValueBed(); - reDrawTime(); - // z_axis coordinate - GUI_DispString(BED_X,TIME_Y-BYTE_HEIGHT, (u8* )"Z:"); - - i = get_Pre_Icon((char *)getCurGcodeName(infoFile.title)); - if(i != ICON_BACKGROUND) - lcd_frame_display(1*ICON_WIDTH+1*SPACE_X+START_X, 0*ICON_HEIGHT+0*SPACE_Y+ICON_START_Y,ICON_WIDTH,ICON_HEIGHT,ICON_ADDR(i)); + + if(get_Pre_Icon() == true){ + key_pause = 5; + //printingItems.items[key_pause - 1] = itemBlank; + printingItems.items[key_pause - 1].icon = ICON_PREVIEW; + printingItems.items[key_pause - 1].label.index = LABEL_BACKGROUND; + } + else{ + key_pause = 4; + printingItems.items[key_pause+1] = itemBabyStep; + } + + printingItems.items[key_pause] = itemIsPause[isPause()]; + + menuDrawPage(&printingItems); + reValueNozzle(EXT_ICON_POS); + reValueBed(BED_ICON_POS); + reDrawFan(FAN_ICON_POS); + reDrawTime(TIM_ICON_POS); + reDrawProgress(TIM_ICON_POS); + reDrawLayer(Z_ICON_POS); + reDrawSpeed(SPD_ICON_POS); + } void menuPrinting(void) { - KEY_VALUES key_num = KEY_IDLE; + KEY_VALUES key_num = KEY_IDLE; u32 time = 0; - HEATER nowHeat; + HEATER nowHeat; + float curLayer = 0; + u8 nowFan[FAN_NUM] = {0}; + uint16_t curspeed[2] = {0}; memset(&nowHeat, 0, sizeof(HEATER)); - - printingItems.items[KEY_ICON_0] = itemIsPause[infoPrinting.pause]; + printingDrawPage(); + printingItems.items[key_pause] = itemIsPause[infoPrinting.pause]; + while(infoMenu.menu[infoMenu.cur] == menuPrinting) { // Scroll_DispString(&titleScroll, LEFT); //Scroll display file name will take too many CPU cycles + //check nozzle temp change + if (nowHeat.T[c_Ext].current != heatGetCurrentTemp(c_Ext) || nowHeat.T[c_Ext].target != heatGetTargetTemp(c_Ext)) + { + nowHeat.T[c_Ext].current = heatGetCurrentTemp(c_Ext); + nowHeat.T[c_Ext].target = heatGetTargetTemp(c_Ext); + rapid_serial_loop(); //perform backend printing loop before drawing to avoid printer idling + reValueNozzle(EXT_ICON_POS); + } + + //check bed temp change + if (nowHeat.T[BED].current != heatGetCurrentTemp(BED) || nowHeat.T[BED].target != heatGetTargetTemp(BED)) + { + nowHeat.T[BED].current = heatGetCurrentTemp(BED); + nowHeat.T[BED].target = heatGetTargetTemp(BED); + rapid_serial_loop(); //perform backend printing loop before drawing to avoid printer idling + reValueBed(BED_ICON_POS); + } + + //check Fan speed change + if (nowFan[c_fan] != fanGetSpeed(c_fan)) + { + nowFan[c_fan] = fanGetSpeed(c_fan); + rapid_serial_loop(); //perform backend printing loop before drawing to avoid printer idling + reDrawFan(FAN_ICON_POS); + } + + //check printing progress if( infoPrinting.size != 0) { - if(infoPrinting.progress!=limitValue(0,(uint64_t)infoPrinting.cur*100/infoPrinting.size,100)) - { - infoPrinting.progress=limitValue(0,(uint64_t)infoPrinting.cur*100/infoPrinting.size,100); - reDrawProgress(infoPrinting.progress); - } + //check print time change + if(time!=infoPrinting.time || infoPrinting.progress!=limitValue(0,(uint64_t)infoPrinting.cur*100/infoPrinting.size,100) ) + { + time=infoPrinting.time; + infoPrinting.progress=limitValue(0,(uint64_t)infoPrinting.cur*100/infoPrinting.size,100); + rapid_serial_loop(); //perform backend printing loop before drawing to avoid printer idling + reDrawTime(TIM_ICON_POS); + reDrawProgress(TIM_ICON_POS); + } } else { if(infoPrinting.progress != 100) { infoPrinting.progress = 100; - reDrawProgress(infoPrinting.progress); + reDrawTime(TIM_ICON_POS); + reDrawProgress(TIM_ICON_POS); } - } - - if (nowHeat.T[heatGetCurrentToolNozzle()].current != heatGetCurrentTemp(heatGetCurrentToolNozzle()) - || nowHeat.T[heatGetCurrentToolNozzle()].target != heatGetTargetTemp(heatGetCurrentToolNozzle())) - { - nowHeat.T[heatGetCurrentToolNozzle()].current = heatGetCurrentTemp(heatGetCurrentToolNozzle()); - nowHeat.T[heatGetCurrentToolNozzle()].target = heatGetTargetTemp(heatGetCurrentToolNozzle()); - reValueNozzle(); } - if (nowHeat.T[BED].current != heatGetCurrentTemp(BED) - || nowHeat.T[BED].target != heatGetTargetTemp(BED)) - { - nowHeat.T[BED].current = heatGetCurrentTemp(BED); - nowHeat.T[BED].target = heatGetTargetTemp(BED); - reValueBed(); + + + //Z_AXIS coordinate + if(curLayer != coordinateGetAxisTarget(Z_AXIS)){ + curLayer = coordinateGetAxisTarget(Z_AXIS); + rapid_serial_loop(); //perform backend printing loop before drawing to avoid printer idling + reDrawLayer(Z_ICON_POS); } - - if(time!=infoPrinting.time) - { - time=infoPrinting.time; - reDrawTime(); + + //check change in speed or flow + if(curspeed[c_speedID] != speedGetPercent(c_speedID)){ + curspeed[c_speedID] = speedGetPercent(c_speedID); + rapid_serial_loop(); //perform backend printing loop before drawing to avoid printer idling + reDrawSpeed(SPD_ICON_POS); } - //Z_AXIS coordinate - static COORDINATE tmp; - coordinateGetAll(&tmp); - GUI_DispFloat(BED_X+BYTE_WIDTH*2,TIME_Y-BYTE_HEIGHT,tmp.axis[Z_AXIS],3,3,LEFT); key_num = menuKeyGetValue(); switch(key_num) { - case KEY_ICON_0: - setPrintPause(!isPause(),false); - break; - - case KEY_ICON_3: - if(isPrinting()) - infoMenu.menu[++infoMenu.cur] = menuStopPrinting; - else - { - exitPrinting(); - infoMenu.cur--; - } - break; - case KEY_ICON_4: - infoMenu.menu[++infoMenu.cur] = menuHeat; + if(get_Pre_Icon() != true){ + setPrintPause(!isPause(),false); + } break; case KEY_ICON_5: - infoMenu.menu[++infoMenu.cur] = menuSpeed; + if(get_Pre_Icon() == true){ + setPrintPause(!isPause(),false); + } + else{ + infoMenu.menu[++infoMenu.cur] = menuBabyStep; + } break; case KEY_ICON_6: - infoMenu.menu[++infoMenu.cur] = menuBabyStep; + infoMenu.menu[++infoMenu.cur] = menuMore; break; case KEY_ICON_7: - infoMenu.menu[++infoMenu.cur] = menuMore; + if(isPrinting()) + infoMenu.menu[++infoMenu.cur] = menuStopPrinting; + else + { + exitPrinting(); + infoMenu.cur--; + } break; - default :break; } loopProcess(); + toggleinfo(); } } @@ -483,7 +672,9 @@ void endPrinting(void) infoPrinting.printing = infoPrinting.pause = false; powerFailedClose(); powerFailedDelete(); - endGcodeExecute(); + if(infoSettings.send_end_gcode == 1){ + endGcodeExecute(); + } } diff --git a/TFT/src/User/Menu/Printing.h b/TFT/src/User/Menu/Printing.h index 65cdd781ce..e4b27acf37 100644 --- a/TFT/src/User/Menu/Printing.h +++ b/TFT/src/User/Menu/Printing.h @@ -4,6 +4,36 @@ #include "stdbool.h" #include "ff.h" +#if LCD_WIDTH == 480 && LCD_HEIGHT == 320 + + #define PICON_LG_WIDTH 154 + #define PICON_SM_WIDTH 121 + #define PICON_HEIGHT 50 + #define PICON_SPACE_X ((LCD_WIDTH - PICON_LG_WIDTH*2 - PICON_SM_WIDTH - SPACE_X )/2) + #define PICON_SPACE_Y (ICON_HEIGHT + SPACE_Y - PICON_HEIGHT*2)/2 + #define PICON_TITLE_X 52 + #define PICON_TITLE_Y 1 + #define PICON_VAL_X 52 + #define PICON_VAL_Y (PICON_HEIGHT/2) + #define PICON_VAL_LG_EX 150 + #define PICON_VAL_SM_EX 117 + +#elif LCD_WIDTH == 320 && LCD_HEIGHT == 240 + + #define PICON_LG_WIDTH 106 + #define PICON_SM_WIDTH 87 + #define PICON_HEIGHT 36 + #define PICON_SPACE_X ((LCD_WIDTH - PICON_LG_WIDTH*2 - PICON_SM_WIDTH - SPACE_X )/2) + #define PICON_SPACE_Y (ICON_HEIGHT + SPACE_Y - PICON_HEIGHT*2)/2 + #define PICON_TITLE_X 37 + #define PICON_TITLE_Y 1 + #define PICON_VAL_X (PICON_HEIGHT/2) + #define PICON_VAL_Y 25 + #define PICON_VAL_LG_EX 104 + #define PICON_VAL_SM_EX 85 + +#endif + typedef struct { FIL file; @@ -49,10 +79,11 @@ void menuStopPrinting(void); void menuShutDown(void); void printingDrawPage(void); -void reDrawProgress(u8 progress); -void reValueNozzle(void); -void reValueBed(void); -void reDrawTime(void); +void reDrawProgress(int icon_pos); +void reValueNozzle(int icon_pos); +void reValueBed(int icon_pos); +void reDrawTime(int icon_pos); +void reDrawLayer(int icon_pos); void loopCheckPrinting(void); diff --git a/TFT/src/User/Menu/SendGcode.c b/TFT/src/User/Menu/SendGcode.c index 8fb11a18b1..316842c49a 100644 --- a/TFT/src/User/Menu/SendGcode.c +++ b/TFT/src/User/Menu/SendGcode.c @@ -48,14 +48,14 @@ const char * const softKeyValue[][26] = { "1", "2", "3", "M", "G", "Del", "4", "5", "6", "X", "Y", "Space", "7", "8", "9", "Z", "E", "ABC", - ".", "0", "-", " ", " ", " ", + ".", "0", "-", "S", "T", " ", "Back", "Send", }, { "A", "B", "C", "D", "F", "Del", "H", "I", "J", "K", "L", "Space", "N", "O", "P", "Q", "R", "123", - "S", "T", "U", "V", "W", " ", + "U", "V", "W", " ", " ", " ", "Back", "Send", } }; diff --git a/TFT/src/User/Menu/Settings.c b/TFT/src/User/Menu/Settings.c index 7d3805eae6..93e6184a58 100644 --- a/TFT/src/User/Menu/Settings.c +++ b/TFT/src/User/Menu/Settings.c @@ -6,9 +6,9 @@ SETTINGS infoSettings; // Reset settings data void infoSettingsReset(void) { - infoSettings.baudrate = 115200; - infoSettings.language = ENGLISH; - infoSettings.mode = SERIAL_TSC; + infoSettings.baudrate = BAUDRATE; + infoSettings.language = DEFAULT_LANGUAGE; + infoSettings.mode = DEFAULT_LCD_MODE; infoSettings.runout = 0; infoSettings.rotate_ui = 0; infoSettings.bg_color = ST7920_BKCOLOR; @@ -18,8 +18,12 @@ void infoSettingsReset(void) infoSettings.terminalACK = 0; infoSettings.invert_yaxis = 0; infoSettings.move_speed = 0; - infoSettings.led_color = LED_OFF; + infoSettings.knob_led_color = (STARTUP_KNOB_LED_COLOR - 1); infoSettings.invert_zaxis = 0; + infoSettings.send_start_gcode = 1; + infoSettings.send_end_gcode = 1; + infoSettings.persistent_info = 1; + infoSettings.file_listmode = 1; } diff --git a/TFT/src/User/Menu/Settings.h b/TFT/src/User/Menu/Settings.h index 4c27ce8ad5..bc59f80311 100644 --- a/TFT/src/User/Menu/Settings.h +++ b/TFT/src/User/Menu/Settings.h @@ -24,8 +24,12 @@ typedef struct uint8_t terminalACK; uint8_t invert_yaxis; uint8_t move_speed; - uint32_t led_color; + uint8_t knob_led_color; uint8_t invert_zaxis; + uint8_t send_start_gcode; + uint8_t send_end_gcode; + uint8_t persistent_info; + uint8_t file_listmode; }SETTINGS; diff --git a/TFT/src/User/Menu/StatusScreen.c b/TFT/src/User/Menu/StatusScreen.c index bba7ed2b69..2a88102759 100644 --- a/TFT/src/User/Menu/StatusScreen.c +++ b/TFT/src/User/Menu/StatusScreen.c @@ -123,7 +123,7 @@ void drawTemperature(void) fs = (fanGetSpeed(current_fan)*100)/255; my_sprintf(tempstr, "%d%%", fs); #else - fs = fanSpeed[curIndex]; + fs = fanSpeed[current_fan]; my_sprintf(tempstr, "%d", fs); #endif GUI_DispStringInPrect(&rectB[2], (u8 *)tempstr); //Fan value diff --git a/TFT/src/User/Menu/ledcolor.c b/TFT/src/User/Menu/ledcolor.c index bfa8d1c449..ec473589e1 100644 --- a/TFT/src/User/Menu/ledcolor.c +++ b/TFT/src/User/Menu/ledcolor.c @@ -5,28 +5,61 @@ #ifdef LED_color_PIN -void led_color_Init(uint16_t psc,uint16_t arr) // 12 11 -{ +//preset color list + const LABEL itemLedcolor[LED_color_NUM] = { + //label + LABEL_OFF, + LABEL_WHITE, + LABEL_RED, + LABEL_ORANGE, + LABEL_YELLOW, + LABEL_GREEN, + LABEL_BLUE, + LABEL_INDIGO, + LABEL_VIOLET, + }; + + const uint32_t led_color[LED_color_NUM] = { + LED_OFF, + LED_WHITE, + LED_RED, + LED_ORANGE, + LED_YELLOW, + LED_GREEN, + LED_BLUE, + LED_INDIGO, + LED_VIOLET + }; +void knob_LED_Init() // 12 11 +{ + uint16_t psc = _PSC; + uint16_t arr = _ARR; GPIO_InitSet(LED_color_PIN,MGPIO_MODE_OUT_PP,0); GPIO_SetLevel(LED_color_PIN,0); - //打开时钟 - RCC->APB1ENR|=1<<4;//TIM6时钟使能 - //复位 + //Turn on the clock + RCC->APB1ENR|=1<<4;//TIM6Clock enable + //Reset RCC->APB1RSTR|=1<<4; RCC->APB1RSTR&=~(1<<4); TIM6->CNT=0; TIM6->PSC=psc-1; TIM6->ARR=arr; - //TIM6->CR1|=1<<0;//使能定时器6 + //TIM6->CR1|=1<<0;//Enable timer 6 + + ws2812_send_DAT(led_color[infoSettings.knob_led_color]); //set last saved color after initialization } -void LED_color_PIN_IPN(void) +void knob_LED_DeInit(void) { GPIO_InitSet(LED_color_PIN,MGPIO_MODE_IPN,0); } +void set_knob_color(int color_index){ + ws2812_send_DAT(led_color[color_index]); +} + void ws2812_send_DAT(uint32_t ws2812_dat) { u8 CNT; diff --git a/TFT/src/User/Menu/ledcolor.h b/TFT/src/User/Menu/ledcolor.h index d8eef9665b..b1665a750b 100644 --- a/TFT/src/User/Menu/ledcolor.h +++ b/TFT/src/User/Menu/ledcolor.h @@ -2,7 +2,7 @@ #define _LEDCPLOR_H_ #include "variants.h" - +#include "menu.h" //24bit // G R B #define LED_OFF 0x00000000 #define LED_WHITE 0x00FFFFFF @@ -154,8 +154,21 @@ #define COLOR_DIMGRAY 0x696969 // 暗淡的灰色 #define COLOR_BLACK 0x000000 // 纯黑 +//preset color list +#ifdef LED_color_PIN + #define _PSC 6 //presacler register + #define _ARR 5 // reload value of the timer counter + + #define LED_color_NUM 9 + + extern const LABEL itemLedcolor[LED_color_NUM]; + + extern const uint32_t led_color[LED_color_NUM]; + + + void knob_LED_Init(); + void knob_LED_DeInit(void); + void ws2812_send_DAT(uint32_t ws2812_dat); + #endif -void led_color_Init(uint16_t psc,uint16_t arr); // -void LED_color_PIN_IPN(void); -void ws2812_send_DAT(uint32_t ws2812_dat); #endif diff --git a/TFT/src/User/Menu/menu.c b/TFT/src/User/Menu/menu.c index c2af984945..447a924b66 100644 --- a/TFT/src/User/Menu/menu.c +++ b/TFT/src/User/Menu/menu.c @@ -123,6 +123,14 @@ void menuRefreshListPage(void){ for (uint8_t i = 0; i < ITEM_PER_PAGE; i++) { menuDrawListItem(&curListItems->items[i], i); + #ifdef RAPID_SERIAL_COMM + #ifndef CLEAN_MODE_SWITCHING_SUPPORT + if(isPrinting() == true) + #endif + { + loopBackEnd(); //perform backend printing loop between drawing icons to avoid printer idling + } + #endif } } @@ -268,6 +276,14 @@ void menuDrawPage(const MENUITEMS *menuItems) for (i = 0; i < ITEM_PER_PAGE; i++) { menuDrawItem(&menuItems->items[i], i); + #ifdef RAPID_SERIAL_COMM + #ifndef CLEAN_MODE_SWITCHING_SUPPORT + if(isPrinting() == true) + #endif + { + loopBackEnd(); //perform backend printing loop between drawing icons to avoid printer idling + } + #endif } } @@ -292,6 +308,14 @@ void menuDrawListPage(const LISTITEMS *listItems) //const GUI_RECT *rect = rect_of_keyListView + i; if (curListItems->items[i].icon != ICONCHAR_BACKGROUND) menuDrawListItem(&curListItems->items[i], i); + #ifdef RAPID_SERIAL_COMM + #ifndef CLEAN_MODE_SWITCHING_SUPPORT + if(isPrinting() == true) + #endif + { + loopBackEnd(); //perform backend printing loop between drawing icons to avoid printer idling + } + #endif } // show_globalinfo(); } @@ -349,6 +373,12 @@ KEY_VALUES menuKeyGetValue(void) } } +//Get the top left point of the corresponding icon position) +GUI_POINT getIconStartPoint(int index){ + GUI_POINT p = {rect_of_key[index].x0,rect_of_key[index].y0}; + return p; +} + void loopBackEnd(void) { getGcodeFromFile(); //Get Gcode command from the file to be printed @@ -388,11 +418,12 @@ void loopFrontEnd(void) loopVolumeReminderClear(); loopBusySignClear(); //Busy Indicator clear + + temp_Change(); } void loopProcess(void) { - temp_Change(); loopBackEnd(); loopFrontEnd(); } diff --git a/TFT/src/User/Menu/menu.h b/TFT/src/User/Menu/menu.h index 38f28a04a1..0b0344edc4 100644 --- a/TFT/src/User/Menu/menu.h +++ b/TFT/src/User/Menu/menu.h @@ -111,6 +111,7 @@ void menuDrawPage (const MENUITEMS * menuItems); void menuDrawListPage(const LISTITEMS *listItems); void itemDrawIconPress(uint8_t positon, uint8_t is_press); KEY_VALUES menuKeyGetValue(void); +GUI_POINT getIconStartPoint(int index); void loopBackEnd(void); void loopFrontEnd(void); diff --git a/TFT/src/User/main.c b/TFT/src/User/main.c index b6ed3b6d97..5b0c39fd68 100644 --- a/TFT/src/User/main.c +++ b/TFT/src/User/main.c @@ -31,6 +31,12 @@ void Hardware_GenericInit(void) LCD_EncoderInit(); #endif +#ifndef ST7920_SPI + #ifdef CLEAN_MODE_SWITCHING_SUPPORT + #error "CLEAN_MODE_SWITCHING_SUPPORT can only be enabled for TFT controllers which support ST7920 Emulator/Marlin Mode. Disable CLEAN_MODE_SWITCHING_SUPPORT in Configuration.h" + #endif +#endif + #ifdef PS_ON_PIN PS_ON_Init(); #endif @@ -39,6 +45,25 @@ void Hardware_GenericInit(void) FIL_Runout_Init(); #endif +#ifdef LED_color_PIN + #ifdef STARTUP_KNOB_LED_COLOR + #if STARTUP_KNOB_LED_COLOR < 1 + #error STARTUP_KNOB_LED_COLOR cannot be less than 1 + #endif + + #if STARTUP_KNOB_LED_COLOR > 9 + #error STARTUP_KNOB_LED_COLOR cannot be greater than 9 + #endif + #else + #define STARTUP_KNOB_LED_COLOR 1 + #endif + + knob_LED_Init(); + +#else + #define STARTUP_KNOB_LED_COLOR 1 +#endif + if(readStoredPara() == false) // Read settings parameter { TSC_Calibration(); diff --git a/platformio.ini b/platformio.ini index 9a6d76357b..df89200b0c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -44,7 +44,7 @@ build_flags = -fmax-errors=5 -ITFT/src/User/Hal/STM32_USB_HOST_Library/Class/MSC/inc -ITFT/src/User/Hal/STM32_USB_HOST_Library/Usr/inc -ITFT/src/User/Hal/STM32_USB_OTG_Driver/inc - -DSOFTWARE_VERSION=25.1 + -DSOFTWARE_VERSION=25.2 [stm32f10x] default_src_filter = ${common.default_src_filter} + + +